On 2018-11-19 09:05 , Mark Brethen wrote:
> The following line worked,
>
> system -W ${worksrcpath}_SHARED \
> "ld -dynamic -dylib -force_load spooles.a -r -x -o
> libspooles.1.dylib -install_name ${prefix}/lib/libspooles.1.dylib”
>
> There was a warning in the main.log:
>
> :debug:build system -W
> /opt/local/var/macports/build/_Users_marbre_ports_math_spooles/spooles/work/spooles.2.2_SHARED:
> ld -dynamic -dylib -force_load spooles.a -r -x -o libspooles.1.dylib
> -install_name /opt/local/lib/libspooles.1.dylib
> :info:build ld: warning: -arch not specified
>
> So I specified -arch ${os.arch} then it warned about spooles.a being i386,
> not x86_64. Why am I getting the warning?
Because os.arch is not necessarily the same as build_arch (or
universal_archs). The former matches what `uname -p` prints, the latter
are what MacPorts has been asked to build. The flags you should use are
in configure.ld_archflags or configure.universal_ldflags depending on
whether a universal variant is being used.
- Josh