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
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
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've been following the instructions for OSX here. I've installed bazel, cloned the sample and tried to build it with bazel build //main:hello-world. But here where it got wrong.
INFO: Analysed target //main:hello-world (0 packages loaded). INFO:
Found 1 target... ERROR:
/Users/myuser/work/temp/bazel-sample/examples/cpp-tutorial/stage1/main/BUILD:1:1:
Linking of rule '//main:hello-world' failed (Exit 1) ccache: error:
Failed to create temporary file for
/Users/myuser/.ccache/6/stats.tmp: Operation not
permitted Target //main:hello-world failed to build Use
--verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 0.295s, Critical Path: 0.07s INFO: 0 processes.
FAILED: Build did NOT complete successfully
Seems like there's an issue with ccache which I have installed. After running same command with --verbose_failures
INFO: Analysed target //main:hello-world (0 packages loaded). INFO:
Found 1 target... ERROR:
/Users/myuser/work/temp/bazel-sample/examples/cpp-tutorial/stage1/main/BUILD:1:1:
Linking of rule '//main:hello-world' failed (Exit 1): cc_wrapper.sh
failed: error executing command (cd
/private/var/tmp/_bazel_myuser/550c05da61518b4bbbb0ffdfd033154f/execroot/__main__
&& \ exec env - \
APPLE_SDK_PLATFORM='' \
APPLE_SDK_VERSION_OVERRIDE='' \
PATH=/Users/myuser/Library/Android/sdk/platform-tools:/Users/myuser/Library/Android/sdk/tools:/Users/myuser/Library/Android/sdk/build-tools/25.0.0:/Users/myuser/Library/Android/ndk/android-ndk-r10c:/Applications/CMake.app/Contents/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/myuser/bin
\
XCODE_VERSION_OVERRIDE=9.3.0 \ external/local_config_cc/cc_wrapper.sh -fobjc-link-runtime -Wl,-S -o
bazel-out/darwin-fastbuild/bin/main/hello-world
bazel-out/darwin-fastbuild/bin/main/_objs/hello-world/main/hello-world.o
-headerpad_max_install_names -lc++ -no-canonical-prefixes)
Use --sandbox_debug to see verbose messages from the sandbox ccache:
error: Failed to create temporary file for
/Users/myuser/.ccache/0/stats.tmp: Operation not permitted Target
//main:hello-world failed to build INFO: Elapsed time: 0.294s,
Critical Path: 0.07s INFO: 0 processes. FAILED: Build did NOT complete
successfully
I figured out that there's an issue with sandbox. Adding --sandbox_debug prints:
INFO: Analysed target //main:hello-world (0 packages loaded).
INFO: Found 1 target...
ERROR: /Users/myuser/work/temp/bazel-sample/examples/cpp-tutorial/stage1/main/BUILD:1:1: Linking of rule '//main:hello-world' failed (Exit 1): sandbox-exec failed: error executing command
(cd /private/var/tmp/_bazel_myuser/550c05da61518b4bbbb0ffdfd033154f/execroot/__main__ && \
exec env - \
APPLE_SDK_PLATFORM='' \
APPLE_SDK_VERSION_OVERRIDE='' \
DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myuser/bin \
SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk \
TMPDIR=/var/folders/x3/r5tf7wfx3_q0xnyx95s3r5400000gq/T/ \
XCODE_VERSION_OVERRIDE=9.3.0 \
/usr/bin/sandbox-exec -f /private/var/tmp/_bazel_myuser/550c05da61518b4bbbb0ffdfd033154f/sandbox/darwin-sandbox/1/sandbox.sb /private/var/tmp/_bazel_myuser/550c05da61518b4bbbb0ffdfd033154f/execroot/__main__/_bin/process-wrapper '--timeout=0' '--kill_delay=15' external/local_config_cc/cc_wrapper.sh -fobjc-link-runtime -Wl,-S -o bazel-out/darwin-fastbuild/bin/main/hello-world bazel-out/darwin-fastbuild/bin/main/_objs/hello-world/main/hello-world.o -headerpad_max_install_names -lc++ -no-canonical-prefixes)
ccache: error: Failed to create temporary file for /Users/myuser/.ccache/b/stats.tmp: Operation not permitted
Target //main:hello-world failed to build
INFO: Elapsed time: 0.268s, Critical Path: 0.06s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
the content of the sandbox file sandbox.sb is:
(version 1)
(debug deny)
(allow default)
(deny file-write*)
(allow file-write*
(subpath "/dev")
(subpath "/Users/myuser/Library/Logs")
(subpath "/Users/myuser/Library/Developer")
(subpath "/private/var/folders/x3/r5tf7wfx3_q0xnyx95s3r5400000gq/T")
(subpath "/private/var/tmp/_bazel_myuser/550c05da61518b4bbbb0ffdfd033154f/sandbox/darwin-sandbox/1/execroot/__main__")
(subpath "/private/var/tmp")
(subpath "/private/var/folders/x3/r5tf7wfx3_q0xnyx95s3r5400000gq/C")
(subpath "/private/tmp")
)
It is apparently missing the permissions to write to the /Users/myuser/.ccache directory. I have tried disabling ccache with export CCACHE_DISABLE=1 but nothing changes. How can I fix it without removing ccache?
Is setting an absolute path to the compiler and passing it to CC environment variable an option? You might need to use BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 if you have Xcode installed.
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
<your bazel command>
can replace clang with gcc
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.