You are not logged in.

#1 2011-09-21 16:29:17

Corubba
Member
From: Germany
Registered: 2010-11-14
Posts: 86

[SOLVED]mplayer2-git fails compiling

Hey guys,

since some time i failed to update my mplayer2 cause the compile failes. Currently i have installed `harfbuzz 20110919-1` and `libass-git 20110918-1`, but mplayer2 uses its own libass. When compiling withut any changes, it hangs on ass_shaper.c:580, cause the harfbuzz function hb_language_from_string takes not 2 parameters, not one. I fixed this by changing 'hb_language_from_string(code);' to 'hb_language_from_string(code, strlen(code));'. But now it fails with some linking stuff, here the output:

CC	stream/audio_in.o
CC	sub/unrar_exec.o
CC	stream/stream_vcd.o
CC	libmpcodecs/ad_libvorbis.o
CC	libmpdemux/demux_ogg.o
CC	libmpcodecs/vd_xanim.o
CC	libmpcodecs/vd_xvid4.o
CC	mplayer
/tmp/yaourt-tmp-marko/aur-mplayer2-git/src/mplayer2-build/build_libs/lib/libass.a(ass_shaper.o): In function `shape_harfbuzz':
ass_shaper.c:(.text+0x221): undefined reference to `hb_buffer_create'
ass_shaper.c:(.text+0x2ab): undefined reference to `hb_font_set_scale'
ass_shaper.c:(.text+0x2cc): undefined reference to `hb_font_set_ppem'
ass_shaper.c:(.text+0x369): undefined reference to `hb_buffer_pre_allocate'
ass_shaper.c:(.text+0x381): undefined reference to `hb_buffer_set_direction'
ass_shaper.c:(.text+0x38e): undefined reference to `hb_buffer_set_language'
ass_shaper.c:(.text+0x3ad): undefined reference to `hb_buffer_add_utf32'
ass_shaper.c:(.text+0x3c7): undefined reference to `hb_shape'
ass_shaper.c:(.text+0x45c): undefined reference to `hb_buffer_get_length'
ass_shaper.c:(.text+0x468): undefined reference to `hb_buffer_get_glyph_infos'
ass_shaper.c:(.text+0x475): undefined reference to `hb_buffer_get_glyph_positions'
ass_shaper.c:(.text+0x5f8): undefined reference to `hb_buffer_destroy'
ass_shaper.c:(.text+0x63d): undefined reference to `hb_ft_font_create'
ass_shaper.c:(.text+0x6a4): undefined reference to `hb_font_funcs_create'
ass_shaper.c:(.text+0x6d6): undefined reference to `hb_font_funcs_set_glyph_func'
ass_shaper.c:(.text+0x6ec): undefined reference to `hb_font_funcs_set_glyph_h_advance_func'
ass_shaper.c:(.text+0x702): undefined reference to `hb_font_funcs_set_glyph_v_advance_func'
ass_shaper.c:(.text+0x718): undefined reference to `hb_font_funcs_set_glyph_h_origin_func'
ass_shaper.c:(.text+0x72e): undefined reference to `hb_font_funcs_set_glyph_v_origin_func'
ass_shaper.c:(.text+0x744): undefined reference to `hb_font_funcs_set_glyph_h_kerning_func'
ass_shaper.c:(.text+0x75a): undefined reference to `hb_font_funcs_set_glyph_v_kerning_func'
ass_shaper.c:(.text+0x770): undefined reference to `hb_font_funcs_set_glyph_extents_func'
ass_shaper.c:(.text+0x786): undefined reference to `hb_font_funcs_set_glyph_contour_point_func'
ass_shaper.c:(.text+0x7a9): undefined reference to `hb_font_set_funcs'
/tmp/yaourt-tmp-marko/aur-mplayer2-git/src/mplayer2-build/build_libs/lib/libass.a(ass_shaper.o): In function `ass_shaper_info':
ass_shaper.c:(.text+0x895): undefined reference to `hb_version_string'
/tmp/yaourt-tmp-marko/aur-mplayer2-git/src/mplayer2-build/build_libs/lib/libass.a(ass_shaper.o): In function `ass_shaper_font_data_free':
ass_shaper.c:(.text+0x936): undefined reference to `hb_font_destroy'
ass_shaper.c:(.text+0x93f): undefined reference to `hb_font_funcs_destroy'
/tmp/yaourt-tmp-marko/aur-mplayer2-git/src/mplayer2-build/build_libs/lib/libass.a(ass_shaper.o): In function `ass_shaper_set_language':
ass_shaper.c:(.text+0xc62): undefined reference to `hb_language_from_string'
collect2: ld returned 1 exit status
make[1]: *** [mplayer] Fehler 1
make[1]: Leaving directory `/tmp/yaourt-tmp-marko/aur-mplayer2-git/src/mplayer2-build/mplayer'
make: *** [mplayer] Fehler 2
==> FEHLER: Ein Fehler geschah in build().
    Breche ab ...
==> ERROR: Makepkg was unable to build mplayer2-git.
==> Restart building mplayer2-git ? [y/N]
==> -------------------------------------
==> 

i tried to include the hb.h from my include-directory inside the ass-shaper.c, but it neither work as to copy the harfbuzz-dir from /usr/include to the include-dir in the mplayer2-build-dir. Obviously mplayer2 uses another source than libass-git, cause it compiles without any problems. Anyone can give me some advise how to fix this thing?

Greetz Corubba

Last edited by Corubba (2011-09-22 16:19:21)

Offline

#2 2011-09-22 13:00:34

keeperofdakeys@hotmailcom
Member
Registered: 2010-04-07
Posts: 5

Re: [SOLVED]mplayer2-git fails compiling

It seems newer libass-git depends on a newer harfbuzz than the libass in mplayer2 can work with. What's more, the libass in mplayer2 doesn't need harfbuzz to function, but the git version does (from what my gentoo system dependencies tell me). I just came across, and fixed (got around) the problem by downgrading libass to a version that doesn't pull in harfbuzz (this was on gentoo). Then the mplayer2 libass never picked up harfbuzz and disabled its functionality.

A better solution would be to pass --disable-harfbuzz to the libass configure script in mplayer2, then you will not get the compile error. Edit the file script/libass-config, here is a diff.

--- a/libass-config       2011-09-22 22:26:29.341675565 +0930
+++ b/libass-config        2011-09-22 22:26:47.086315777 +0930
@@ -3,8 +3,8 @@
 mydir="$(pwd)"
 if test -f "wrapper_export_version" ; then
   cd "$mydir"/libass
-  ./configure --prefix="$mydir/build_libs" --enable-static --disable-shared
+  ./configure --prefix="$mydir/build_libs" --enable-static --disable-shared --disable-harfbuzz
 else
   cd "$mydir"/libass
-  ./autogen.sh --prefix="$mydir/build_libs" --enable-static --disable-shared
+  ./autogen.sh --prefix="$mydir/build_libs" --enable-static --disable-shared --disable-harfbuzz
 fi

Hopefully that all works for you. I should report this to the mplayer2 bug tracker (or libass, as it must not do version checking correctly).

Offline

#3 2011-09-22 16:18:56

Corubba
Member
From: Germany
Registered: 2010-11-14
Posts: 86

Re: [SOLVED]mplayer2-git fails compiling

´--disable-harfbuzz´ does the job for me, compile succeed. On my laptop (libass from repo and no harfbuzz installed) the compile worked without this "fix". Thanks you.

Offline

#4 2011-09-22 23:56:53

keeperofdakeys@hotmailcom
Member
Registered: 2010-04-07
Posts: 5

Re: [SOLVED]mplayer2-git fails compiling

The reason why it works with no harfbuzz installed is that the configure script only enables it if it is detected (that is, installed).

Offline

Board footer

Powered by FluxBB