Skip to content
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 error while running make #119

Closed
supernova4869 opened this issue Nov 3, 2019 · 23 comments
Closed

Boost error while running make #119

supernova4869 opened this issue Nov 3, 2019 · 23 comments

Comments

@supernova4869
Copy link

I tried to install dssp on Cent OS 7. I got the error while running make:

match_flag_type = boost::regex_constants::_match_flags]’
src/hssp-convert-3to1.cpp:698:90:   required from here
/usr/include/boost/range/end.hpp:50:26: error: ‘const struct boost::sub_match<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >’ has no member named ‘end’
             return c.end();
                          ^
make[1]: *** [src/hssp-convert-3to1.o] Error 1
make[1]: Leaving directory `/home/supernova/Downloads/xssp-3.0.10'
make: *** [all] Error 2

I have tried the methods mentioned in #118 , downloaded boost 1.71.0 and installed to $Home/boost and configured with --with-boost=$HOME/boost and make -L, but it still did not work and yet reported another error:

                 from /home/supernova/boost/include/boost/iostreams/chain.hpp:34,
                 from /home/supernova/boost/include/boost/iostreams/copy.hpp:28,
                 from src/hssp-convert-3to1.cpp:19:
/home/supernova/boost/include/boost/iostreams/detail/adapter/concept_adapter.hpp:121:79: error: extra ‘;’ [-Werror=pedantic]
     BOOST_DELETED_FUNCTION(concept_adapter& operator=(const concept_adapter&));
                                                                               ^
cc1plus: all warnings being treated as errors
make[1]: *** [src/hssp-convert-3to1.o] Error 1
make[1]: Leaving directory `/home/supernova/Downloads/xssp-3.0.10'
make: *** [all] Error 2

