configure: error: Boost development files not found
Hi, this is an installation problem. To clarify, I was able to install boost 1.82 and QuantLib 1.33 on another Linux environment, and developed a program in that environment. Now I wish to deploy it in an older Linux environment (RedHat 7.9 with gcc 4.8.5, if this is relevant). However, I could not get the installation done using the same process as the other (newer) environment.
Here is what I did. I need to install both boost and quantlib without requirement of root permission, so some specifications were made.
- Download both boost 1.82 and ql 1.33. Let's say I unzip them in
/.../download/boost182and/.../download/ql133. - (install boost) cd into
/.../install_files/boost182, and run./bootstrap.sh --prefix=/.../install/boost182 --with-python=/usr/bin/python3.6 - (install boost) same directory, run
./b2 install. This installs boost into/.../install/boost182, and the installation process finished without any failed updates. Now that directory looks like this:
-boost182
--include
--lib
I have included the result of printing out the entire tree of boost182 in a txt file. You can check whether I have specific header/binaries.
boost_tree.txt
4. (install quantlib) cd into /.../download/ql133. Run ./configure --with-boost-include=/.../install/boost182/include --prefix=/.../install/quantlib133. At this point, the error in the title occrus. Here is the full log.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '6935' is supported by ustar format... yes
checking whether GID '10' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for gawk... (cached) gawk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... -std=gnu11
checking whether gcc -std=gnu11 understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc -std=gnu11... gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... -std=gnu++11
checking dependency style of g++ -std=gnu++11... gcc3
checking how to run the C preprocessor... gcc -std=gnu11 -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu11... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu11 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu11 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu11 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu11 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu11 static flag -static works... no
checking if gcc -std=gnu11 supports -c -o file.o... yes
checking if gcc -std=gnu11 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu11 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking for ld used by g++ -std=gnu++11... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ -std=gnu++11 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ -std=gnu++11 option to produce PIC... -fPIC -DPIC
checking if g++ -std=gnu++11 PIC flag -fPIC -DPIC works... yes
checking if g++ -std=gnu++11 static flag -static works... no
checking if g++ -std=gnu++11 supports -c -o file.o... yes
checking if g++ -std=gnu++11 supports -c -o file.o... (cached) yes
checking whether the g++ -std=gnu++11 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for C++14 support... no: adding -std=c++14 to CXXFLAGS
checking if g++ -std=gnu++11 supports --system-header-prefix... no
checking for Boost development files... no
configure: error: Boost development files not found
I would appreciate any help on how to debug this. Thank you.
Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.
If you look at config.log in the directory where you ran configure, it will have more information including the command line executed during the failed check. It might help determining the problem.
According to https://gcc.gnu.org/projects/cxx-status.html GCC 4.8.5 does not support C++14, which QuantLib 1.33 requires, so you should update your compiler (e.g. from Red Hat Software Collections).
I checked config.log and it does seem like it is using c++ 14 when looking for boost development files, so I assume that's the issue (can't test it out right now because updating gcc requires some days to ask for permission). However, we have also found a workaround and no longer needs to compile on the old environment, so I will close this issue. Thank you for all your comments.