Closed potterpg closed 1 year ago
@potterpg You may want to open a ticket on Trac: https://trac.macports.org
I am in fact going to deal with Boost in Macports soon, but only with regard to ppc and ppc64 (on 10.5.8 and 10.6.8). Currently context
and coroutine
are disabled for old systems, but those are fixable and hopefully I finalize that very soon.
I am not dealing with M1 however (no hardware for that).
P. S. Besides, ppc64
will NOT build on 10.6, not without magic. System dylibs have no ppc64
slices – not just in 10.6.x releases, but also in available developer builds that run on PowerPC natively.
UPD. context
, coroutine
and soon fiber
enabled in Macports for ppc
with Boost 1.81 (not yet ppc64
).
should work now
Just tried: sudo port upgrade outdated In anticipation, but received this error:
:info:build error: at libs/thread/build/Jamfile.v2:273 :info:build error: 64-bit PPC compilation is not supported when targeting OSX 10.6 or later :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost176/boost176/work/boost_1_76_0" && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost176/boost176/work/boost_1_76_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 runtime-link=shared -j8 --no-cmake-config link=shared threading=multi pch=off address-model=64 architecture=combined :info:build Exit code: 1 :error:build Failed to build boost176: command execution failed :debug:build Error code: CHILDSTATUS 11765 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_boost176/boost176/main.log for details.
Looking at: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_boost176/boost176/work/boost_1_76_0/tools/build/src/tools/darwin.jam Line 466: errors.user-error "64-bit PPC compilation is not supported when targeting OSX 10.6 or later" ;
Which is the reported error... within this block:
case combined :
{
if $(address-model) = 32_64 {
if $(support-ppc64) {
options = -arch i386 -arch ppc -arch x86_64 -arch ppc64 ;
} else {
options = -arch i386 -arch ppc -arch x86_64 ;
}
} else if $(address-model) = 64 {
if $(support-ppc64) {
options = -arch x86_64 -arch ppc64 ;
} else {
errors.user-error "64-bit PPC compilation is not supported when targeting OSX 10.6 or later" ;
}
} else {
options = -arch i386 -arch ppc ;
}
}
Clearly the section from else if $(address-model) = 64 is not including M1 processors as yet...
Maybe a change to this might help: } else if $(address-model) = 64 { if $(support-ppc64) { options = -arch x86_64 -arch ppc64 ; } else { options = -arch x86_64 -arch arm64 ; } } else { This was a suggestion on another thread for Boost version 1.77
in reference to this reported issue, but apparently on the wrong thread? Copied here:
I'm using macports to generate updated static libraries for a project that I now need to compile on a Mac M1 processor universal version.
I'm trying to compile poppler, which has this version of boost as a requirement.
Ports calls the b2 compiler with this command:
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 runtime-link=shared -j8 --no-cmake-config link=shared threading=multi pch=off address-model=64 architecture=combined
Initial error reports:
error: 64-bit PPC compilation is not supported when targeting OSX 10.6 or later
indicating the jam file is incorrectly configured.
A suggested edit on macports is in the file: tools\build\src\tools\darwin.jam
is for line 463-467:
if $(support-ppc64) { options = -arch x86_64 -arch ppc64 ; } else { options = -arch x86_64 -arch arm64 ; }
Which seems to compile further... and maybe the answer, but I guess needs putting in the live source files if its the real answer.
There are still errors though? Log file attached:
Boost_176_Compile.txt
Hope this can be resolved, so a macports user can just compile this version of boost without issue.
A reply on that thread said this:
This is not a Boost.Filesystem issue. The "No best alternative" error refers to Boost.Context, please report the issue there. The build then fails during linking for Boost.Coroutine and Boost.Fiber, both of which depend on Boost.Context, so the errors are likely caused by the error of Boost.Context.
If I had to guess, it is probably related to the architecture feature. I cannot find the combined value for the architecture feature in Boost.Build, it is only mentioned in Boost.Context. Looks like it was removed at some point. Boost.Build defines arm+x86, and I think that is what should be specified on the command line if you want to build fat binaries for x86 and Aarch64. But arm+x86 is not used in Boost.Context, so it may have to be updated.