Seems the hpp file was somewhere misworking.
:(

@supernova4869
Copy link
Author

I have updated gcc to 9.2.0 and still compile error exists. Error in $HOME/boost/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp.23, extra ";"

@cbaakman
Copy link
Contributor

cbaakman commented Nov 5, 2019

I have put a new release online:
https://github.com/cmbi/xssp/releases/tag/3.0.11

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.

@supernova4869
Copy link
Author

Thank you! I'll try.

@Moefuru
Copy link

Moefuru commented Nov 11, 2019

I tried to use the --with-boost path, but I still get an error.
Src/hssp-convert-3to1.cpp:698:90: required from here
/usr/include/boost/range/end.hpp:50:26: Error: 'const struct boost::sub_match<__gnu_cxx::__normal_iterator<const char*, std::basic_string > >'No name' Member of end'
              Return c.end();
                           ^
Make[1]: *** [src/hssp-convert-3to1.o] Error 1
Make[1]: Leave the directory "/mnt/download/hssp-3.1.0"
Make: *** [all] error 2

@Eatiler
Copy link

Eatiler commented Nov 11, 2019

I also encountered this problem, and tried the 3.0.11 version and did not solve it.

@cbaakman
Copy link
Contributor

That's odd! The compiler points to "/usr/include/boost/range/end.hpp".

What argument did you specify with the "--with-boost" option?

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

I am using
This is the content after configure is completed../configure --with-boost=/usr/include/boost --with-boost-libdir=/usr/local/lib/

Configure: creating ./config.status
Config.status: creating Makefile
Config.status: creating config.h
Config.status: executing depfiles commands

But when I make the same error as above, I try to update my boost, then make but it seems to be unsuccessful and can't make install

mv -f $depbase.Tpo $depbase.Po
g++  -g -O2 -L/usr/local/lib/    -o test_readpdb src/fasta.o src/iocif.o src/mas.o src/primitives-3d.o src/structure.o src/utils.o tests/test_readpdb.o -lboost_date_time -lboost_filesystem -lboost_iostreams -lboost_program_options -lboost_regex -lboost_system -lboost_thread -lpthread -lboost_unit_test_framework 
Make[1]: Leave the directory "/mnt/download/hssp-3.1.0"
[root@localhost hssp-3.1.0]# sudo make install
Make install-am
Make[1]: Go to the directory "/mnt/download/hssp-3.1.0"
Make[2]: Go to the directory "/mnt/download/hssp-3.1.0"
 /bin/mkdir -p '/usr/local/bin'
  /bin/install -c mkhssp hsspconv test_fasta test_conv test_readpdb '/usr/local/bin'
Make[2]: No need to do anything with "install-data-am".
Make[2]: Leave the directory "/mnt/download/hssp-3.1.0"
Make[1]: Leave the directory "/mnt/download/hssp-3.1.0"
[root@localhost hssp-3.1.0]# ./mkdssp
-bash: ./mkdssp: no such file or directory
[root@localhost hssp-3.1.0]# make mkdssp
Make: *** There is no rule to create the target "mkdssp". stop.
[root@localhost hssp-3.1.0]# make install
Make install-am
Make[1]: Go to the directory "/mnt/download/hssp-3.1.0"
Make[2]: Go to the directory "/mnt/download/hssp-3.1.0"
 /bin/mkdir -p '/usr/local/bin'
  /bin/install -c mkhssp hsspconv test_fasta test_conv test_readpdb '/usr/local/bin'
Make[2]: No need to do anything with "install-data-am".
Make[2]: Leave the directory "/mnt/download/hssp-3.1.0"
Make[1]: Leave the directory "/mnt/download/hssp-3.1.0"

@cbaakman
Copy link
Contributor

@Moefuru you don't need to include the "--with-boost" argument if your boost is installed at the default location. Did you still get the same error after reinstalling boost with the default settings?

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

I got the error using the default settings, in configure

checking for exit in -lboost_thread-mt... no
configure: error: Could not link against boost_thread-mt !

@cbaakman
Copy link
Contributor

cbaakman commented Nov 12, 2019

Ah! That error is different from the previous one. It's caused by the fact that your --with-boost points to the default installation at '/usr/' and your --with-boost-libdir points to libraries installed under '/usr/local/'. These versions might not be the same.

Try running without any arguments first, so that the configure script uses only one version of the library. See how that works out. If you get a new error, tell me!

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

The above command has not been carried with any parameters.

@cbaakman
Copy link
Contributor

OK then, I need you to tell me what is in the file "/etc/ld.so.conf" and what files are under "/etc/ld.so.conf.d/". This tells me where your default library location is.

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

This is the file content and the files under the directory.
image
image

@cbaakman
Copy link
Contributor

OK, what's in the files dyinst-x86_64.conf and kernel-3.10.0-957.el7.x86_64.conf ?

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

image
image

@cbaakman
Copy link
Contributor

OK, thank you! Unfortunately, none of these files contain a default library path. So I still don't know where the boost libraries are installed on your machine. I need you to provide more details. What commands did you use to install boost? Was it yum?

We're basically looking for a file named libboost_thread-mt.so, but it has to be the right version.

Commands that might help finding the boost libraries:

find / -name 'libboost_*' | grep so

(takes a lot of time)

locate boost | grep so

(requires a database update)

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

This is some file information about boost, I hope it is useful.

[root@localhost hssp-3.1.0]# find / -name libboost_random.so*
/root/anaconda2/pkgs/libboost-1.67.0-h46d08c1_4/lib/libboost_random.so.1.67.0
/root/anaconda2/pkgs/libboost-1.67.0-h46d08c1_4/lib/libboost_random.so
/root/anaconda2/pkgs/boost-cpp-1.68.0-h11c811c_1000/lib/libboost_random.so.1.68.0
/root/anaconda2/pkgs/boost-cpp-1.68.0-h11c811c_1000/lib/libboost_random.so
/root/anaconda2/envs/my-rdkit-env/lib/libboost_random.so
/root/anaconda2/envs/my-rdkit-env/lib/libboost_random.so.1.67.0
/root/anaconda2/lib/libboost_random.so
/root/anaconda2/lib/libboost_random.so.1.67.0
/root/anaconda2/lib/libboost_random.so.1.68.0
/usr/lib/libboost_random.so.1.71.0
/usr/lib/libboost_random.so.1
/usr/lib/libboost_random.so
/usr/lib/libboost_random.so.1.71
/usr/lib64/libboost_random.so.1.53.0
/usr/local/lib/libboost_random.so.1.71.0
/usr/local/lib/libboost_random.so
/usr/local/lib/libboost_random.so.1
/usr/local/lib/libboost_random.so.1.71
/mnt/download/boost_1_71_0/stage/lib/libboost_random.so.1.71.0
/mnt/download/boost_1_71_0/stage/lib/libboost_random.so.1
/mnt/download/boost_1_71_0/stage/lib/libboost_random.so.1.71
/mnt/download/boost_1_71_0/stage/lib/libboost_random.so
/mnt/download/boost_1_71_0/bin.v2/libs/random/build/gcc-4.8.5/release/threading-multi/visibility-hidden/libboost_random.so.1.71.0

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

I used to install boost with yum, but it seems that I can't solve the problem. So I compiled and installed the latest version.
I tried to go back to the first error when performing these operations on another machine using the yum installed boost.

@cbaakman
Copy link
Contributor

I see, you have a lot of different versions of boost installed. I presume 1.71.0 was the last version you installed?

I think we need to manually tell the system that libraries can be found under '/usr/lib/'. We can do that by creating a file named "/etc/ld.so.conf.d/usr.conf", with contents "/usr/lib".

To be safe, you'd better also remove the other versions of boost you installed. Especially the one under /usr/local/lib.

Then run 'ldconfig'.

This should automatically tell the configure script where to find the boost include files under /usr/include/boost and the library files under /usr/lib/.

@Moefuru
Copy link

Moefuru commented Nov 12, 2019

Thank you! I'll try.

@cbaakman
Copy link
Contributor

@supernovaZhangJiaXing
Is your problem still ocuring with the latest release of hssp?

@supernova4869
Copy link
Author

@supernovaZhangJiaXing
Is your problem still ocuring with the latest release of hssp?

Sorry, I did not follow this issue after that. In fact, my friend gave me a statically compiled dssp that day, so I did not try to compile it later.

@Moefuru
Copy link

Moefuru commented Nov 25, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants