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. Error building 4.8.0 from source on Mac OSX Lion
Qt 6.11 is out! See what's new in the release blog

Error building 4.8.0 from source on Mac OSX Lion

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 2.3k 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.
  • J Offline
    J Offline
    jettoblack
    wrote on last edited by
    #1

    OSX 10.7.3 with Xcode 4.2, trying to build Qt 4.8.0 from source using "./configure -arch x86" (I'm stuck in 32-bit because of QTKit/QuickTime APIs I need, and the pre-built Qt libs are 64-bit only). I also tried "./configure -arch x86 -arch x86_64" with the same result.

    The build was going ok for quite some time (over an hour) but then failed at this point. It seems to be a problem linking "libqsqlmysql_debug.dylib" for i386, but I'm not exactly sure.

    Any ideas? Should I update to XCode 4.3 (I've heard its very buggy)? Do I need more options in my Qt configure to get this to work? Thanks!

    @
    g++ -headerpad_max_install_names -arch i386 -single_module -dynamiclib -Xarch_i386 -mmacosx-version-min=10.4 -o libqsqlmysql_debug.dylib .obj/debug-shared/main.o .obj/debug-shared/qsql_mysql.o .obj/debug-shared/moc_qsql_mysql.o -F/Users/jasonlivingston/Downloads/qt-everywhere-opensource-src-4.8.0/lib -L/Users/jasonlivingston/Downloads/qt-everywhere-opensource-src-4.8.0/lib -L/usr/local/mysql/lib -lmysqlclient_r -lpthread -framework QtSql -L/Users/jasonlivingston/Downloads/qt-everywhere-opensource-src-4.8.0/lib -F/Users/jasonlivingston/Downloads/qt-everywhere-opensource-src-4.8.0/lib -framework QtCore
    ld: warning: ignoring file /usr/local/mysql/lib/libmysqlclient_r.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
    Undefined symbols for architecture i386:
    "_mysql_affected_rows", referenced from:
    QMYSQLResult::nextResult() in qsql_mysql.o
    QMYSQLResult::reset(QString const&) in qsql_mysql.o
    @
    [...]
    @
    ld: symbol(s) not found for architecture i386
    collect2: ld returned 1 exit status
    make[4]: *** [../../../../plugins/sqldrivers/libqsqlmysql_debug.dylib] Error 1
    make[3]: *** [debug-all] Error 2
    make[2]: *** [sub-mysql-make_default] Error 2
    make[1]: *** [sub-sqldrivers-make_default] Error 2
    make: *** [sub-plugins-make_default-ordered] Error 2
    @

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      The error message is quite clear here: You're building Qt for (at least) i386 architecture, but the mysql libs are built for some different architecture(s) (probably x86_64). You need to either get mysql for the needed architecture, or build Qt for the architecture of your mysql installation.

      http://www.catb.org/~esr/faqs/smart-questions.html

      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