#66613 closed defect (fixed)

flac @1.4.2 fails to build on Lion - Undefined symbols ___cpuid and ___cpuid_count

Reported by: RobK88 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: lion Cc:
Port: flac

Description

The flac port fails to build on Lion. Undefined symbols - ___cpuid and ___cpuid_count

/opt/local/bin/ranlib: file: .libs/libFLAC-static.a(float.o) has no symbols
/opt/local/bin/ranlib: file: .libs/libFLAC-static.a(lpc_intrin_sse41.o) has no symbols
/opt/local/bin/ranlib: file: .libs/libFLAC-static.a(lpc_intrin_avx2.o) has no symbols
/opt/local/bin/ranlib: file: .libs/libFLAC-static.a(lpc_intrin_fma.o) has no symbols
/opt/local/bin/ranlib: file: .libs/libFLAC-static.a(lpc_intrin_vsx.o) has no symbols
/opt/local/bin/ranlib: file: .libs/libFLAC-static.a(lpc_intrin_neon.o) has no symbols
/opt/local/bin/ranlib: file: .libs/libFLAC-static.a(stream_encoder_intrin_avx2.o) has no symbols
libtool: link: ranlib .libs/libFLAC-static.a
Undefined symbols for architecture x86_64:
  "___cpuid", referenced from:
      _cpuinfo_x86 in cpu.o
  "___cpuid_count", referenced from:
      _cpuinfo_x86 in cpu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [libFLAC.la] Error 1
make[4]: *** Waiting for unfinished jobs....
ranlib: file: .libs/libFLAC-static.a(float.o) has no symbols
ranlib: file: .libs/libFLAC-static.a(lpc_intrin_sse41.o) has no symbols
ranlib: file: .libs/libFLAC-static.a(lpc_intrin_avx2.o) has no symbols
ranlib: file: .libs/libFLAC-static.a(lpc_intrin_fma.o) has no symbols
ranlib: file: .libs/libFLAC-static.a(lpc_intrin_vsx.o) has no symbols
ranlib: file: .libs/libFLAC-static.a(lpc_intrin_neon.o) has no symbols
ranlib: file: .libs/libFLAC-static.a(stream_encoder_intrin_avx2.o) has no symbols
libtool: link: ( cd ".libs" && rm -f "libFLAC-static.la" && ln -s "../libFLAC-static.la" "libFLAC-static.la" )
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_flac/flac/work/flac-1.4.2/src/libFLAC'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_flac/flac/work/flac-1.4.2/src/libFLAC'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_flac/flac/work/flac-1.4.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_flac/flac/work/flac-1.4.2'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_flac/flac/work/flac-1.4.2'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_flac/flac/work/flac-1.4.2" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build flac: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_flac/flac/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
bash-3.2$

Attachments (1)

main.log (243.0 KB) - added by RobK88 23 months ago.
main.log

Download all attachments as: .zip

Change History (3)

Changed 23 months ago by RobK88

Attachment: main.log added

main.log

comment:1 Changed 23 months ago by RobK88

Until the port is fixed, the workaround is to use a newer compiler such as clang-9.0. See below:

bash-3.2$ sudo port clean flac
Password:
--->  Cleaning flac
bash-3.2$ 
bash-3.2$ sudo port upgrade flac configure.compiler=macports-clang-9.0
--->  Computing dependencies for flac
--->  Fetching distfiles for flac
--->  Verifying checksums for flac
--->  Extracting flac
--->  Configuring flac
--->  Building flac                                      
--->  Staging flac into destroot                         
--->  Installing flac @1.4.2_0                           
--->  Cleaning flac
--->  Computing dependencies for flac
--->  Deactivating flac @1.3.4_0
--->  Cleaning flac
--->  Activating flac @1.4.2_0
--->  Cleaning flac
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
bash-3.2$
bash-3.2$ flac --version
flac 1.4.2
bash-3.2$
Last edited 23 months ago by RobK88 (previous) (diff)

comment:2 Changed 23 months ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.