SuperNEMO-DBD / homebrew-cadfael

Instructions on using/installing the SuperNEMO Software are now at: https://github.com/SuperNEMO-DBD/brew
MIT License
2 stars 1 forks source link

Boost 1.60.0 fails to install and build #8

Closed goliviero closed 8 years ago

goliviero commented 8 years ago

Hi, I wanted to update my Cadfael and install the version 1.60.0 of Boost (required for Bayeux and Falaise 2.1.0). So i use : brew reinstall boost -devel --c++11 -with-icu4c as you said in an email (3rd june) I just copy here where the error may come from :

"ar"  rc "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/libboost_test_exec_monitor-mt.a" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/compiler_log_formatter.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/debug.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/decorator.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/execution_monitor.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/framework.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/plain_report_formatter.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/progress_monitor.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/results_collector.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/results_reporter.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/test_main.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/test_tools.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/test_tree.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/unit_test_log.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/unit_test_main.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/unit_test_monitor.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/unit_test_parameters.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/xml_log_formatter.o" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/xml_report_formatter.o" 
"ranlib" "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/libboost_test_exec_monitor-mt.a" 
common.copy /home/goliviero/software/Cadfaelbrew/cadfaelbrew/Cellar/boost/1.60.0/lib/libboost_test_exec_monitor-mt.a
 cp "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/libboost_test_exec_monitor-mt.a"  "/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Cellar/boost/1.60.0/lib/libboost_test_exec_monitor-mt.a"
...failed updating 1 target...
...skipped 2 targets...
...updated 12545 targets...
/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /home/goliviero/software/Cadfaelbrew/cadfaelbrew/Library/Taps/homebrew/homebrew-core/Formula/glibc.rb
/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /home/goliviero/software/Cadfaelbrew/cadfaelbrew/Library/Taps/homebrew/homebrew-core/Formula/gcc.rb
/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Library/Homebrew/debrew.rb:11:in raise
BuildError: Failed executing: ./b2 --prefix=/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Cellar/boost/1.60.0 --libdir=/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Cellar/boost/1.60.0/lib -d2 -j4 --layout=tagged --user-config=user-config.jam install threading=multi link=shared cxxflags=-std=c++11
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:

If i choose to ignore the error, Boost built but i have error when i want to re-build my Bayeux :

-- Detecting CXX compile features - done`
`CMake Error at /home/goliviero/software/Cadfaelbrew/cadfaelbrew/lib/cmake/Boost-1.60.0``/BoostConfig.cmake:104 (message):`
`Boost component iostreams not found`
`Call Stack (most recent call first):`
  `source/CMakeLists.txt:28 (find_package)`
`-- Configuring incomplete, errors occurred!`
`See also "/home/goliviero/software/Bayeuxbrew/Bayeux-build/CMakeFiles/CMakeOutput.log". 

I don't know if the two errors are linked or not. Thanks for any suggestions. Cheers.

drbenmorgan commented 8 years ago

How many CPU cores (looks like 4?) and how much RAM do you have on the machine you're trying to build Boost on? I have seen issues when RAM per core drops below 1GB, so I would try dropping the number of parallel builds. That can be done via the HOMEBREW_MAKE_JOBS variable, so try:

$ brew update
$ HOMEBREW_MAKE_JOBS=2 brew reinstall boost --c++11 --with-icu4c

If that still fails, drop HOMEBREW_MAKE_JOBS to 1 and retry. If that fails, see the troubleshooting guide on how to create a Gist with logs of everything, and post that here.

goliviero commented 8 years ago

Yes, I have 4 CPU cores and 8 GB of RAM on my machine. I have the same issue with JOBS=2 and JOBS=1. My machine is : Linux pclin5 3.13.0-63-generic #103-Ubuntu SMP Fri Aug 14 21:42:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux I don't know if there is a problem but i am not root on my machine because it's a computer of the lab. It is weird because when i try : brew install supernemo-dbd/cadfael/boost after the "error", it replies that : Warning: supernemo-dbd/cadfael/boost-1.60.0 already installed. When i go to the lib file of cadfael and search for libboost i have these librairies:

libboost_atomic-mt.so                      libboost_log_setup-mt.so                   libboost_serialization-mt.so
libboost_atomic-mt.so.1.60.0               libboost_log_setup-mt.so.1.60.0            libboost_serialization-mt.so.1.60.0
libboost_chrono-mt.a                       libboost_math_c99f-mt.so                   libboost_signals-mt.so
libboost_chrono-mt.so                      libboost_math_c99f-mt.so.1.60.0            libboost_signals-mt.so.1.60.0
libboost_chrono-mt.so.1.60.0               libboost_math_c99l-mt.so                   libboost_system-mt.a
libboost_container-mt.so                   libboost_math_c99l-mt.so.1.60.0            libboost_system-mt.so
libboost_container-mt.so.1.60.0            libboost_math_c99-mt.so                    libboost_system-mt.so.1.60.0
libboost_context-mt.so                     libboost_math_c99-mt.so.1.60.0             libboost_test_exec_monitor-mt.a
libboost_context-mt.so.1.60.0              libboost_math_tr1f-mt.so                   libboost_thread-mt.so
libboost_coroutine-mt.so                   libboost_math_tr1f-mt.so.1.60.0            libboost_thread-mt.so.1.60.0
libboost_coroutine-mt.so.1.60.0            libboost_math_tr1l-mt.so                   libboost_timer-mt.a
libboost_date_time-mt.so                   libboost_math_tr1l-mt.so.1.60.0            libboost_timer-mt.so
libboost_date_time-mt.so.1.60.0            libboost_math_tr1-mt.so                    libboost_timer-mt.so.1.60.0
libboost_exception-mt.a                    libboost_math_tr1-mt.so.1.60.0             libboost_type_erasure-mt.so
libboost_filesystem-mt.so                  libboost_prg_exec_monitor-mt.so            libboost_type_erasure-mt.so.1.60.0
libboost_filesystem-mt.so.1.60.0           libboost_prg_exec_monitor-mt.so.1.60.0     libboost_unit_test_framework-mt.so
libboost_graph-mt.so                       libboost_program_options-mt.so             libboost_unit_test_framework-mt.so.1.60.0
libboost_graph-mt.so.1.60.0                libboost_program_options-mt.so.1.60.0      libboost_wave-mt.so
libboost_locale-mt.so                      libboost_random-mt.so                      libboost_wave-mt.so.1.60.0
libboost_locale-mt.so.1.60.0               libboost_random-mt.so.1.60.0               libboost_wserialization-mt.so
libboost_log-mt.so                         libboost_regex-mt.so                       libboost_wserialization-mt.so.1.60.0
libboost_log-mt.so.1.60.0                  libboost_regex-mt.so.1.60.0 

