Opened 12 years ago

Closed 12 years ago

#37581 closed defect (fixed)

qt4-mac @4.8.4_2 build failure: library not found for -ldbus-1

Reported by: willy.wolff.0@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: qt4-mac

Description

Don't compile under lion. dbus package are installed.

Attachments (1)

main.log (1.2 MB) - added by willy.wolff.0@… 12 years ago.

Download all attachments as: .zip

Change History (15)

Changed 12 years ago by willy.wolff.0@…

Attachment: main.log added

comment:1 Changed 12 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to michaelld@…
Summary: fail dbus linkingqt4-mac @4.8.4_2 build failure: library not found for -ldbus-1

Please remember to Cc the maintainer.

The relevant error appears to be:

:info:build /usr/bin/clang++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -single_module -dynamiclib -compatibility_version	4.8 -current_version	4.8.4 -install_name	/opt/local/Library/Frameworks/QtDBus.framework/Versions/4/QtDBus -Xarch_x86_64 -mmacosx-version-min=10.7 -Xarch_x86_64 -mmacosx-version-min=10.7 -o QtDBus .obj/release-shared/qdbusconnection.o .obj/release-shared/qdbusconnectioninterface.o .obj/release-shared/qdbuserror.o .obj/release-shared/qdbusintegrator.o .obj/release-shared/qdbusmessage.o .obj/release-shared/qdbusserver.o .obj/release-shared/qdbusabstractinterface.o .obj/release-shared/qdbusinterface.o .obj/release-shared/qdbusxmlparser.o .obj/release-shared/qdbusutil.o .obj/release-shared/qdbusintrospection.o .obj/release-shared/qdbusabstractadaptor.o .obj/release-shared/qdbusinternalfilters.o .obj/release-shared/qdbusmetaobject.o .obj/release-shared/qdbusxmlgenerator.o .obj/release-shared/qdbusmisc.o .obj/release-shared/qdbusargument.o .obj/release-shared/qdbusreply.o .obj/release-shared/qdbusmetatype.o .obj/release-shared/qdbusextratypes.o .obj/release-shared/qdbuscontext.o .obj/release-shared/qdbuspendingcall.o .obj/release-shared/qdbuspendingreply.o .obj/release-shared/qdbus_symbols.o .obj/release-shared/qdbusservicewatcher.o .obj/release-shared/qdbusunixfiledescriptor.o .obj/release-shared/qdbusvirtualobject.o .obj/release-shared/moc_qdbusconnectioninterface.o .obj/release-shared/moc_qdbusserver.o .obj/release-shared/moc_qdbusconnection.o .obj/release-shared/moc_qdbusabstractadaptor.o .obj/release-shared/moc_qdbusvirtualobject.o .obj/release-shared/moc_qdbusconnection_p.o .obj/release-shared/moc_qdbuspendingcall_p.o  -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.4/Library/Frameworks -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.4/lib  -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.4/Library/Frameworks -F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.4/lib -L/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.4/lib -framework QtXml -framework QtCore -ldbus-1 
:info:build ld: warning: directory not found for option '-F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.4/Library/Frameworks'
:info:build ld: warning: directory not found for option '-F/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/work/qt-everywhere-opensource-src-4.8.4/Library/Frameworks'
:info:build ld: library not found for -ldbus-1

comment:2 Changed 12 years ago by jmroot (Joshua Root)

Any particular reason you are using -quartz, BTW? Granted, the variant does nothing in qt4-mac (except prevent you from using a prebuilt archive when you turn it off).

comment:3 Changed 12 years ago by michaelld (Michael Dickens)

What do the following return:

xcodebuild -version
uname -a
/usr/bin/g++ -v
/usr/bin/clang++ -v

I'm pretty sure the last one will return something like "Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)", which is not recent enough to successfully build qt4-mac. If so, I recommend doing the following:

sudo port uninstall qt4-mac
sudo port install qt4-mac configure.compiler=llvm-gcc-4.2

