Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56163

static qt fails to build with static libpng

    XMLWordPrintable

Details

    • 6b070340a818089cb5cc2d01c155d1696c8e392b

    Description

      i'm configuring qt via:
      -system-libpng -I /Users/tim/dev/qt3rd/3rdparty-builds/libpng/ -L /Users/tim/dev/qt3rd/3rdparty-builds/libpng/lib/osx

      the library path contains libpng.a (static library)

      the configuration pass fails with:

      ERROR: Feature 'system-png' was enabled, but the pre-condition 'features.png && libs.libpng' failed.

      config.log
      Checking for libpng... 
      looking for library libpng
      Trying source 0 of library libpng.
      Source 0 of library libpng produced no result.
      Trying source 1 of library libpng.
      Source 1 of library libpng failed condition.
      Trying source 2 of library libpng.
      + cd /Users/tim/dev/qt3rd/build-Qt-5.8-alpha-macx-clang-static/qtbase/config.tests/unix/libpng && /Users/tim/dev/qt3rd/build-Qt-5.8-alpha-macx-clang-static/qtbase/bin/qmake -qtconf /Users/tim/dev/qt3rd/build-Qt-5.8-alpha-macx-clang-static/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static console" 'QMAKE_LIBDIR += /Users/tim/dev/qt3rd/3rdparty-builds/libpng/lib/osx /Users/tim/dev/qt3rd/3rdparty-builds/libjpeg/lib/osx /Users/tim/dev/qt3rd/3rdparty-builds/zlib/lib/osx' 'INCLUDEPATH += /Users/tim/dev/qt3rd/3rdparty-builds/libpng/ /Users/tim/dev/qt3rd/3rdparty-builds/libjpeg/ /Users/tim/dev/qt3rd/3rdparty-builds/zlib/' 'LIBS += -lpng' /Users/tim/dev/qt3rd/qtbase/config.tests/unix/libpng
      + cd /Users/tim/dev/qt3rd/build-Qt-5.8-alpha-macx-clang-static/qtbase/config.tests/unix/libpng && MAKEFLAGS= /usr/bin/make
      /Applications/Xcode-7.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -isysroot /Applications/Xcode-7.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9 -Wall -W -fPIC  -I/Users/tim/dev/qt3rd/qtbase/config.tests/unix/libpng -I. -I/Users/tim/dev/qt3rd/3rdparty-builds/libpng -I/Users/tim/dev/qt3rd/3rdparty-builds/libjpeg -I/Users/tim/dev/qt3rd/3rdparty-builds/zlib -I/Users/tim/dev/qt3rd/qtbase/mkspecs/macx-clang -o libpng.o /Users/tim/dev/qt3rd/qtbase/config.tests/unix/libpng/libpng.cpp
      /Applications/Xcode-7.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode-7.3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9 -o libpng libpng.o   -L/Users/tim/dev/qt3rd/3rdparty-builds/libpng/lib/osx -L/Users/tim/dev/qt3rd/3rdparty-builds/libjpeg/lib/osx -L/Users/tim/dev/qt3rd/3rdparty-builds/zlib/lib/osx -lpng 
      Undefined symbols for architecture x86_64:
        "_adler32", referenced from:
            _png_icc_set_sRGB in libpng.a(png.o)
        "_crc32", referenced from:
            _png_reset_crc in libpng.a(png.o)
            _png_calculate_crc in libpng.a(png.o)
            _png_icc_set_sRGB in libpng.a(png.o)
        "_deflate", referenced from:
            _png_compress_IDAT in libpng.a(pngwutil.o)
            _png_text_compress in libpng.a(pngwutil.o)
        "_deflateEnd", referenced from:
            _png_destroy_write_struct in libpng.a(pngwrite.o)
            _png_deflate_claim in libpng.a(pngwutil.o)
        "_deflateInit2_", referenced from:
            _png_deflate_claim in libpng.a(pngwutil.o)
        "_deflateReset", referenced from:
            _png_deflate_claim in libpng.a(pngwutil.o)
        "_inflate", referenced from:
            _png_inflate_read in libpng.a(pngrutil.o)
            _png_read_IDAT_data in libpng.a(pngrutil.o)
            _png_inflate in libpng.a(pngrutil.o)
        "_inflateEnd", referenced from:
            _png_destroy_read_struct in libpng.a(pngread.o)
        "_inflateInit2_", referenced from:
            _png_inflate_claim in libpng.a(pngrutil.o)
        "_inflateReset", referenced from:
            _png_reset_zstream in libpng.a(png.o)
            _png_decompress_chunk in libpng.a(pngrutil.o)
        "_inflateReset2", referenced from:
            _png_inflate_claim in libpng.a(pngrutil.o)
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make: *** [libpng] Error 1
      Source 2 of library libpng failed verification.
      test config.libraries.libpng FAILED
      

      analysis:
      when testing for libpng, it doesn't link libz, which is a dependency of libpng. the usage requirement is of course not included there ...

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            buddenha Oswald Buddenhagen
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes