Skip to content
This repository was archived by the owner on Apr 12, 2019. It is now read-only.
This repository was archived by the owner on Apr 12, 2019. It is now read-only.

No package 'freetype2' found #134

Closed
Closed

Description

@Whirlwind

Hi, I found that I fail to build and get the error 'freetype2' not found.

configure:14235: checking for FREETYPE
configure:14242: $PKG_CONFIG --exists --print-errors "freetype2"
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
configure:14245: $? = 1
configure:14259: $PKG_CONFIG --exists --print-errors "freetype2"
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
configure:14262: $? = 1
configure:14276: result: no
No package 'freetype2' found
configure:14292: error: Package requirements (freetype2) were not met:

No package 'freetype2' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables FREETYPE_CFLAGS
and FREETYPE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I check the cache variables:

ac_cv_env_PKG_CONFIG_PATH_set=set
ac_cv_env_PKG_CONFIG_PATH_value=/Developer/maps/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386/lib/pkgconfig
ac_cv_env_PKG_CONFIG

PKG_CONFIG='/Developer/maps/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386/bin/pkg-config'
PKG_CONFIG_LIBDIR=''
PKG_CONFIG_PATH='/Developer/maps/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386/lib/pkgconfig'

I search the path and found the pcs:

$ ls /Developer/maps/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386/lib/pkgconfig
expat.pc      icu-uc.pc     libtiff-4.pc  pixman-1.pc
freetype2.pc  libpng.pc     libwebp.pc    proj.pc
icu-i18n.pc   libpng16.pc   libxml-2.0.pc sqlite3.pc

I run the 'build.sh on my MacOS 10.9.2, Xcode 5.1 for iPhoneSimulator.

Activity

  1. Whirlwind commented on Mar 23, 2014

    @Whirlwind
    Author

    I found I have same error when I build harfbuzz:

    configure:17998: checking for ICU
    configure:18006: $PKG_CONFIG --exists --print-errors "icu-uc"
    Package icu-uc was not found in the pkg-config search path.
    Perhaps you should add the directory containing `icu-uc.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'icu-uc' found
    configure:18009: $? = 1
    configure:18024: $PKG_CONFIG --exists --print-errors "icu-uc"
    Package icu-uc was not found in the pkg-config search path.
    Perhaps you should add the directory containing `icu-uc.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'icu-uc' found
    
    configure:18311: checking for FREETYPE
    configure:18319: $PKG_CONFIG --exists --print-errors "freetype2 >= 2.3.8"
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    configure:18322: $? = 1
    configure:18337: $PKG_CONFIG --exists --print-errors "freetype2 >= 2.3.8"
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    configure:18340: $? = 1
    No package 'freetype2' found
    configure:18368: result: no
    configure:18382: error: FreeType support requested but libfreetype2 not found
    
    

    I tried to set the PKG_CONFIG_PATH, but I failed.
    please help me...:(

  2. Whirlwind commented on Mar 23, 2014

    @Whirlwind
    Author

    I found the PKG_CONFIG is empty~
    Is it the reason?

  3. springmeyer commented on Apr 2, 2014

    @springmeyer
    Member

    not sure what is wrong. Works fine for me. My freetype2.pc has:

    prefix="/Users/dane/projects/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386"
    exec_prefix="/Users/dane/projects/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386"
    libdir="/Users/dane/projects/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386/lib"
    includedir="/Users/dane/projects/mapnik-packaging/osx/out/build-cpp03-libstdcpp-i386/include/freetype2"
    
    Name: FreeType 2
    URL: http://freetype.org
    Description: A free, high-quality, and portable font engine.
    Version: 17.2.11
    Requires:
    Requires.private: 
    Libs: -L${libdir} -lfreetype
    Libs.private: -lz
    Cflags: -I${includedir}
    
  4. springmeyer commented on Oct 14, 2014

    @springmeyer
    Member

    @cbo1964 thanks for the details. However, as I mention above I could not replicate before. I'm sure I can fix if I can replicate, so... can you provide the exact commands you are running that lead you up to this error?

  5. springmeyer commented on Oct 14, 2014

    @springmeyer
    Member

    nevermind, was able to replicate

  6. springmeyer commented on Oct 14, 2014

    @springmeyer
    Member

    so, passing --debug to pkg-config reveals the source of the problem.

    If I set:

    export PKG_CONFIG_PATH=/Users/dane/projects/ios-packaging/osx/out/build-cpp11-libcpp-i386-iphonesimulator/lib/pkgconfig
    

    And then try the i386 binary of pkg-config, it outputs:

    [...snip...]
    File 'reetype2.pc' appears to be a .pc file
    Will find package 'reetype2' in file '/Users/dane/projects/ios-packaging/osx/out/build-cpp11-libcpp-i386-iphonesimulator/lib/pkgconfig/reetype2.pc'
    Ignoring file '??????' in search directory; not a .pc file
    Ignoring file '??' in search directory; not a .pc file
    Ignoring file '' in search directory; not a .pc file
    [...snip...]

    While running the x86_64 binary outputs:

    [...snip...]
    File 'freetype2.pc' appears to be a .pc file
    Will find package 'freetype2' in file '/Users/dane/projects/ios-packaging/osx/out/build-cpp11-libcpp-i386-
    [...snip...]
  7. springmeyer commented on Oct 14, 2014

    @springmeyer
    Member

    tried upgrading pkg-config to 0.28, but remembering now why i've stuck to 0.25:

    • pkg-config 0.28 requires glib, and I don't want to depend on glib on OS X, so...
    • added --with-internal-glib to configure, but..,

    That fails with:

    checking for libiconv_open in -liconv... no
    checking for iconv_open in -liconv... no
    configure: error: *** No iconv() implementation found in C library or libiconv
    configure: error: ./configure failed for glib
    

    Looking inside out/packages/pkg-config-0.28-i386/glib/config.log shows the problem is:

    configure:7463: checking for iconv_open
    configure:7463: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -o conftest -I/Users/dane/projects/ios-packaging/osx/out/build-cpp11-libcpp-i386-iphonesimulator/include -DNDEBUG -O3 -arch i386 -D_FILE_OFFSET_BITS=64 -miphoneos-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -Wno-invalid-source-encoding -Wno-cast-align -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-long-long -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-strict-prototypes -Wno-unused-variable -Wno-redundant-decls -Wno-return-type -Wno-uninitialized -Wno-unused-result -Wno-format -std=gnu89   -L/Users/dane/projects/ios-packaging/osx/out/build-cpp11-libcpp-i386-iphonesimulator/lib -O3 -arch i386 -miphoneos-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/usr/lib -Wl,-search_paths_first -framework Carbon -framework Foundation conftest.c  >&5
    ld: framework not found Carbon
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    configure:7463: $? = 1
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions