-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boost Errors When I Try to Run make #118
Comments
Hello! Could you tell me your boost version and xssp version? |
I am trying to install XSSP 3.0.10. We have two Boost versions installed. 1.53 and 1.68.0.a. I've tried both of them and they both kick out the same error. This is on Red Hat 7.6 |
I tried with boost 1.68.0 and I was able to compile. So it's either one of these issues:
OR
|
When I add the --with-boost argument the configure script fails with the error: "configure: error: Could not find a version of the library!". Just before that it says "checking for boostlib >= 1.48... yes" and then "checking whether the Boost::Date_Time library is available... yes" |
I meant that you should use the --with-boost argument like this:
Did you provide a path with the argument? |
I did. I've used both of those arguments and it still doesn't work. ./configure --with-boost=/cm/local/apps/boost/1.68.0.a --with-boost-libdir=/cm/local/apps/boost/1.68.0.a/lib64 CC=mpicc CXX=mpicxx |
Is the file "/cm/local/apps/boost/1.68.0.a/lib64/libboost_filesystem.so" present on your machine? Also, what is the message you get before "Could not link against ...". It should be something like: "checking whether the ... library is available" |
It did find the filesystem library and it said it was available. |
I think this is some kind of autoconf problem. I'll look into it when I have time. There must be some way to make this error go away. I'll let you know when I have a solution... |
I've created a similar situation on my local machine @traverbrad your two boost versions are conflicting and I think the second boost installation has partly overwritten the first one. Since you're not the administrator, the only solution is not to use either of the two boost installations. Instead, build your own boost in your home directory. Download the latest boost source from: https://www.boost.org/users/download/ and extract the archive. If you still get linker errors, then use the '-L' flag on the compiler to specify the directory where you installed boost. |
hi cbaakman and travelbrad I have the same error during the installation. How can I know how many version are there in my computer? @cbaakman I tried with this procedure:
but still returns error, where should i place the -L flag? thank you |
@garundula In order to find out how many versions of boost are installed, you need to search your hard drive for boost library files with version numbers. Commands like 'locate' on linux can help. If the makefile doesn't include the boost directory in your build path (with -L), then the easiest way is to edit your Makefile manually after running configure. Take care of the following things: LDFLAGS should include all library directories:
CXXLINK and LINK should include LDFLAGS:
Also, the build commands for mkhssp, mkdssp and hsspconv should include the $(CXXLINK) I'll try to find a way to make autom4ke set this right automatically in the next version. |
I have put a new release online: In this release, the autogen.sh will automatically add the alternative boost directory to the makefile. All you have to do is specify the --with-boost path when running configure. |
Still having the same issue. I specify the boost path and it says it can't link against boost_filesystem even though it says it's available. |
@traverbrad I tried doing the same as you on my ubuntu 18.04 with boost 1.68.1. I used the -L flag, but I got a linker error between libboost_timer.so and libboost_chrono.so. Is this the same as you got? Apparently, the compiler uses the -L flag for finding boost libraries for linking executables, but not for linking libraries together. I fixed this by setting the environment variable LD_LIBRARY_PATH to the boost lib directory. Does this help you? I'll try to find a way to set this in the configure script. |
I set the LD_LIBRARY_PATH variable and that fixed the configure error. Now I'm getting loads of boost undefined reference errors when I try to run make. |
@traverbrad |
I did run make clean. Same problem. Here is one of the errors: Output from boost directory: |
@traverbrad |
So this is what I found: |
That's part of the Makefile, right? The variable BOOST_LDFLAGS should point to the directory where the boost library files are. Also check that the Makefile actually passes the variable BOOST_LDFLAGS on to the compiler. |
Correct, it is part of the makefile. BOOST_LDFLAGS points to the correct place. So digging through the Makfile, AM_LDFLAGS gets BOOST_LDFLAGS, CXXLINK gets AM_LDFLAGS (among other things), LINK gets AM_LDFLAGS (among other things). These are the things I found that use the CXXLINK variable: mkdssp$(EXEEXT): mkhssp$(EXEEXT): test_conv$(EXEEXT): test_fasta$(EXEEXT): test_readpdb$(EXEEXT): |
So let me summarize everything:
Am I correct? Then the last thing I can think of is that the -lboost_* arguments are missing from $(mkhssp_LDADD) variable. That could explain the undefined references. Could you also check the LDADD variables in the makefile? |
|
So the value of shared_LDADD is important. It may point to other variables, but it should (indirectly) include the -lboost_* arguments. Could you check that? |
This is what shared_LDADD points to: |
I presume the variables like $(BOOST_DATE_TIME_LIB) simply have values like -lboost_date_time. So the boost libraries are included, but maybe not all of them. What undefined reference errors are you getting when compiling? |
Here are some of the undefined reference errors: |
Are you only getting undefined references from boost/program_options ? If so, then the value of $(BOOST_PROGRAM_OPTIONS_LIB) might be important. It should be -lboost_program_options and in /cm/local/apps/boost/1.68.0.a/lib64 there should be a file named "libboost_program_options.so" or "libboost_program_options.a". |
My apologies for the late reply. I am only getting undefined reference errors from the boost libraries. BOOST_PROGRAM_OPTIONS_LIB is set to -lboost_program_options |
Thus the -lboost_program_options flag is set and it points to a file in /cm/local/apps/boost/1.68.0.a/lib64/, otherwise you'd get a different error. This means that the libboost_program_options.so or libboost_program_options.a in your directory does not contain the required symbols. I don't really know why the symbols are not in that file. Perhaps lib64 is the wrong architecture. What might work is manually building the latest boost and configuring your hssp build to use that boost version instead. |
So I've built the latest version of Boost (1.72). XSSP is configuring properly but I'm getting errors when running make again. These are two of the errors I'm getting: /bin/ld: warning: libboost_chrono.so.1.72.0, needed by /home/export/apps/xssp/boost_1_72_0/build/lib/libboost_timer.so, not found (try using -rpath or -rpath-link) /usr/include/boost/regex/v4/perl_matcher_non_recursive.hpp:1117: undefined reference to For the first error, I checked and libboost_chrono.so.1.72.0 is present. This is the command I used to configure: ./configure --with-boost-libdir=/home/export/apps/xssp/boost_1_72_0/build/lib CC=mpicc CXX=mpicxx |
@traverbrad I did what you did and got the same errors. I was able to solve the libboost_chrono problem by adding the boost lib directory to the library path:
My guess is that the second problem is caused by using the wrong boost headers: /usr/include/boost/ instead of /home/export/apps/xssp/boost_1_72_0/build/include. I fixed it by using --with-boost instead:
Then I ran make clean and then make. I hope this fixes it for you also. |
I did what you suggested and I'm now getting these errors: /home/export/apps/xssp/boost_1_72_0/build/include/boost/iostreams/detail/functional.hpp:41:93: error: extra ‘;’ [-Werror=pedantic] Is it possible that Boost 1.72 is too new? |
@traverbrad I repeated the hssp build with boost 1.72. This worked fine for me. In your error message I see that the error occurs within the boost header itself, not in the hssp code. Unfortunately, my knowledge about the boost library is not sufficient to say anything about this error. I think you should open a new issue about this in the boost repository: Perhaps those people can help you further. |
Same problem here, do you have it solved? I manually change the '-Werror' to '-Wall' in Makefile and fix the /home/export/apps/xssp/boost_1_72_0/build/include/boost/iostreams/detail/functional.hpp:41:93: error: extra ‘;’ [-Werror=pedantic] |
I had similar problems compiling with boost/1.62. I was able to compile the program by adding the following to the Makefile's variable AM_CPPFLAGS:
|
I get the following errors when I try to run make:
/usr/include/boost/range/begin.hpp:49:24: error: ‘const struct boost::sub_match<__gnu_cxx::__normal_iterator<const char*, std::basic_string > >’ has no member named ‘begin’
/usr/include/boost/range/end.hpp:50:26: error: ‘const struct boost::sub_match<__gnu_cxx::__normal_iterator<const char*, std::basic_string > >’ has no member named ‘end’
The configure command I used is ./configure --with-boost-libdir=/usr/lib64
The text was updated successfully, but these errors were encountered: