Merge lp:~ignacio-nin/galera/galera-2.x into lp:galera/2.x

Proposed by Ignacio Nin
Status: Rejected
Rejected by: Alex Yurchenko
Proposed branch: lp:~ignacio-nin/galera/galera-2.x
Merge into: lp:galera/2.x
Diff against target: 78 lines (+26/-10)
2 files modified
SConstruct (+9/-5)
garb/SConscript (+17/-5)
To merge this branch: bzr merge lp:~ignacio-nin/galera/galera-2.x
Reviewer Review Type Date Requested Status
Alex Yurchenko Abstain
Review via email: mp+101384@code.launchpad.net

Description of the change

To post a comment you must log in.
lp:~ignacio-nin/galera/galera-2.x updated
128. By Ignacio Nin

Ability to specify the path to libboost_program_options.a

Add a bpostatic parameter to the scons script, so the full path to the
location of libboost_program_options.a can be specified. This is to
avoid having more hardcoded paths (/usr/lib, /usr/local/lib, etc.) in
garb/Sconscript.

Revision history for this message
Alex Yurchenko (ayurchen) wrote :

Ignacio, sorry for taking so long. This is a good patch, but I'm afraid we need to clarify the copyright issues here - namely we need a copyright (not exclusive, but nevertheless) on that code. I'll double this in the mailing list.

review: Needs Information
Revision history for this message
Alex Yurchenko (ayurchen) wrote :

Refrained from taking the patch literally, instead implemented somewhat different fix.

review: Abstain

Unmerged revisions

128. By Ignacio Nin

Ability to specify the path to libboost_program_options.a

Add a bpostatic parameter to the scons script, so the full path to the
location of libboost_program_options.a can be specified. This is to
avoid having more hardcoded paths (/usr/lib, /usr/local/lib, etc.) in
garb/Sconscript.

127. By Ignacio Nin

Avoid linkage against libboost_program_options

Library libboost_program_options was being added to the global
environment, causing libgalera_smm.so to be unnecessarily linked against
it.

This change clones the environment for garbd so libboost_program_options
is just linked against it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'SConstruct'
--- SConstruct 2012-03-17 00:19:40 +0000
+++ SConstruct 2012-04-16 15:33:28 +0000
@@ -30,11 +30,12 @@
30Default target: all30Default target: all
3131
32Commandline Options:32Commandline Options:
33 debug=n debug build with optimization level n33 debug=n debug build with optimization level n
34 arch=str target architecture [i686|x86_64]34 arch=str target architecture [i686|x86_64]
35 build_dir=dir build directory, default .35 build_dir=dir build directory, default .
36 boost=[0|1] disable or enable boost libraries36 boost=[0|1] disable or enable boost libraries
37 revno=XXXX source code revision number37 bpostatic=path path to libboost_program_options.a
38 revno=XXXX source code revision number
38''')39''')
3940
4041
@@ -100,6 +101,9 @@
100Export('GALERA_VER', 'GALERA_REV')101Export('GALERA_VER', 'GALERA_REV')
101print 'Signature: version: ' + GALERA_VER + ', revision: ' + GALERA_REV102print 'Signature: version: ' + GALERA_VER + ', revision: ' + GALERA_REV
102103
104BPO_STATIC = ARGUMENTS.get('bpostatic', '')
105Export('BPO_STATIC', 'BPO_STATIC')
106
103#107#
104# Set up and export default build environment108# Set up and export default build environment
105#109#
106110
=== modified file 'garb/SConscript'
--- garb/SConscript 2012-03-17 00:19:40 +0000
+++ garb/SConscript 2012-04-16 15:33:28 +0000
@@ -16,17 +16,29 @@
16env.Prepend(LIBS=File('#/gcomm/src/libgcomm.a'))16env.Prepend(LIBS=File('#/gcomm/src/libgcomm.a'))
17env.Prepend(LIBS=File('#/gcs/src/libgcs4garb.a'))17env.Prepend(LIBS=File('#/gcs/src/libgcs4garb.a'))
1818
19# Add libboost_program_options to garbd environment.
20garbd_env = env.Clone()
21
22Import('BPO_STATIC', 'BPO_STATIC')
23
19bpo_static = '/usr/lib/libboost_program_options.a'24bpo_static = '/usr/lib/libboost_program_options.a'
20bpo_local_static = '/usr/local/lib/libboost_program_options.a'25bpo_local_static = '/usr/local/lib/libboost_program_options.a'
2126
22import os27import os
2328
24if os.path.isfile(bpo_static):29if BPO_STATIC != '':
25 env.Append(LIBS=File(bpo_static))30 if os.path.isfile(BPO_STATIC):
31 garbd_env.Append(LIBS=File(BPO_STATIC))
32 else:
33 print "Error: Specified library `%s' does not exist" % (BPO_STATIC)
34 Exit (1)
35
36elif os.path.isfile(bpo_static):
37 garbd_env.Append(LIBS=File(bpo_static))
26elif os.path.isfile(bpo_local_static):38elif os.path.isfile(bpo_local_static):
27 env.Append(LIBS=File(bpo_local_static))39 garbd_env.Append(LIBS=File(bpo_local_static))
28else:40else:
29 env.Append(LIBS=['boost_program_options'])41 garbd_env.Append(LIBS=['boost_program_options'])
3042
31# special environment for garb_config.cpp43# special environment for garb_config.cpp
32conf_env = env.Clone()44conf_env = env.Clone()
@@ -34,7 +46,7 @@
34conf_env.Append(CPPFLAGS = ' -DGALERA_VER=\\"' + GALERA_VER + '\\"')46conf_env.Append(CPPFLAGS = ' -DGALERA_VER=\\"' + GALERA_VER + '\\"')
35conf_env.Append(CPPFLAGS = ' -DGALERA_REV=\\"' + GALERA_REV + '\\"')47conf_env.Append(CPPFLAGS = ' -DGALERA_REV=\\"' + GALERA_REV + '\\"')
3648
37garb = env.Program(target = 'garbd',49garb = garbd_env.Program(target = 'garbd',
38 source = Split('''50 source = Split('''
39 garb_logger.cpp51 garb_logger.cpp
40 garb_gcs.cpp52 garb_gcs.cpp

Subscribers

People subscribed via source and target branches

to all changes: