Gentoo Archives: gentoo-user

From: Samuli Suominen <ssuominen@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] custom boost in /usr/local = problem with libkolabxml, libixion
Date: Sat, 01 Mar 2014 13:00:26
Message-Id: 5311D933.5080205@gentoo.org
In Reply to: [gentoo-user] custom boost in /usr/local = problem with libkolabxml, libixion by "Kacper Kopczyński"
1 On 01/03/14 13:23, Kacper Kopczyński wrote:
2 >
3 > Hello list,
4 >
5 >
6 >
7 > I've installed newest boost into /usr/local - it's a custom
8 > installation and not via emerge/portage.
9 >
10 >
11 >
12 > Today, after upgrading system, I've found that I need to use
13 >
14 >
15 >
16 > emerge --update --newuse --deep --with-bdeps=y @world
17 >
18 >
19 >
20 > to rebuild some dependencies.
21 >
22 >
23 >
24 > In the process of recompiling I first noticed this strange thing:
25 >
26 > checking for Boost headers version >= 1.36.0... yes
27 >
28 > checking for Boost's header version... 1_55
29 >
30 >
31 >
32 > Portage installed boost is 1.52, my custom installed one is 1.55.
33 >
34 >
35 >
36 > Then after a few seconds I saw this:
37 >
38 > x86_64-pc-linux-gnu-g++ -DPACKAGE_NAME=\"libixion\"
39 > -DPACKAGE_TARNAME=\"libixion\" -DPACKAGE_VERSION=\"0.5.0\"
40 > -DPACKAGE_STRING=\"libixion\ 0.5.0\" -DPACKAGE_BUGREPORT=\"\"
41 > -DPACKAGE_URL=\"\" -DPACKAGE=\"libixion\" -DVERSION=\"0.5.0\"
42 > -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
43 > -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
44 > -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
45 > -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
46 > -DHAVE_STDLIB_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE__BOOL=1
47 > -DHAVE_STDBOOL_H=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_BOOST=1
48 > -DHAVE_BOOST_UNORDERED_MAP_HPP=1 -DHAVE_MDDS_RECTANGLE_SET_HPP=1
49 > -DHAVE_MDDS_MIXED_TYPE_MATRIX_HPP=1
50 > -DHAVE_MDDS_MULTI_TYPE_VECTOR_TRAIT_HPP=1
51 > -DHAVE_BOOST_SYSTEM_ERROR_CODE_HPP=1 -DHAVE_BOOST_THREAD_HPP=1
52 > -DHAVE_BOOST_PROGRAM_OPTIONS_HPP=1 -I. -I../include
53 > -I../lib/libixion/libixion.la -D_REENTRANT -DMDDS_HASH_CONTAINER_BOOST
54 > -D__IXION_BUILDING_DLL -g -Os -fvisibility=hidden -O2 -pipe
55 > -march=native -c -o ixion_sorter-sort_input_parser.o `test -f
56 > 'sort_input_parser.cpp' || echo './'`sort_input_parser.cpp
57 >
58 > /bin/sh ../libtool --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ -O2
59 > -pipe -march=native -Wl,-O1 -Wl,--as-needed -o ixion-parser
60 > ixion_parser-ixion_parser.o ixion_parser-model_parser.o
61 > libixion/libixion-0.6.la -lboost_thread-mt -lboost_system-mt -pthread
62 > -lboost_program_options-mt
63 >
64 > libtool: link: x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -Wl,-O1
65 > -Wl,--as-needed -o .libs/ixion-parser ixion_parser-ixion_parser.o
66 > ixion_parser-model_parser.o -pthread libixion/.libs/libixion-0.6.so
67 > -lboost_thread-mt -lboost_system-mt -lboost_program_options-mt -pthread
68 >
69 > libixion/.libs/libixion-0.6.so: undefined reference to
70 > `boost::thread::start_thread_noexcept()'
71 >
72 > libixion/.libs/libixion-0.6.so: undefined reference to
73 > `boost::thread::join_noexcept()'
74 >
75 > collect2: error: ld returned 1 exit status
76 >
77 > make[2]: *** [ixion-parser] Error 1
78 >
79 > make[2]: *** Waiting for unfinished jobs....
80 >
81 > make[2]: Leaving directory
82 > `/var/tmp/portage/dev-libs/libixion-0.5.0/work/libixion-0.5.0/src'
83 >
84 > make[1]: *** [all-recursive] Error 1
85 >
86 > make[1]: Leaving directory
87 > `/var/tmp/portage/dev-libs/libixion-0.5.0/work/libixion-0.5.0/src'
88 >
89 > make: *** [all-recursive] Error 1
90 >
91 > * ERROR: dev-libs/libixion-0.5.0::gentoo failed (compile phase):
92 >
93 >
94 >
95 >
96 >
97 > ...so it failed because it tried to use my custom boost... I think.
98 >
99 >
100 >
101 > To be sure that this is because of this I moved /usr/local/lib and
102 > /usr/local/include to /root and another compilation of this library
103 > went fine.
104 >
105 > After doing so I runned revdep-rebuild and it had to recompile
106 > libkolabxml because it was linked to boost in /usr/local/lib.
107 >
108 >
109 >
110 > So here is my question:
111 >
112 > If libreoffice does need boost to compile, and I compiled libreoffice
113 > after I installed boost to /usr/local, then why it was able to use
114 > correct version of boost (from /usr not /usr/local)?
115 >
116 >
117 >
118 > Libreoffice is just an example - there are many other programs that
119 > depend on boost, and the boost.thread library is very popular one.
120 >
121 >
122 >
123 > libkolabxml at version 1.0.1
124 >
125 > libixion at version 0.5.0
126 >
127 >
128 >
129 > Should I create a bug for these two libraries or this is expected
130 > behaviour?
131 >
132 >
133 >
134 > --
135 >
136 > Kacper Kopczyński
137 >
138
139 There are multiple factors in play, some per package ./configure scripts
140 add -I/usr/local/include so that headers are picked up from there by
141 default,
142 if compiler alone doesn't have that in it's default search path already.
143 There are -L/usr/local/lib added by some, and /usr/local/lib in
144 /etc/ld.so.conf
145
146 What I'm really trying to say is that you can't install boost safely
147 into /usr/local/lib and include, but you should put it in it's own
148 directory outside of
149 compilers or ld.so's scope, like for example, /home/username/boost, and
150 then when you want something to use it, point the package to search it
151 from there
152 using package specific configure flags and environment variables like
153 LD_LIBRARY_PATH, PKG_CONFIG_PATH, and so forth
154
155 Bottom line is, It's not a bug you can file to Gentoo's bugzilla, it is
156 expected behavior

Replies

Subject Author
Re: [gentoo-user] custom boost in /usr/local = problem with libkolabxml, libixion "Kacper Kopczyński" <capsel@××××××××.org>