and, add any variants you want/need between "qt4-mac" and "configure". And, then I will also fix qt4-mac to block this version of clang.

comment:4 Changed 12 years ago by michaelld (Michael Dickens)

Also, please compress big log files before uploading. You'll be surprised how small Qt's log file will become!

comment:5 Changed 12 years ago by michaelld (Michael Dickens)

If you're handy at patching the Portfile, I think this is the correct thing to do:

 compiler.blacklist { macports-clang-2.9 macports-clang-3.0 }
-if {[vercmp $xcodeversion 4.4] <= 0} {
+if {[vercmp $xcodeversion 4.4] <= 0 || $MINOR <= 7} {
     compiler.blacklist-append clang
 }

and, if you could try this I'd be obliged.

comment:6 Changed 12 years ago by michaelld (Michael Dickens)

I'm going to comment out the quartz variant. I'd guess that the OP has -quartz set as a global default variant.

The issue here, I believe, is that this version of clang does not honor LIBRARY_PATH. For whatever reason, it seems as though Apple's Xcode installs different versions of clang depending on the OS version. Hence, I/we have to be more careful in which versions of clang I/we block -- I think this is all that's really the issue here.

comment:7 in reply to:  3 Changed 12 years ago by willy.wolff.0@…

xcodebuild -version Xcode 4.5.2 Build version 4G2008a

uname -a Darwin mac-mini 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64

/usr/bin/g++ -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/[cg][.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)

/usr/bin/clang++ -v Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix

comment:8 Changed 12 years ago by michaelld (Michael Dickens)

Interesting. I still think it is a clang issue, so I've just checked in r101393, which blocks Apple's clang on 10.7 or earlier. So, in something like 30 minutes this revision will become "live", and I'd recommend you do:

sudo port selfupdate
ff=`port installed qt4-mac | sed -e 1d -e "s@(active)@@g"`
sudo port -f uninstall $ff
sudo port -s install qt4-mac

and, add what variants you wish to this last command. Hopefully the qt4-mac install will work this time.

comment:9 Changed 12 years ago by jmroot (Joshua Root)

That isn't the clang version that comes with Xcode 4.5.2. On my 10.7 system:

% xcodebuild -version
Xcode 4.5.2
Build version 4G2008a
% /usr/bin/clang++ -v
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

comment:10 Changed 12 years ago by michaelld (Michael Dickens)

Interesting. Maybe the OP needs to have Xcode reinstall the command line tools? Do we have to do that every time a new Xcode is installed? I just checked mine (4.5.2), and it found new tools; how was -I- to have known, I who spend a lot of time working with them? I did not have "Automatically download and install" checked, for some reason.

To manually install the new command line tools from Xcode: You start Xcode running, then go into Preferences, Downloads, Components. Click on "Check and Install Now" to retrieve the latest versions of everything. Then, for the "Command Line Tools" if there is an "Install" button click that. Eventually, updated command line tools will be installed.

comment:11 Changed 12 years ago by michaelld (Michael Dickens)

To the OP: Please do the command line tools install as I write in the previous entry. After it is done, re-do "/usr/bin/clang++ -v" and please report what it returns.

I'm wondering if on the "Downloads" tab of the Xcode.app Preferences, the checkbox for ""Check for and install updates automatically" was checked? It was not for me, and hence my command line tools had to be updated manually (by me). I recommend checking that box and allowing Xcode to do what it needs to do.

comment:12 in reply to:  11 ; Changed 12 years ago by willy.wolff.0@…

I not using Xcode, i prefer emacs. I do the update, and now it works. qt4-mac is installed. Thanks a lot.

comment:13 in reply to:  12 Changed 12 years ago by willy.wolff.0@…

/usr/bin/clang++ -v Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix

comment:14 Changed 12 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

Thanks! I'm glad it's working now. I think the combination of my qt4-mac update to block Clang in 10.7 and older, and you updating your Xcode install, did the trick.

Note: See TracTickets for help on using tickets.