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

ODBC and psql configure tests fail when cross-compiling for ppc64 targets on Mac OS 10.6 (Snow Leopard)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • 4.7.1
    • 4.5.3
    • SQL Support
    • None
    • macOS

    Description

      This bug affects Qt 4.5.4 binary packages (which include ppc64 binaries), but not 4.6 binary packages (where ppc and ppc64 are not included).

      When building the current 4.5 branch on Snow Loepard, with the following configure line

      ./configure -qt-libpng -qt-libjpeg -plugin-sql-sqlite -plugin-sql-odbc -plugin-sql-psql -framework -confirm-license -no-rpath -I/usr/local/pgsql/include -L/usr/local/pgsql/lib -cocoa -arch x86 -arch x86_64 -arch ppc -arch ppc64 -sdk /Developer/SDKs/MacOSX10.5.sdk
      

      ... configure reports the following error:

      ODBC support cannot be enabled due to functionality tests!
       Turn on verbose messaging (-v) to ./configure to see the final report.
       If you believe this message is in error you may use the continue
       switch (-continue) to ./configure to continue.
      Configure error
      

      Calling configure with -verbose does not display any additional information.

      I noticed that the part of configure the error comes from has changed in the 4.6 branch, so I tried to backport the changes to 4.5 (8aef5118, e32bc79d, 7278c142).

      Those changes add an iodbc configure test, but that test fails on Mac OS 10.6 because the system libraries in /usr/lib no longer have symbols for the ppc64 architecture (they are present in 10.5, where this build succeeds, but not in 10.6), as follows:

      Should this configure test link against the libs in the Mac SDK used for the build, rather than the system libraries on the build machine?

      iODBC auto-detection... ()
      g++ -c -pipe -arch i386 -arch x86_64 -arch ppc -arch ppc64 -Os -Wall -W  -I../../../mkspecs/macx-g++ -I. -I/usr/local/pgsql/include -I. -o iodbc.o iodbc.cpp
      g++ -headerpad_max_install_names -o iodbc iodbc.o     -L/usr/local/pgsql/lib -arch i386 -arch x86_64 -arch ppc -arch ppc64 -liodbc
      ld: warning: in /usr/lib/crt1.o, missing required architecture ppc64 in file
      ld: warning: in /usr/lib/libiodbc.dylib, missing required architecture ppc64 in file
      ld: warning: in /usr/lib/gcc/powerpc-apple-darwin10/4.2.1/libstdc++.dylib, missing required architecture ppc64 in file
      ld: warning: in /usr/lib/libgcc_s.10.4.dylib, missing required architecture ppc64 in file
      ld: warning: in /usr/lib/libSystemStubs.a, missing required architecture ppc64 in file
      ld: warning: in /usr/lib/libSystem.dylib, missing required architecture ppc64 in file
      Undefined symbols for architecture ppc64:
        "__keymgr_set_and_unlock_processwide_ptr", referenced from:
            _atexit_common in crt3.o
            _atexit_common in crt3.o
            _atexit_common in crt3.o
            _atexit_common in crt3.o
            _atexit_common in crt3.o
            _atexit_common in crt3.o
            _cxa_atexit_wrapper in crt3.o
            _cxa_atexit_wrapper in crt3.o
            _cxa_atexit_wrapper in crt3.o
        "_malloc", referenced from:
            _atexit_common in crt3.o
            _atexit_common in crt3.o
        "__keymgr_get_and_lock_processwide_ptr", referenced from:
            _cxa_atexit_wrapper in crt3.o
            _cxa_atexit_wrapper in crt3.o
        "_calloc", referenced from:
            _atexit_common in crt3.o
        "__keymgr_get_and_lock_processwide_ptr_2", referenced from:
            _atexit_common in crt3.o
        "_dlopen", referenced from:
            _atexit_common in crt3.o
        "_dlsym", referenced from:
            _atexit_common in crt3.o
            _atexit_common in crt3.o
            _atexit_common in crt3.o
        "_free", referenced from:
            _cxa_atexit_wrapper in crt3.o
      ld: symbol(s) not found for architecture ppc64
      collect2: ld returned 1 exit status
      lipo: can't open input file: /var/tmp//ccuJGGXe.out (No such file or directory)
      make: *** [iodbc] Error 1
      iODBC disabled.
      ODBC support cannot be enabled due to functionality tests!
       Turn on verbose messaging (-v) to ./configure to see the final report.
       If you believe this message is in error you may use the continue
       switch (-continue) to ./configure to continue.
      Configure error
      

      If you remove odbc from the configure line, you get a similar failure for psql.

      Removing "-arch ppc64" results in a successful build, as does removing "-plugin-sql-odbc -plugin-sql-psql", suggesting that the only problems are the odbc, iodbc and psql configure tests.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            jasmcdon Jason McDonald (Closed Nokia Identity. Please assign to "macadder" instead) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes