[MacPorts] #72162: libgsm @1.0.22+universal: -arch option not included in compiling object files for ./lib/libgsm.a and ./bin/toast
MacPorts
noreply at macports.org
Sun Mar 9 18:18:48 UTC 2025
#72162: libgsm @1.0.22+universal: -arch option not included in compiling object
files for ./lib/libgsm.a and ./bin/toast
------------------------+-------------------------
Reporter: ar-an-ribe | Owner: herbygillot
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Keywords: | Port: libgsm
------------------------+-------------------------
On Mavericks, I’d like to build `libgsm @1.0.22 +universal`, since it is
currently a library dependency of the `gstreamer1-gst-plugins-bad` port.
At this time, it fails in the building phase of the `i386` architecture,
emitting an error when trying to build the `./bin/toast` executable:
{{{
:info:build
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_audio_libgsm/libgsm/work/compwrap/cc/usr/bin/clang
-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -arch i386
-o ./bin/toast ./src/toast.o ./src/toast_lin.o ./src/toast_ulaw.o
./src/toast_alaw.o ./src/toast_audio.o ./lib/libgsm.a
:info:build ld: warning: ignoring file ./src/toast.o, file was built for
unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03
0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being
linked (i386): ./src/toast.o
:info:build ld: warning: ignoring file ./src/toast_lin.o, file was built
for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03
0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being
linked (i386): ./src/toast_lin.o
:info:build ld: warning: ignoring file ./src/toast_ulaw.o, file was built
for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03
0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being
linked (i386): ./src/toast_ulaw.o
:info:build ld: warning: ignoring file ./src/toast_alaw.o, file was built
for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03
0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being
linked (i386): ./src/toast_alaw.o
:info:build ld: warning: ignoring file ./src/toast_audio.o, file was built
for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03
0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being
linked (i386): ./src/toast_audio.o
:info:build ld: warning: ignoring file ./lib/libgsm.a, file was built for
archive which is not the architecture being linked (i386): ./lib/libgsm.a
:info:build Undefined symbols for architecture i386:
:info:build "_main", referenced from:
:info:build implicit entry/start for main executable
:info:build ld: symbol(s) not found for architecture i386
:info:build clang: error: linker command failed with exit code 1 (use -v
to see invocation)
:info:build make: *** [bin/toast] Error 1
}}}
In the attached `main.log` file, note that no `-arch` option was provided
to the compilation lines that were used to build the object files for both
`./lib/libgsm.a` and `./bin/toast`; perhaps it’s using the `x86_64`
architecture by default, and thus failing when trying to build for the
`i386` architecture.
--
Ticket URL: <https://trac.macports.org/ticket/72162>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list