Building boost 1_70_0 with PGI 18.5 on CentOS 7
Hi, I am having trouble building Boost 1_70_0 with PGI 18.5 on a Linux CentOS 7 system, and I am wondering if anyone has suggestions about how to get it working. I spent some time searching online for answers, but didn’t find anything recent that applied to my problem. I am a novice with boost, and so am not sure where to start digging for solutions. I have no issues with GCC or Intel compilers. My procedure, after I untar and cd into the boost directory, is as follows: ./bootstrap.sh --with-toolset=pgi —prefix=/path/to/install/boost export BUILD_TYPE=complete export LIBRARY_NAME=versioned export LIBRARY_TARGETS=shared,static ./b2 -j 12 install --build-type=${BUILD_TYPE} --layout=${LIBRARY_NAME} --target=${LIBRARY_TARGETS} This procedure appears to work fine for the intel-linux and gcc toolsets. But, for pgi, I get this: ==================================== +./bootstrap.sh --with-toolset=pgi --prefix=/path/to/install/boost Building Boost.Build engine with toolset pgi... tools/build/src/engine/bin.linuxx86_64/b2 Detecting Python version... 2.7 Detecting Python root... /usr Unicode/ICU support for Boost.Regex?... /usr Generating Boost.Build configuration in project-config.jam for pgi... Bootstrapping is done. To build, run: ./b2 To generate header files, run: ./b2 headers To adjust configuration, edit 'project-config.jam'. Further information: - Command line help: ./b2 --help - Getting started guide: http://www.boost.org/more/getting_started/unix-variants.html - Boost.Build documentation: http://www.boost.org/build/ + export BUILD_TYPE=complete + BUILD_TYPE=complete + export LIBRARY_NAME=versioned + LIBRARY_NAME=versioned + export LIBRARY_TARGETS=shared,static + LIBRARY_TARGETS=shared,static + ./b2 -j 12 install --build-type=complete --layout=versioned --target=shared,static Performing configuration checks - default address-model : none - default architecture : none /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/build/boost/1.70.0/pgi/18.5/tools/build/src/tools/common.jam:977: in toolset-tag *** argument error * rule numbers.less ( n1 n2 ) * called with: ( 4 ) * missing argument n2 ==================================== Based on some suggestions I found online from others having similar errors, I edited tools/build/src/tools/common.jam to comment out these lines (977-980): # From GCC 5, versioning changes and minor becomes patch # if $(tag) = gcc && [ numbers.less 4 $(version[1]) ] # { # version = $(version[1]) ; # } This results in the following failure, which I’ve truncated because it’s really long: ==================================== + ./bootstrap.sh --with-toolset=pgi --prefix=/scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/boost/1.70.0/pgi/18.5 Building Boost.Build engine with toolset pgi... tools/build/src/engine/bin.linuxx86_64/b2 Detecting Python version... 2.7 Detecting Python root... /usr Unicode/ICU support for Boost.Regex?... /usr Generating Boost.Build configuration in project-config.jam for pgi... Bootstrapping is done. To build, run: ./b2 To generate header files, run: ./b2 headers To adjust configuration, edit 'project-config.jam'. Further information: - Command line help: ./b2 --help - Getting started guide: http://www.boost.org/more/getting_started/unix-variants.html - Boost.Build documentation: http://www.boost.org/build/ + export BUILD_TYPE=complete + BUILD_TYPE=complete + export LIBRARY_NAME=versioned + LIBRARY_NAME=versioned + export LIBRARY_TARGETS=shared,static + LIBRARY_TARGETS=shared,static + ./b2 -j 12 install --build-type=complete --layout=versioned --target=shared,static Performing configuration checks - default address-model : none - default architecture : none error: No best alternative for libs/context/build/asm_sources next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>qcc not matched next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>mach-o <threading>multi <toolset>clang not matched next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>mach-o <threading>multi <toolset>darwin not matched next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>pe <threading>multi <toolset>msvc not matched next alternative: required properties: <abi>aapcs <address-model>64 <architecture>arm <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>aapcs <address-model>64 <architecture>arm <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>aapcs <address-model>64 <architecture>arm <binary-format>mach-o <threading>multi <toolset>clang not matched next alternative: required properties: <abi>aapcs <address-model>64 <architecture>arm <binary-format>mach-o <threading>multi <toolset>darwin not matched next alternative: required properties: <abi>o32 <address-model>32 <architecture>mips1 <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>o32 <address-model>32 <architecture>mips1 <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>n64 <address-model>64 <architecture>mips1 <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>n64 <address-model>64 <architecture>mips1 <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>power <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>power <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>power <binary-format>mach-o <threading>multi <toolset>darwin not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>power <binary-format>xcoff <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>power <binary-format>xcoff <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>power <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>power <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>power <binary-format>mach-o <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>power <binary-format>mach-o <threading>multi <toolset>darwin not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>power <binary-format>xcoff <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>power <binary-format>xcoff <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>sysv <address-model>32_64 <architecture>power <binary-format>mach-o <threading>multi not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>x86 <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>x86 <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>x86 <binary-format>elf <threading>multi <toolset>intel not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>x86 <binary-format>mach-o <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>32 <architecture>x86 <binary-format>mach-o <threading>multi <toolset>darwin not matched next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <threading>multi <toolset>clang not matched next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <threading>multi <toolset>clang-win not matched next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <threading>multi <toolset>intel not matched next alternative: required properties: <abi>ms <address-model>32 <architecture>x86 <binary-format>pe <threading>multi <toolset>msvc not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>x86 <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>x86 <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>x86 <binary-format>elf <threading>multi <toolset>intel not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>x86 <binary-format>mach-o <threading>multi <toolset>clang not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>x86 <binary-format>mach-o <threading>multi <toolset>darwin not matched next alternative: required properties: <abi>sysv <address-model>64 <architecture>x86 <binary-format>mach-o <threading>multi <toolset>intel not matched next alternative: required properties: <abi>ms <address-model>64 <architecture>x86 <binary-format>pe <threading>multi <toolset>clang not matched next alternative: required properties: <abi>ms <address-model>64 <architecture>x86 <binary-format>pe <threading>multi <toolset>clang-win not matched next alternative: required properties: <abi>ms <address-model>64 <architecture>x86 <binary-format>pe <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>ms <address-model>64 <architecture>x86 <binary-format>pe <threading>multi <toolset>intel not matched next alternative: required properties: <abi>ms <address-model>64 <architecture>x86 <binary-format>pe <threading>multi <toolset>msvc not matched next alternative: required properties: <abi>x32 <address-model>64 <architecture>x86 <binary-format>elf <threading>multi <toolset>clang not matched next alternative: required properties: <abi>x32 <address-model>64 <architecture>x86 <binary-format>elf <threading>multi <toolset>gcc not matched next alternative: required properties: <abi>x32 <address-model>64 <architecture>x86 <binary-format>elf <threading>multi <toolset>intel not matched next alternative: required properties: <abi>sysv <address-model>32_64 <architecture>x86 <binary-format>mach-o <threading>multi not matched next alternative: required properties: <abi>sysv <architecture>combined <binary-format>mach-o <threading>multi not matched - C++11 mutex : no - lockfree boost::atomic_flag : no - Boost.Config Feature Check: cxx11_auto_declarations : no - Boost.Config Feature Check: cxx11_constexpr : no - Boost.Config Feature Check: cxx11_defaulted_functions : no - Boost.Config Feature Check: cxx11_final : no - Boost.Config Feature Check: cxx11_hdr_mutex : no - Boost.Config Feature Check: cxx11_hdr_tuple : no - Boost.Config Feature Check: cxx11_lambdas : no - Boost.Config Feature Check: cxx11_noexcept : no - Boost.Config Feature Check: cxx11_nullptr : no - Boost.Config Feature Check: cxx11_rvalue_references : no - Boost.Config Feature Check: cxx11_template_aliases : no - Boost.Config Feature Check: cxx11_thread_local : no - Boost.Config Feature Check: cxx11_variadic_templates : no - has_icu builds : no warning: Graph library does not contain MPI-based parallel components. note: to enable them, add "using mpi ;" to your user-config.jam - zlib : no - bzip2 : no - lzma : no - zstd : no - iconv (libc) : no - iconv (separate) : no - icu : no - icu (lib64) : no - Boost.Locale needs either iconv or ICU library to be built. - Boost.Locale needs either iconv or ICU library to be built. - native-atomic-int32-supported : no - native-syslog-supported : no - pthread-supports-robust-mutexes : no - x86 : no - arm : no - mips1 : no - power : no - sparc : no - gcc visibility : no - long double support : no warning: skipping optional Message Passing Interface (MPI) library. note: to enable MPI support, add "using mpi ;" to user-config.jam. note: to suppress this message, pass "--without-mpi" to bjam. note: otherwise, you can safely ignore this message. - libbacktrace builds : no - addr2line builds : no - WinDbg builds : no - WinDbgCached builds : no - BOOST_COMP_GNUC >= 4.3.0 : no error: No best alternative for libs/context/build/asm_sources ### similar messages to the above repeat several times and I’ve left it out for clarity and length, then output continues below ### Component configuration: - atomic : building - chrono : building - container : building - context : building - contract : building - coroutine : building - date_time : building - exception : building - fiber : building - filesystem : building - graph : building - graph_parallel : building - headers : building - iostreams : building - locale : building - log : building - math : building - mpi : building - program_options : building - python : building - random : building - regex : building - serialization : building - stacktrace : building - system : building - test : building - thread : building - timer : building - type_erasure : building - wave : building ...patience... ...patience... ...patience... ...patience... ...patience... ...found 45809 targets... ...updating 17951 targets... gcc.compile.c++ bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/posix_api.o /bin/sh: line 1: -fvisibility-inlines-hidden: command not found -fvisibility-inlines-hidden -fPIC -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_REGEX_DYN_LINK=1 -I"." -c -o "bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/posix_api.o" "libs/regex/build/../src/posix_api.cpp" ...failed gcc.compile.c++ bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/posix_api.o... gcc.compile.c++ bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/c_regex_traits.o /bin/sh: line 1: -fvisibility-inlines-hidden: command not found -fvisibility-inlines-hidden -fPIC -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_REGEX_DYN_LINK=1 -I"." -c -o "bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/c_regex_traits.o" "libs/regex/build/../src/c_regex_traits.cpp" ...failed gcc.compile.c++ bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/c_regex_traits.o... gcc.compile.c++ bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/instances.o /bin/sh: line 1: -fvisibility-inlines-hidden: command not found -fvisibility-inlines-hidden -fPIC -pthread -O0 -fno-inline -Wall -g -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_REGEX_DYN_LINK=1 -I"." -c -o "bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/instances.o" "libs/regex/build/../src/instances.cpp" ==================================== Chris ----------------------------------------------------------------------------------------------------------- Christopher W. Harrop email: christopher.w.harrop@noaa.gov mailto:christopher.w.harrop@noaa.gov Global Systems Division voice: (303) 497-6808 tel:%28303%29%20497-6808 NOAA Earth System Research Laboratory fax: (303) 497-7259 tel:%28303%29%20497-7259 325 Broadway R/GSD2 Boulder, CO 80303
AMDG On 5/15/19 3:39 PM, Christopher Harrop - NOAA Affiliate via Boost-users wrote:
+./bootstrap.sh --with-toolset=pgi --prefix=/path/to/install/boost <snip> + ./b2 -j 12 install --build-type=complete --layout=versioned --target=shared,static
I think I know what the problem is. The pgi toolset inherits from gcc, but does it in a way that makes an unitialized gcc the default toolset. Try adding toolset=pgi the b2 command to work around this bug. Note that Boost.Context probably still won't build, because of its inherent non-portability.
Performing configuration checks
- default address-model : none - default architecture : none /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/build/boost/1.70.0/pgi/18.5/tools/build/src/tools/common.jam:977: in toolset-tag *** argument error * rule numbers.less ( n1 n2 ) * called with: ( 4 ) * missing argument n2
In Christ, Steven Watanabe
+./bootstrap.sh --with-toolset=pgi --prefix=/path/to/install/boost <snip> + ./b2 -j 12 install --build-type=complete --layout=versioned --target=shared,static
I think I know what the problem is. The pgi toolset inherits from gcc, but does it in a way that makes an unitialized gcc the default toolset. Try adding toolset=pgi the b2 command to work around this bug.
Note that Boost.Context probably still won't build, because of its inherent non-portability.
Thank you for pointing out the toolset property for b2. Adding that did indeed get me most of the way there. Now it gets this far: ====================== pgi.compile.c++ bin.v2/libs/contract/build/pgi/debug/threading-multi/contract.o pgi.link.dll bin.v2/libs/contract/build/pgi/debug/threading-multi/libboost_contract-mt-d-x64-1_70.so boost-install.generate-cmake-variant- /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/boost/1.70.0/pgi/18.5/lib/cmake/boost_contract-1.70.0/libboost_contract-variant-mt-d-x64-1_70-shared.cmake common.copy /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/boost/1.70.0/pgi/18.5/lib/libboost_contract-mt-d-x64-1_70.so pgi.compile.c++ bin.v2/libs/context/build/pgi/debug/threadapi-pthread/threading-multi/posix/stack_traits.o pgi.compile.c++ bin.v2/libs/coroutine/build/pgi/debug/threadapi-pthread/threading-multi/posix/stack_traits.o pgi.link.dll bin.v2/libs/context/build/pgi/debug/threadapi-pthread/threading-multi/libboost_context-mt-d-x64-1_70.so boost-install.generate-cmake-variant- /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/boost/1.70.0/pgi/18.5/lib/cmake/boost_context-1.70.0/libboost_context-variant-mt-d-x64-1_70-shared.cmake common.copy /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/boost/1.70.0/pgi/18.5/lib/libboost_context-mt-d-x64-1_70.so pgi.link.dll bin.v2/libs/coroutine/build/pgi/debug/threadapi-pthread/threading-multi/libboost_coroutine-mt-d-x64-1_70.so boost-install.generate-cmake-variant- /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/boost/1.70.0/pgi/18.5/lib/cmake/boost_coroutine-1.70.0/libboost_coroutine-variant-mt-d-x64-1_70-shared.cmake common.copy /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/opt/boost/1.70.0/pgi/18.5/lib/libboost_coroutine-mt-d-x64-1_70.so ...failed updating 15 targets... ...skipped 18 targets... ...updated 17850 targets… ====================== Not everything built, but I’m much closer. I did still get the "No best alternative for libs/context/build/asm_sources” and lots of "next alternative: required properties:…not matched” messages. I only saw warnings in the compile output, no errors. I’m not sure how to figure out what failed to build and what is missing: + export BUILD_TYPE=complete + BUILD_TYPE=complete + export LIBRARY_NAME=versioned + LIBRARY_NAME=versioned + export LIBRARY_TARGETS=shared,static + LIBRARY_TARGETS=shared,static + ./b2 -j 12 --build-type=complete --layout=versioned --target=shared,static toolset=pgi install Performing configuration checks - default address-model : 64-bit - default architecture : x86 error: No best alternative for libs/context/build/asm_sources next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>clang not matched ====================== Chris
Performing configuration checks
- default address-model : none - default architecture : none /scratch4/BMC/gsd-hpcs/Christopher.W.Harrop/bass-develop/build/boost/1.70.0/pgi/18.5/tools/build/src/tools/common.jam:977: in toolset-tag *** argument error * rule numbers.less ( n1 n2 ) * called with: ( 4 ) * missing argument n2
In Christ, Steven Watanabe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org https://lists.boost.org/mailman/listinfo.cgi/boost-users
On 16/05/2019 09:39, Christopher Harrop wrote:
I am having trouble building Boost 1_70_0 with PGI 18.5 on a Linux CentOS 7 system, and I am wondering if anyone has suggestions about how to get it working. I spent some time searching online for answers, but didn’t find anything recent that applied to my problem. I am a novice with boost, and so am not sure where to start digging for solutions. [...] Performing configuration checks
- default address-model : none - default architecture : none
It looks like the build didn't properly detect your address model and architecture. You can try either passing these on the b2 install command line (eg. address-model=32) or editing project-config.jam to insert or update them.
error: No best alternative for libs/context/build/asm_sources next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>clang not matched
If you provide values for those properties then this should go away, but if you're still having trouble and you don't need any of Boost.Context or Boost.Coroutine (and possibly also not Boost.Asio) then you can try building using --without-context to disable this library.
gcc.compile.c++ bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/posix_api.o /bin/sh: line 1: -fvisibility-inlines-hidden: command not found
This one seems a bit weird. I'm not familiar with the PGI compiler; does it just use gcc under the hood? If not, this seems suspicious. If it does use gcc under the hood, then maybe it needs an upgrade to a newer version. Make sure that you erase the build and stage directories (or use an entirely separate directory tree) when switching between different compilers, to reduce the chance that stray files from a previous build will confuse a subsequent build.
AMDG On 5/15/19 5:43 PM, Gavin Lambert via Boost-users wrote:
On 16/05/2019 09:39, Christopher Harrop wrote:
<snip> Performing configuration checks
- default address-model : none - default architecture : none
It looks like the build didn't properly detect your address model and architecture.
This is a side-effect of the bad toolset property.
You can try either passing these on the b2 install command line (eg. address-model=32) or editing project-config.jam to insert or update them.
error: No best alternative for libs/context/build/asm_sources next alternative: required properties: <abi>aapcs <address-model>32 <architecture>arm <binary-format>elf <threading>multi <toolset>clang not matched
If you provide values for those properties then this should go away, but if you're still having trouble and you don't need any of Boost.Context or Boost.Coroutine (and possibly also not Boost.Asio) then you can try building using --without-context to disable this library.
gcc.compile.c++ bin.v2/libs/regex/build/gcc/debug/threading-multi/visibility-hidden/posix_api.o
/bin/sh: line 1: -fvisibility-inlines-hidden: command not found
This one seems a bit weird. I'm not familiar with the PGI compiler; does it just use gcc under the hood? If not, this seems suspicious.
It's wrong. Even when a Boost.Build toolset inherits from another toolset, it still gets its own name. In Christ, Steven Watanabe
participants (3)
-
Christopher Harrop - NOAA Affiliate
-
Gavin Lambert
-
Steven Watanabe