pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47504: fonts/harfbuzz does not build on (standard) NetBSD 5.0 (native X11)

>Number:         47504
>Category:       pkg
>Synopsis:       fonts/harfbuzz does not build on (standard) NetBSD 5.0 (native 
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 25 10:15:00 +0000 2013
>Originator:     Robert Elz
>Release:        NetBSD 5.1_STABLE   (pkgsrc current 2013-01-25)
        Prince of Songkla University
System: NetBSD 5.1_STABLE NetBSD 5.1_STABLE 
(JADE-1.12-20120130) #27: Tue Jan 31 05:20:31 ICT 2012 i386
Architecture: i386
Machine: i386
        fonts/harfbuzz seems (after some update within the past couple of
        months) to require a version of graphics/freetype2 that is newer
        than the version that is (was) shipped with NetBSD 5.0 native X11.

        The build system is not detecting that, and the build fails.

        I use pkg_comp with NetBSD 5.0 release sets installed, with libkver
        to simulate pure 5.0 (the build system, as shown above, is actually
        something beyond 5.1) and use native X11 from the NetBSD 5.0 release

        In that environment, attempting to build fonts/harfbuzz results in...

  CXX    libharfbuzz_la-hb-ft.lo error: #include expects "FILENAME" or <FILENAME> In function 'hb_position_t hb_ft_get_glyph_h_advance(hb_font_t*, void*
, hb_codepoint_t, void*)': error: 'FT_Get_Advance' was not declared in this scope In function 'hb_position_t hb_ft_get_glyph_v_advance(hb_font_t*, void*
, hb_codepoint_t, void*)': error: 'FT_Get_Advance' was not declared in this scope
gmake[4]: *** [libharfbuzz_la-hb-ft.lo] Error 1

        Line 34 of is

#include FT_ADVANCES_H

        and so, obviously, FT_ADVANCES_H is not being defined, the #include
        fails, and everything that's supposed to be defined by that include
        file is missing (leading to the errors on lines 102 and 118).

        Nowhere (in the sandbox system) could I find any references to
        FT_ADVANCES_H leading me to conclude that the version of freetype2
        installed there does not have that include file (or at least doesn't
        define a symbol with which to reference it).

        My workaround for this, which allowed be to build fonts/harfbuzz
        (which is needed for pango, which in turn is needed for lots & lots)
        was to attempt to set
                BUILDLINK_API_DEPENDS.freetype2+= freetype2>=2.4.11
        (as 2.4.11 seems to be the current version, not because that
        version is the lowest one that is actually needed).

        That changed nothing, the build system was still happy to use the
        builtin version of freetype2 instead of the pkgsrc version.
        Manually installing freetype2 in the sandbox changed nothing (which
        is as it should be, pkgsrc is supposed to ignore packages that just
        happen to be installed but are not specifically requested.)

        So, and I am fairly sure this is not the correct solution (so I am
        not including a patch) I added


        to harfbuzz's pkgsrc Makefile.   That did what it was intended to do.

=> Full dependency freetype2>=2.4.7nb2: found freetype2-2.4.11
===> Overriding tools for harfbuzz-0.9.12
===> Extracting for harfbuzz-0.9.12
===> Patching for harfbuzz-0.9.12
=> Applying pkgsrc patches for harfbuzz-0.9.12
===> Creating toolchain wrappers for harfbuzz-0.9.12
ERROR: fontconfig>=2.4.2 fontconfig>=2.1nb2 is not installed; can't buildlink 
*** Error code 1

        which was the first time (in this current build attempt anyway) that
        harfbuzz had picked pkgsrc's freetype2 as a dependency.

        That something required fontconfig because of this, but fontconfig
        didn't get auto-installed is a problem I think ... it should either
        be a dependency of freetype2, and been installed when pkgsrc added
        that one (from a pre-built binary package) or it should be included
        as a dependency of harfbuzz (directly, or indirectly via some file).

        I installed it manyally - just...

pkg_comp:5.conf# pkg_add /p/packages/All/fontconfig-2.10.2.tgz

        After that, the build of harfbuzz (0.9.12) succeeded, its binary
        package built with no further problems, or so it seemed.  Unfortunately
        attempting to build devel/pango resulted in ...

  CCLD     pango-querymodules
/pkg_comp/obj/pkgsrc/devel/pango/5/.buildlink/lib/ undefined 
reference to `FT_Get_Advance'
gmake[4]: *** [pango-querymodules] Error 1
gmake[4]: Leaving directory 
gmake[3]: *** [all-recursive] Error 1

        This seems to be because the buildlink for pango managed to
        link to in the .buildlink/lib directory
        (which is the version in X11R7/lib) rather than
        (which did get installed in /usr/pkg/lib - and this is building
        in a new, clean, sandbox, so that install of freetype2 happened as
        a dependency of something in devel/pango - it just wasn't used).

        Adding the line
        to devel/pango's pkgsrc Makefile fixed that, but this cannot be the
        right way, and almost certainly means that every package that uses
        pango is going to need a similar modification (or I would need to
        put that in mk.conf and I am fairly sure that is not the right way.)
        (I am yet to attempt to build any of the packages that need pango.)

        Could someone who understands buildlink3 and the use of the builtin
        versions of packages that are available in the release sets, and
        pkgsrc (with usually newer versions in pkgsrc) take a look at
        fonts/harfbuzz, and implement the correct magic to make it build
        correctly (with all the correct dependencies) on NetBSD 5.0  ??


        No correct fix known (yet.)

Home | Main Index | Thread Index | Old Index