Opened 10 years ago
Closed 10 years ago
#43900 closed defect (fixed)
libass.a made by HandBrake has undefined symbols for x86_64
Reported by: | vulcan_@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.0 |
Keywords: | Cc: | ||
Port: | HandBrake |
Description
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
Attachments (2)
Change History (7)
Changed 10 years ago by vulcan_@…
Attachment: | libass then handbrake 2 ways at 2014-06-04.txt added |
---|
comment:1 Changed 10 years ago 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 ...
comment:2 follow-up: 3 Changed 10 years ago 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 Freetype bug tracker
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 .. trying that gives me
ass_shaper.c:32:28: error: harfbuzz/hb-ft.h: No such file or directory
and a bunch of compile errors
drat
comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to 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
comment:4 Changed 10 years ago by mf2k (Frank Schima)
Keywords: | libass undefined symbol x86_64 removed |
---|
comment:5 Changed 10 years ago by larryv (Lawrence Velázquez)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Didn’t encounter this while building HandBrakeCLI
@0.10.0_0 on Lion, so I’ll assume that r132827 fixes this.
captured scroll back of the build session terminal screen