[MDEV-14600] Galera not compatible with Scons in Fedora 27 Created: 2017-12-06  Updated: 2018-09-24  Resolved: 2018-09-24

Status: Closed
Project: MariaDB Server
Component/s: Galera, Galera Arbitrator garbd
Affects Version/s: 10.2
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Daniel Bartholomew Assignee: Teemu Ollakka
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
PartOf
is part of MDEV-15302 Merge galera library 25.3.23 Closed

 Description   

There are a couple issues I've come across when trying to build the galera-25.3.22 package on our new Fedora 27 builder.

Here's what I do to build Galera after starting the Fedora 27 builder:

[buildbot@fedora27-amd64 ~]$ rm -Rf buildbot && mkdir buildbot && cd buildbot
[buildbot@fedora27-amd64 buildbot]$ mkdir rpms srpms
[buildbot@fedora27-amd64 buildbot]$ git clone -b mariadb-3.x "https://github.com/MariaDB/galera.git" build
Cloning into 'build'...
remote: Counting objects: 32508, done.
remote: Total 32508 (delta 0), reused 0 (delta 0), pack-reused 32507
Receiving objects: 100% (32508/32508), 14.79 MiB | 4.97 MiB/s, done.
Resolving deltas: 100% (24613/24613), done.
[buildbot@fedora27-amd64 buildbot]$ cd build
[buildbot@fedora27-amd64 build]$ ./scripts/build.sh -p
~/buildbot/build ~/buildbot/build
~/buildbot/build
scons: Reading SConscript files ...
  File "/home/buildbot/buildbot/build/SConstruct", line 36
 
    print 'Host: ' + sysname + ' ' + machine + ' ' + bits
 
                 ^
 
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Host: ' + sysname + ' ' + machine + ' ' + bits)?

So the version of Scons on Fedora 27 requires print statements to have parentheses. I can work around this by adding them myself, but after doing so I then get the following error:

[buildbot@fedora27-amd64 build]$ ./scripts/build.sh -p
~/buildbot/build ~/buildbot/build
~/buildbot/build
scons: Reading SConscript files ...
Host: linux x86_64 64bit
Signature: version: 25.3.22, revision: 3764
AttributeError: module 'string' has no attribute 'replace':
  File "/home/buildbot/buildbot/build/SConstruct", line 156:
    LIBBOOST_SYSTEM_A = string.replace(LIBBOOST_PROGRAM_OPTIONS_A, 'boost_program_options', 'boost_system')

At first I was thinking that maybe both errors were due to a new version of Python on the Fedora 27 builder, it has 2.7.14, but the Fedora 26 builder has 2.7.13, so I'm guessing both issues are with Scons. The version in Fedora 27 is 3.0.0 and the version on Fedora 26 is 2.5.1. There's no older version of Scons available on Fedora 27, so the SConstruct file in our Galera repository needs to be updated to support Scons 3.0.0.



 Comments   
Comment by Elena Stepanova [ 2018-02-12 ]

sachin.setiya.007 FYI

Comment by Daniel Black [ 2018-02-12 ]

temporary workaround for buildbot is fc27 has a python2-scons package that works fine.

python 2to3 will help with the conversion of SConscript

Comment by Jan Lindström (Inactive) [ 2018-02-13 ]

commit 210450e4161982b440fe6c7dff2e5e5c6be2c97d
Author: Jan Lindström <jan.lindstrom@mariadb.com>
Date: Tue Feb 13 08:25:45 2018 +0200

MDEV-14600: Galera not compatible with Scons in Fedora 27

string.replace() is deprecated in python3. Fix also galera library
version number.

Comment by Daniel Black [ 2018-02-13 ]

Changing the one line isn't a sufficient fix. There is a significant amount of other python3 incompatible code in the SConstripts files:

$ git show-branch  | head -1
* [mariadb-3.x] MDEV-14600: Galera not compatible with Scons in Fedora 27
 
$ scons-3.6
scons: Reading SConscript files ...
Host: linux x86_64 64bit
Signature: version: 3.23, revision: XXXX
Using C compiler executable: gcc
TypeError: must be str, not bytes:
  File "/home/dan/repos/mariadb-galera/SConstruct", line 201:
    print('C compiler version is: ' + cc_version)

Fix:

https://github.com/MariaDB/galera/pull/2

Codership request (is about the same), https://github.com/codership/galera/pull/488, and its lingering.

Comment by Daniel Black [ 2018-02-15 ]

FYI upstream merged theirs' if you want to merge that.

Comment by Teemu Ollakka [ 2018-04-30 ]

Galera release release_25.3.23 from https://github.com/codership/galera compiles for me on Fedora 27 given that asio-devel package has been installed in the build system.

Comment by Daniel Bartholomew [ 2018-09-24 ]

closing this issue as it appears to be fixed with recent galera builds

Generated at Thu Feb 08 08:14:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.