[MacPorts] #43900: libass.a made by HandBrake has undefined symbols for x86_64
#43900: libass.a made by HandBrake has undefined symbols for x86_64 --------------------------------------------+------------------------------ Reporter: vulcan_@… | Owner: macports- Type: defect | tickets@… Priority: Normal | Status: new Component: ports | Milestone: Keywords: libass undefined symbol x86_64 | Version: 2.3.0 | Port: HandBrake --------------------------------------------+------------------------------ on Lion (Mac OS X 10.7.5) i see a problem doing "port -v install handbrake". Extracting the relevant failure details from the log. I have XCode 4.6 installed and am using the command line tools that come with it. First, the command that shows the problem (redacted to be readable) Note that all paths have `local/var/macports/build/_opt_local_var_macports_sources_mse.uk.rsync.macports.org_rsync.macports.org_release_tarballs_ports_aqua_HandBrake/HandBrake/work` removed {{{ Ld /opt/../HandBrake-0.9.8/build/xroot/HandBrakeCLI normal x86_64 cd /opt/../HandBrake-0.9.8/macosx setenv MACOSX_DEPLOYMENT_TARGET 10.7 /usr/bin/clang++ -arch x86_64 -L/opt/../HandBrake-0.9.8/build/xroot -L/opt/../HandBrake-0.9.8/build/libhb -L/opt/../HandBrake-0.9.8/build/contrib/lib -F/opt/../HandBrake-0.9.8/build/xroot -filelist /opt/../HandBrake-0.9.8/build/xroot/HandBrakeCLI.build/Objects- normal/x86_64/HandBrakeCLI.LinkFileList -mmacosx-version-min=10.7 -framework AudioToolbox -framework IOKit -framework CoreServices -liconv -lbz2 -lz -lhb -la52 '''-lass''' -lavcodec -lavformat -lavutil -lbluray -ldca -ldvdnav -ldvdread -lfaac -lfontconfig -lfreetype -lfribidi -lmkv -lmp3lame -lmp4v2 -lmpeg2 -logg -lsamplerate -lswscale -ltheora -lvorbis -lvorbisenc -lx264 -lxml2 -o /opt/../HandBrake-0.9.8/build/xroot/HandBrakeCLI }}} we see the -lass that is referring to the `libass.a` made by HandBrake in the contribs/lib subdirectory. the resulting error is {{{ Undefined symbols for architecture x86_64: "_hb_buffer_add_utf32", referenced from: _shape_harfbuzz in libass.a(ass_shaper.o) "_hb_buffer_create", referenced from: _shape_harfbuzz in libass.a(ass_shaper.o) ... }}} I show only 2 of the 20+ undefined symbols in the list, seemingly all from ass_shaper.o the final msg is {{{ ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) }}} thinking that libass.a might be the one in /opt/local/lib, which comes in with ffmpeg, I thought to remove it by uninstalling ffmpeg @2.2.2_1+gpl2+nofree the HandBrake build failed at the same place. I tried drilling down to the libass directory and doing `make clean`and then `make`to see if that would give any insight as to how the library was built. The following build of HandBrake failed in the same way. Then I cleaned HB out again and tried it from scratch to be able to give you a clean log file. attached are 2 text files, the captured scroll back from the terminal session and the main log file -- Ticket URL: <https://trac.macports.org/ticket/43900> MacPorts <http://www.macports.org/> Ports system for OS X
#43900: libass.a made by HandBrake has undefined symbols for x86_64 ------------------------+-------------------------------------------- Reporter: vulcan_@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: | Keywords: libass undefined symbol x86_64 Port: HandBrake | ------------------------+-------------------------------------------- Comment (by vulcan_@…): I had a look at ass_shaper.c and I see that there is a condition `CONFIG_HARFBUZZ` that is controlling the use of the missing symbols, so it is not defined somehow. There is an include: {{{ #ifdef CONFIG_HARFBUZZ #include <hb-ft.h> enum { VERT = 0, VKNA, KERN }; #define NUM_FEATURES 3 #endif }}} that suggest that the hb-ft.h would resolve the missing symbols if it was included … it should be included but is maybe not found .. i certainly could not. But `CONFIG_HARFBUZZ` must be defined because all references to the `hb_` symbols are inside IFDEFs hmmm ... -- Ticket URL: <https://trac.macports.org/ticket/43900#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43900: libass.a made by HandBrake has undefined symbols for x86_64 ------------------------+-------------------------------------------- Reporter: vulcan_@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: | Keywords: libass undefined symbol x86_64 Port: HandBrake | ------------------------+-------------------------------------------- Comment (by vulcan_@…): ah ha .. harfbuzz is a port, but is not installed. It comes in with FreeType and a few other things .. I install freetype to get harfbuzz and try to build handbrake immediately, but still the undefined symbols problem is unchanged. i see this closed issue on harfbuzz headers being missing on the [https://bugzilla.freedesktop.org/show_bug.cgi?id=75652 Freetype bug tracker] -- Ticket URL: <https://trac.macports.org/ticket/43900#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#43900: libass.a made by HandBrake has undefined symbols for x86_64 ------------------------+-------------------------------------------- Reporter: vulcan_@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: | Keywords: libass undefined symbol x86_64 Port: HandBrake | ------------------------+-------------------------------------------- Comment (by ryandesign@…): Replying to [comment:2 vulcan_@…]:
the needed hb_ft.h file now exists in /opt/local/include/harfbuzz/bh_ft.h, but the include in the ass_shaper.c code is `#include <hb_ft.h>` and i wonder if it should be `#include <harfbuzz/hb_ft.h>` ?
Nope, it's correct as written. Programs wanting to use harfbuzz should use pkg-config to find out what flags need to be used, e.g.: {{{ $ pkg-config harfbuzz --cflags -I/opt/local/include/harfbuzz }}} -- Ticket URL: <https://trac.macports.org/ticket/43900#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#43900: libass.a made by HandBrake has undefined symbols for x86_64 ------------------------+-------------------------------- Reporter: vulcan_@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.0 Resolution: | Keywords: Port: HandBrake | ------------------------+-------------------------------- Changes (by mf2k@…): * keywords: libass undefined symbol x86_64 => -- Ticket URL: <https://trac.macports.org/ticket/43900#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts