Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16753

Galera doesn't build on opensuse 15.0

    XMLWordPrintable

Details

    Description

      There are a couple issues. First are some syntax issues with the Sconstruct file, probably due to the version in opensuse 15 being scons v3.0.1 (as opposed to v2.3.x in previous opensuse).

      The error is:

      TypeError: must be str, not bytes:
        File "/home/buildbot/buildbot/build/SConstruct", line 201:
          print('C compiler version is: ' + cc_version)
      

      full build log

      The error is also present on line 203, and I was able to work around both errors with the following quick-and-dirty patch:

      diff --git a/SConstruct b/SConstruct
      index 28a0b8b2..4f11ee96 100644
      --- a/SConstruct
      +++ b/SConstruct
      @@ -194,8 +194,8 @@ if link != 'default':
           env.Replace(LINK = link)
       
       # Get compiler name/version, CXX may be set to "c++" which may be clang or gcc
      -cc_version = read_first_line(env['CC'].split() + ['--version'])
      -cxx_version = read_first_line(env['CXX'].split() + ['--version'])
      +cc_version = str(read_first_line(env['CC'].split() + ['--version']))
      +cxx_version = str(read_first_line(env['CXX'].split() + ['--version']))
       
       print('Using C compiler executable: ' + env['CC'])
       print('C compiler version is: ' + cc_version)
      

      Once the syntax issues are worked around, there are also openssl errors that can currently be solved by installing libopenssl-1_0_0-devel. I would be nice if Galera was able to be compiled with the default libopenssl-devel instead, but for the time being, I have set up a -galera VM with libopenssl-1_0_0-devel installed on it (has to be a separate VM because libopenssl-devel and libopenssl-1_0_0-devel can't be installed at the same time) and with some minor modifications to the galera.spec file I was able to compile a galera package that seems to work.

      Changes to galera.spec to fix packaging:

      diff --git a/scripts/packages/galera.spec b/scripts/packages/galera.spec
      index a5caaa30..495b42c5 100644
      --- a/scripts/packages/galera.spec
      +++ b/scripts/packages/galera.spec
      @@ -39,6 +39,9 @@
       %if 0%{?suse_version} == 1320
       %define dist .suse13.2
       %endif
      +%if 0%{?suse_version} == 1500
      +%define dist .suse15.0
      +%endif
       
       
       Name:          %{name}
      @@ -57,7 +60,7 @@ BuildRoot:     %{_tmppath}/%{name}-%{version}
       #BuildRequires: boost-devel
       #BuildRequires: check-devel
       BuildRequires: glibc-devel
      -BuildRequires: openssl-devel
      +BuildRequires: libopenssl-1_0_0-devel
       BuildRequires: scons
       %if 0%{?suse_version} == 1110
       # On SLES11 SPx use the linked gcc47 to build instead of default gcc43
      

      The attached suse15-galera.patch file has both fixes (to both the SConstruct and galera.spec files).

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              dbart Daniel Bartholomew
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.