I want to install boost, static libs and also universal - x64 and arm for both M1 and Intel support.
trying to build boost for mac os using sudo port install boost181 +universal -no_static
results in
:info:build notice: [zstd] Condition
:info:build notice: [locale] ICU path set to /opt/local
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/feature.jam:491: in feature.validate-value-string from module feature
:info:build error: "combined" is not a known value of feature <architecture>
:info:build error: legal values: "x86" "ia64" "sparc" "power" "loongarch" "mips" "mips1" "mips2" "mips3" "mips4" "mips32" "mips32r2" "mips64" "parisc" "arm" "riscv" "s390x" "arm+x86"
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/property.jam:337: in validate1 from module property
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/property.jam:363: in property.validate from module property
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/build-request.jam:286: in convert-command-line-element from module build-request
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/build-request.jam:222: in build-request.convert-command-line-elements from module build-request
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build-system.jam:774: in load from module build-system
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/kernel/modules.jam:294: in import from module modules
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/kernel/bootstrap.jam:135: in module scope from module
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0" && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/b2 -d2 --layout=tagged --debug-configuration --user-config=user-config.jam -sBZIP2_INCLUDE=/opt/local/include -sBZIP2_LIBPATH=/opt/local/lib -sEXPAT_INCLUDE=/opt/local/include -sEXPAT_LIBPATH=/opt/local/lib -sZLIB_INCLUDE=/opt/local/include -sZLIB_LIBPATH=/opt/local/lib -sICU_PATH=/opt/local variant=release link=static,shared runtime-link=shared -j9 --no-cmake-config threading=multi pch=off address-model=64 architecture=combined
:info:build Exit code: 1
:error:build Failed to build boost181: command execution failed
:debug:build Error code: CHILDSTATUS 24008 1
:debug:build Backtrace: command execution failed
:debug:build while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build (procedure "portbuild::build_main" line 8)
:debug:build invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/main.log for details.
anyone know the issue / ran into this before?
I think
:info:build error: "combined" is not a known value of feature <architecture>
:info:build error: legal values: "x86" "ia64" "sparc" "power" "loongarch" "mips" "mips1" "mips2" "mips3" "mips4" "mips32" "mips32r2" "mips64" "parisc" "arm" "riscv" "s390x" "arm+x86"
relates to the +universal flag
it looks like arm+x86 is what I want
I also tried to install boost statically using: sudo port install boost176 +universal -no_static +no_single
But, after installations, the only .a I get are
ls /opt/local/lib/libboost_*.a
/opt/local/lib/libboost_exception-mt.a /opt/local/lib/libboost_test_exec_monitor-mt.a
Related
trying to build boost for mac os using sudo port install boost181 +universal -no_static
results in
:info:build notice: [zstd] Condition
:info:build notice: [locale] ICU path set to /opt/local
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/feature.jam:491: in feature.validate-value-string from module feature
:info:build error: "combined" is not a known value of feature <architecture>
:info:build error: legal values: "x86" "ia64" "sparc" "power" "loongarch" "mips" "mips1" "mips2" "mips3" "mips4" "mips32" "mips32r2" "mips64" "parisc" "arm" "riscv" "s390x" "arm+x86"
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/property.jam:337: in validate1 from module property
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/property.jam:363: in property.validate from module property
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/build-request.jam:286: in convert-command-line-element from module build-request
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build/build-request.jam:222: in build-request.convert-command-line-elements from module build-request
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/build-system.jam:774: in load from module build-system
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/kernel/modules.jam:294: in import from module modules
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/tools/build/src/kernel/bootstrap.jam:135: in module scope from module
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0" && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/work/boost_1_81_0/b2 -d2 --layout=tagged --debug-configuration --user-config=user-config.jam -sBZIP2_INCLUDE=/opt/local/include -sBZIP2_LIBPATH=/opt/local/lib -sEXPAT_INCLUDE=/opt/local/include -sEXPAT_LIBPATH=/opt/local/lib -sZLIB_INCLUDE=/opt/local/include -sZLIB_LIBPATH=/opt/local/lib -sICU_PATH=/opt/local variant=release link=static,shared runtime-link=shared -j9 --no-cmake-config threading=multi pch=off address-model=64 architecture=combined
:info:build Exit code: 1
:error:build Failed to build boost181: command execution failed
:debug:build Error code: CHILDSTATUS 24008 1
:debug:build Backtrace: command execution failed
:debug:build while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build (procedure "portbuild::build_main" line 8)
:debug:build invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost181/boost181/main.log for details.
anyone know the issue / ran into this before?
I think
:info:build error: "combined" is not a known value of feature <architecture>
:info:build error: legal values: "x86" "ia64" "sparc" "power" "loongarch" "mips" "mips1" "mips2" "mips3" "mips4" "mips32" "mips32r2" "mips64" "parisc" "arm" "riscv" "s390x" "arm+x86"
relates to the +universal flag
it looks like arm+x86 is what I want
I also tried to install boost statically using: sudo port install boost176 +universal -no_static +no_single
But, after installations, the only .a I get are
ls /opt/local/lib/libboost_*.a
/opt/local/lib/libboost_exception-mt.a /opt/local/lib/libboost_test_exec_monitor-mt.a
Following the Boost "Cross-compilation" instructions here,
Having already run bootstrap.sh, and created a local, native b2.
And using a user-config.jam of:
using gcc : arm :arm-linux-gnueabihf-g++ ;
Kicking off the build:
./b2 toolset=gcc-arm target-os=linux
Boost's b2 spits out a bunch of error messages, and halts:
username#ubuntu:~/Code/boost_1_81_0$ ./b2 toolset=gcc-arm target-os=linux
/home/username/Code/boost_1_81_0/tools/build/src/util/numbers.jam:23: in numbers.check from module numbers
error: arm in arm
error: is not a number
/home/username/Code/boost_1_81_0/tools/build/src/build/version.jam:110: in version.version-compatible from module version
/home/username/Code/boost_1_81_0/tools/build/src/tools/common.jam:1132: in common.find-compiler from module common
/home/username/Code/boost_1_81_0/tools/build/src/tools/gcc.jam:165: in gcc.init from module gcc
/home/username/Code/boost_1_81_0/tools/build/src/build/toolset.jam:44: in toolset.using from module toolset
/home/username/Code/boost_1_81_0/tools/build/src/build-system.jam:543: in process-explicit-toolset-requests from module build-system
/home/username/Code/boost_1_81_0/tools/build/src/build-system.jam:610: in load from module build-system
/home/username/Code/boost_1_81_0/tools/build/src/kernel/modules.jam:294: in import from module modules
/home/username/Code/boost_1_81_0/tools/build/src/kernel/bootstrap.jam:135: in module scope from module
Obviously it doesn't expect the values the instructions suggest.
Is there any way forward ?
I am not sure about what exactly went wrong, but a complete, working procedure for cross-compiling boost for arm-linux-gnueabihf on Ubuntu 22.04 would be:
# Retrieve/install cross-compiler.
wget https://developer.arm.com/-/media/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz
tar Jxf arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-linux-gnueabihf.tar.xz
export CROSS_COMPILE=$(pwd)/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-linux-gnueabihf/bin/arm-none-linux-gnueabihf-
# Retrieve/install boost source code.
wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2
tar jxf boost_1_81_0.tar.bz2
# Build boost
cd boost_1_81_0
echo "using gcc : arm : ${CROSS_COMPILE}g++ ;" > user_config.jam
./bootstrap.sh --prefix=$(pwd)/boost-1.81.0-arm-none-linux-gnueabihf
./b2 install toolset=gcc-arm link=static cxxflags=-fPIC --with-filesystem --with-test --with-log --with-program_options -j32 --user-config=user_config.jam
After the compilation ends, the compilation artifacts should reside in directory boost_1_81_0/boost-1.81.0-arm-none-linux-gnueabihf.
I am trying to re-build the boost libraries on a debian 10 64 bit system I have built boost 1.72 before, but am trying to revert back to 1.62 and am getting this error when attempting to compile.
error: Name clash for '<p/usr/local/lib>libboost_system.a'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error: - <runtime-link>static
error: - <runtime-link>shared
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.
I am attempting to compile with the following options:
./bootstrap.sh --show-libraries --with-libraries=system,log,program_options,filesystem,chrono,regex,thread,date_time,atomic
./b2 install --clean-all -a warnings=all toolset=gcc link=static threading=multi runtime-link=static --build-dir=Build stage -d+2 --hash cxxflags=-fvisibility=hidden variant=release cxxflags=-fPIC cxxflags=-std=c++14 -sNO_BZIP2=1 || true
I have run a search for libboost_system.a it does not exist on the system, I am not setting the runtime-link property elsewhere.
Any help would be greatly appreciated.
I am trying to learn Ocaml using Real World Ocaml. I installed ocaml using MacPorts. Now, I am trying to install ocaml-core-extended:
$ sudo port install ocaml-core-extended
but it fails while installing dependency ocaml-bin-prot:
Here is the relevant part from the build log:
:notice:build ---> Building ocaml-bin-prot
:debug:build Executing org.macports.build (ocaml-bin-prot)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build'
:debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build
:info:build getconf: no such configuration parameter `LFS64_CFLAGS'
:info:build ocamlfind ocamldep -pp 'cpp -traditional -undef -w -DARCH_SIXTYFOUR' -package unix -package bigarray -modules lib/type_class.mli > lib/type_class.mli.depends
:info:build + ocamlfind ocamldep -pp 'cpp -traditional -undef -w -DARCH_SIXTYFOUR' -package unix -package bigarray -modules lib/type_class.mli > lib/type_class.mli.depends
:info:build File "lib/type_class.mli", line 68, characters 16-20:
:info:build Error: Syntax error
:info:build Command exited with code 2.
:info:build E: Failure("Command '/opt/local/bin/ocamlbuild lib/libbin_prot_stubs.a lib/dllbin_prot_stubs.so lib/bin_prot.cma lib/bin_prot.cmxs lib/bin_prot.cmxa lib/bin_prot.a syntax/pa_bin_prot.cma -tag debug' terminated with error code 10")
:info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ocaml-bin-prot/ocaml-bin-prot/work/bin_prot-108.00.02" && /opt/local/bin/ocaml setup.ml -build
:info:build Exit code: 1
:error:build org.macports.build for port ocaml-bin-prot returned: command execution failed
I looked at the lib/type_class.mli and I have no clue why there would be a syntax error there. It is just a macro expansion. I would like my bug report to be a little better than "here's a problem".
So, has anyone encountered this failure? Any hints?
$ uname -a
Darwin zzzz.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013;
root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64
$ ocaml -version
The OCaml toplevel, version 4.01.0
$ cpp --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
I am assuming the specific problems I had are more related to the transition to Mavericks than anything else.
In the mean time, I decided to install opam with ocamlbrew, and everything worked very smoothly.
I was able to set up my environment following the instructions.
What is the version of core library? Looks like the library is not updated for OCaml 4.01, probably the port is old and haven't catched up yet..
Using the docs, I run:
$ echo "using gcc : m68k : /opt/freescale/usr/local/gcc-4.2.125-eglibc-2.5.125/m68k-linux/bin/m68k-linux-gnu-g++ ;" > tools/build/v2/user-config.jam
$ ./bootstrap.sh
$ ./bjam -d2 --toolset=gcc-m68k '-sBUILD=release static multi/single' link=static --prefix=/home/damann/coldfire/boost --layout=system --with-filesystem --with-system --with-thread --with-serialization --with-date_time install
Which gives the following errors:
error: toolset gcc initialization:
error: version 'm68k' requested but 'g++-m68k' not found and version '4.4.3' of default 'g++' does not match
error: initialized from
/home/damann/boost_1_48_0/tools/build/v2/build/toolset.jam:38: in toolset.using from module toolset
/home/damann/boost_1_48_0/tools/build/v2/build-system.jam:481: in process-explicit-toolset-requests from module build-system
/home/damann/boost_1_48_0/tools/build/v2/build-system.jam:562: in load from module build-system
/home/damann/boost_1_48_0/tools/build/v2/kernel/modules.jam:283: in import from module modules
/home/damann/boost_1_48_0/tools/build/v2/kernel/bootstrap.jam:142: in boost-build from module
/home/damann/boost_1_48_0/boost-build.jam:17: in module scope from module
It seems that the user-config is being ignored, although it is read (see it during --debug-configuration)
Discovered that (at least on Linux) bjam also looks for a user-config.jam in the user's homedir - and I had one (that I had forgotten from an earlier build) - so that one was overriding my efforts.