The library of boost : iostreams is missing and it's the error when i try to compile Bayeux. I just show that to Francois who told me to show you that.

However, the command : brew gist-logs boost takes a very long time on my machine (~ 30 minutes) and it still running at the moment.

drbenmorgan commented 8 years ago

If the gist logs doesn't work, another way to get a log of what's happening is to do

$ HOMEBREW_MAKE_JOBS=1 brew reinstall -vd boost --c++11 --with-icu4c

The -vd options will be verbose and ask to raise/drop you to a shell when the error occurs. The verbose output and single build thread mean that the actual error message should be near the end of the output. Simply scroll up and see what it says.

goliviero commented 8 years ago

The error seems to be that :

cp "bin.v2/libs/test/build/gcc-4.9.3/release/link-static/threading-multi/libboost_test_exec_monitor-mt.a"  "/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Cellar/boost/1.60.0/lib/libboost_test_exec_monitor-mt.a"

...failed updating 1 target...
...skipped 2 targets...
...updated 12555 targets...
/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: ./b2 --prefix=/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Cellar/boost/1.60.0 --libdir=/home/goliviero/software/Cadfaelbrew/cadfaelbrew/Cellar/boost/1.60.0/lib -d2 -j1 --layout=tagged --user-config=user-config.jam install threading=multi link=shared cxxflags=-std=c++11
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 

I saved all the log into a file (~7MB) if it's necessary.

drbenmorgan commented 8 years ago

Yes, please attach - that doesn't show the actual error

goliviero commented 8 years ago

Ok, here the file :

log.txt

drbenmorgan commented 8 years ago

Thanks - the error is actually due to the bzip2 library:

   "/home/goliviero/software/Cadfaelbrew/cadfaelbrew/bin/g++-4.9"    -o "bin.v2/libs/iostreams/build/gcc-4.9.3/release/threading-multi/libboost_iostreams-mt.so.1.60.0" -Wl,-h -Wl,libboost_iostreams-mt.so.1.60.0 -shared -Wl,--start-group "bin.v2/libs/iostreams/build/gcc-4.9.3/release/threading-multi/file_descriptor.o" "bin.v2/libs/iostreams/build/gcc-4.9.3/release/threading-multi/mapped_file.o" "bin.v2/libs/iostreams/build/gcc-4.9.3/release/threading-multi/bzip2.o" "bin.v2/libs/iostreams/build/gcc-4.9.3/release/threading-multi/gzip.o" "bin.v2/libs/iostreams/build/gcc-4.9.3/release/threading-multi/zlib.o"  -Wl,-Bstatic  -Wl,-Bdynamic -lbz2 -lz -lrt -Wl,--end-group -pthread -m64 

/usr/bin/ld: /home/goliviero/software/Cadfaelbrew/cadfaelbrew/lib/../lib64/libbz2.a(bzlib.o): réadressage de R_X86_64_32S en vertu de « BZ2_crc32Table » ne peut être utilisé lors de la création d'un objet partagé; recompilez avec -fPIC
/home/goliviero/software/Cadfaelbrew/cadfaelbrew/lib/../lib64/libbz2.a: error adding symbols: Mauvaise valeur
collect2: error: ld returned 1 exit status
...failed gcc.link.dll bin.v2/libs/iostreams/build/gcc-4.9.3/release/threading-multi/libboost_iostreams-mt.so.1.60.0...

It should be trying to link to the dynamic version of libbz2, i.e. libbz2.so at /home/goliviero/software/Cadfaelbrew/cadfaelbrew/lib/../lib64/libbz2.so.

Could you check that you have this file, and if not, try reinstalling bzip2, i.e

$ brew update
$ brew reinstall bzip2

Then double check you have the .so file and try reinstalling boost.

goliviero commented 8 years ago

I don't have the libbz2.so files. Neither in lib and lib64. I just have libbz2.a. If i do : $ brew reinstall bzip2, files .so are still missing. I had to do : $ brew uninstall bzip2 then $ brew install bzip2 to see the .so files appear in /lib/ and /lib64/. Boost is actually running. I'll keep you informed if my problem is solved or not.

goliviero commented 8 years ago

Ok it seems good, the error is gone and Bayeux compiles without the error. Thank you very much Ben.