Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Missing dependencies cross-building
Forum Updated to NodeBB v4.3 + New Features

Missing dependencies cross-building

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 492 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    avidscavenger
    wrote on last edited by
    #1

    Hello,

    I'm trying to figure our why the dependency of freetype on bzip2 seems to be missed in my build process.

    I'm cross-building a Qt statically under Linux with target macx-clang. qtbase builds without a problem, but building a simple test program fails due to a number of missing libraries on the link command. I'm guessing that if I can solve one of them then I will be able to solve the others. So I get the following linker error:

    Undefined symbols for architecture x86_64:
      "_BZ2_bzDecompressInit", referenced from:
          _FT_Stream_OpenBzip2 in libfreetype.a(ftbzip2.o)
          _ft_bzip2_stream_io in libfreetype.a(ftbzip2.o)
    

    The command line in question (from the log file) looks like this:

    x86_64-apple-darwin18-clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/home/kdedev/osxcross/target/bin/../SDK/MacOSX10.14.sdk -mmacosx-version-min=10.12 -Wl,-dead_strip -Wl,-rpath,@executable_path/../Frameworks -o test-qt5.app/Contents/MacOS/test-qt5 qt-test.o test-qt5_plugin_import.o qrc_qt-test.o moc_qt-test.o   /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/styles/libqmacstyle.a -L/home/kdedev/mxe/usr/x86_64-apple-darwin18/lib /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/platforms/libqcocoa.a -framework Carbon -framework QuartzCore -framework CoreVideo -framework Metal -framework IOSurface -lcups /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5AccessibilitySupport.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5ThemeSupport.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5DBus.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libdbus-1.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5FontDatabaseSupport.a -framework CoreText -lfontconfig -lfreetype /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5GraphicsSupport.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5ClipboardSupport.a -framework ImageIO /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/imageformats/libqgif.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/imageformats/libqico.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/imageformats/libqjpeg.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libjpeg.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/bearer/libqgenericbearer.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/sqldrivers/libqsqlite.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libsqlite3.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/sqldrivers/libqsqlmysql.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libmysqlclient.a /home/kdedev/osxcross/target/SDK/MacOSX10.14.sdk/usr/lib/libpthread.tbd /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/sqldrivers/libqsqlpsql.a /home/kdedev/osxcross/target/SDK/MacOSX10.14.sdk/usr/lib/libpq.tbd /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/sqldrivers/libqsqltds.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libiconv.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/plugins/printsupport/libcocoaprintersupport.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5PrintSupport.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5Widgets.a -lz /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5Gui.a -framework CoreGraphics /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libpng16.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libharfbuzz.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5Network.a -framework SystemConfiguration /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libssl.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libcrypto.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5Sql.a /home/kdedev/mxe/tmp-qtbase-x86_64-apple-darwin18/qtbase-everywhere-src-5.12.4/lib/libQt5Core.a -framework DiskArbitration -framework IOKit -lm -framework AppKit -framework Security -framework ApplicationServices -framework CoreServices -framework CoreFoundation -framework Foundation /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libz.a /home/kdedev/mxe/usr/x86_64-apple-darwin18/lib/libpcre2-16.a
    

    If I add -lbz2 at the end of the command then that link error goes away. But why isn't the build process including it? It's certainly picking up most of the libraries that are needed.

    I've tried looking at the .pc files. I've tried moving the native pkg-config out of the way in case it was being called incorrectly instead of the toolchain version. But no luck.

    Can anyone suggest a solution or where I might look next to find the source of the problem?

    Many thanks!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved