Re: Configure error on 3.1.4
Gary Funck <[email protected]> Tue, 25 Jan 2011 08:32:06 -0800
| Newsgroups | gmane.comp.gnu.source-highlight.general |
|---|---|
| Message-ID | <[email protected]> |
On 10/26/10 14:29:49, Thomas Ricatte wrote: > Hello, > > I have a problem while configuring source-highlight on my CentOS : > > ... > checking whether the compiler has ios_base... yes > checking for boostlib >= 1.33.1... yes > checking whether the Boost::Regex library is available... yes > configure: error: Could not link against ! [...] > My problem seems to be the same as this one : > http://www.mail-archive.com/[email protected]/msg29804.html > but I haven't find a way to solve it. > > The output is weird because the error message is incomplete : > "Could not ling against ?" I ran into the same problem. Configuration: distro: Fedora FC14 x86_64 source hilite: latest git Here's what I found out: 1) Pulled the latest m4/ax_boost_regex.m4 from $ git clone git://git.sv.gnu.org/autoconf_archive.git $ cp -p autoconf-archive/m4/ax_boost_regex.m4 src-highlite/m4/ax_boost_regex.m4 This turned out not to fix the problem, but the new version does provide a slightly better error diagnostic. 2) Ran configure with echo-ing on: $ sh -x configure >c.log 2>&1 Here are the relevant bits: + ax_cv_boost_regex=yes + ac_cpp='$CXXCPP $CPPFLAGS' + ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac _ext $LIBS >&5' + ac_compiler_gnu=yes + printf '%s\n' 'configure:15855: result: yes' + printf '%s\n' yes yes + test xyes = xyes + printf '%s\n' '#define HAVE_BOOST_REGEX /**/' ++ echo -L/usr/lib ++ sed -e 's/[^\/]*//' + BOOSTLIBDIR=/usr/lib + test x = x ++ sed 's,.*/,,' ++ sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.a*$ ;\1;' ++ ls '/usr/lib/libboost_regex*.so*' '/usr/lib/libboost_regex*.a*' + test x '!=' xyes ++ sed 's,.*/,,' ++ sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a*$;\1;' ++ ls '/usr/lib/boost_regex*.dll*' '/usr/lib/boost_regex*.a*' + test x = x + as_fn_error 'Could not find a version of the library!' 16006 5 As noted above, the autoconf macro is looking for '/usr/lib/libboost_regex*.so*' and finds none. 3) Search for the boost_regex library on local system. $ ls -1 /*{,/*}/libboost_regex*.so* ls: cannot access /*/libboost_regex*.so*: No such file or directory /usr/lib64/libboost_regex-mt.so /usr/lib64/libboost_regex-mt.so.1.44.0 /usr/lib64/libboost_regex.so /usr/lib64/libboost_regex.so.1.44.0 At this point, the easiest work around is to: # INSTALL THE 32-BIT BOOST REGEX LIBRARY $ sudo yum install boost-regex.i686 And 'configure' will run without errors. This seems to work, but may not be the best work-around, however ... The longer term fix is to correct the library look up in m4/ax_boost_regex.m4 so that it uses a more general scheme to locate the shared library. Perhaps there is already an AC_... function to do that job? Or there may also be a problem in the way that the configure script is setting BOOST_LDFLAGS. The value that it comes up with is: /usr/lib, and it should be /usr/lib64. The reason that --with-boost=<path-to-lib> is probably the best work-around for now is that it avoids the (failed) search for the location of the boost library, and the incorrect setting of BOOST_LDFLAGS.