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
1=== modified file 'SConstruct'
2--- SConstruct 2012-03-17 00:19:40 +0000
3+++ SConstruct 2012-04-16 15:33:28 +0000
4@@ -30,11 +30,12 @@
5 Default target: all
6
7 Commandline Options:
8- debug=n debug build with optimization level n
9- arch=str target architecture [i686|x86_64]
10- build_dir=dir build directory, default .
11- boost=[0|1] disable or enable boost libraries
12- revno=XXXX source code revision number
13+ debug=n debug build with optimization level n
14+ arch=str target architecture [i686|x86_64]
15+ build_dir=dir build directory, default .
16+ boost=[0|1] disable or enable boost libraries
17+ bpostatic=path path to libboost_program_options.a
18+ revno=XXXX source code revision number
19 ''')
20
21
22@@ -100,6 +101,9 @@
23 Export('GALERA_VER', 'GALERA_REV')
24 print 'Signature: version: ' + GALERA_VER + ', revision: ' + GALERA_REV
25
26+BPO_STATIC = ARGUMENTS.get('bpostatic', '')
27+Export('BPO_STATIC', 'BPO_STATIC')
28+
29 #
30 # Set up and export default build environment
31 #
32
33=== modified file 'garb/SConscript'
34--- garb/SConscript 2012-03-17 00:19:40 +0000
35+++ garb/SConscript 2012-04-16 15:33:28 +0000
36@@ -16,17 +16,29 @@
37 env.Prepend(LIBS=File('#/gcomm/src/libgcomm.a'))
38 env.Prepend(LIBS=File('#/gcs/src/libgcs4garb.a'))
39
40+# Add libboost_program_options to garbd environment.
41+garbd_env = env.Clone()
42+
43+Import('BPO_STATIC', 'BPO_STATIC')
44+
45 bpo_static = '/usr/lib/libboost_program_options.a'
46 bpo_local_static = '/usr/local/lib/libboost_program_options.a'
47
48 import os
49
50-if os.path.isfile(bpo_static):
51- env.Append(LIBS=File(bpo_static))
52+if BPO_STATIC != '':
53+ if os.path.isfile(BPO_STATIC):
54+ garbd_env.Append(LIBS=File(BPO_STATIC))
55+ else:
56+ print "Error: Specified library `%s' does not exist" % (BPO_STATIC)
57+ Exit (1)
58+
59+elif os.path.isfile(bpo_static):
60+ garbd_env.Append(LIBS=File(bpo_static))
61 elif os.path.isfile(bpo_local_static):
62- env.Append(LIBS=File(bpo_local_static))
63+ garbd_env.Append(LIBS=File(bpo_local_static))
64 else:
65- env.Append(LIBS=['boost_program_options'])
66+ garbd_env.Append(LIBS=['boost_program_options'])
67
68 # special environment for garb_config.cpp
69 conf_env = env.Clone()
70@@ -34,7 +46,7 @@
71 conf_env.Append(CPPFLAGS = ' -DGALERA_VER=\\"' + GALERA_VER + '\\"')
72 conf_env.Append(CPPFLAGS = ' -DGALERA_REV=\\"' + GALERA_REV + '\\"')
73
74-garb = env.Program(target = 'garbd',
75+garb = garbd_env.Program(target = 'garbd',
76 source = Split('''
77 garb_logger.cpp
78 garb_gcs.cpp

Subscribers

People subscribed via source and target branches

to all changes: