#34856 closed defect (fixed)
qt4-mac 4.8.2: using ccache does not work
Reported by: | ii343hbka | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.1 |
Keywords: | haspatch | Cc: | ak.ml@…, robsonpeixoto@…, ryandesign (Ryan Carsten Schmidt), khepler, ctreleaven (Craig Treleaven), cooljeanius (Eric Gallager) |
Port: | qt4-mac |
Description
during updating qt4-mac it fails with building section with plugins. it fails with make: * [sub-plugins-all-ordered] Error 2
last 10 lines from building log
:info:build Command failed: cd "/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.2" && /usr/bin/make -j2 -w all :info:build Exit code: 2
make[3]: Entering directory `/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.2/src/plugins/imageformats/gif' "/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.2/bin/qmake" -spec /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.2/mkspecs/macx-g++ -o "/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.2/./src/plugins/imageformats/gif" "/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.2/src/plugins/imageformats/gif/gif.pro" ld: library not found for -ljpeg collect2: ld returned 1 exit status
seems ld missing jpeg library, even if it was installed
Attachments (4)
Change History (41)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | qt4-mac build fail ld -ljpeg removed |
---|---|
Owner: | changed from macports-tickets@… to michaelld@… |
Summary: | qt4-mac 4.8.2 build fails with ld error → qt4-mac 4.8.2: ld: library not found for -ljpeg |
comment:2 Changed 12 years ago by ii343hbka
I'm using OSx 10.7.4 and 4.2.1 Xcode
here is macports output about jpeg port
[Users/ii343hbka] > installed jpeg The following ports are currently installed: jpeg @8d_0+universal (active) platform='darwin 11' archs='i386 x86_64' [Users/ii343hbka] > contents jpeg Port jpeg contains: /opt/local/bin/cjpeg /opt/local/bin/djpeg /opt/local/bin/jpegtran /opt/local/bin/rdjpgcom /opt/local/bin/wrjpgcom /opt/local/include/jconfig.h /opt/local/include/jerror.h /opt/local/include/jmorecfg.h /opt/local/include/jpeglib.h /opt/local/lib/libjpeg.8.dylib /opt/local/lib/libjpeg.a /opt/local/lib/libjpeg.dylib /opt/local/lib/libjpeg.la /opt/local/share/doc/jpeg/README /opt/local/share/doc/jpeg/change.log /opt/local/share/doc/jpeg/libjpeg.txt /opt/local/share/doc/jpeg/structure.txt /opt/local/share/doc/jpeg/usage.txt /opt/local/share/doc/jpeg/wizard.txt /opt/local/share/man/man1/cjpeg.1.gz /opt/local/share/man/man1/djpeg.1.gz /opt/local/share/man/man1/jpegtran.1.gz /opt/local/share/man/man1/rdjpgcom.1.gz /opt/local/share/man/man1/wrjpgcom.1.gz [Users/ii343hbka] >
comment:3 Changed 12 years ago by michaelld (Michael Dickens)
The log shows:
:info:build Undefined symbols for architecture x86_64: :info:build "qt_convert_rgb888_to_rgb32_ssse3(unsigned int*, unsigned char const*, int)", referenced from: :info:build QJpegHandler::QJpegHandler()in qjpeghandler.o :info:build ld: symbol(s) not found for architecture x86_64 :info:build collect2: ld returned 1 exit status :info:build Undefined symbols for architecture i386: :info:build "qt_convert_rgb888_to_rgb32_ssse3(unsigned int*, unsigned char const*, int)", referenced from: :info:build QJpegHandler::QJpegHandler()in qjpeghandler.o :info:build ld: symbol(s) not found for architecture i386
so this is really a Qt internal issue, probably about the way it is detecting the processor vector instructions (SSE etc).
comment:4 Changed 12 years ago by michaelld (Michael Dickens)
Are you sure the attached log and the one from the header are the same?
comment:5 Changed 12 years ago by michaelld (Michael Dickens)
Also, please compress logfiles, but especially Qt's since it's so big. Just makes uploading and downloading easier & faster.
comment:6 follow-up: 7 Changed 12 years ago by michaelld (Michael Dickens)
What do the following return:
uname -a xcodebuild -version port version
comment:7 Changed 12 years ago by ii343hbka
versions:
MBP81:~ ii343hbka$ uname -a Darwin MBP81.local 11.4.0 Darwin Kernel Version 11.4.0: Mon Apr 9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64 MBP81:~ ii343hbka$ xcodebuild -version Xcode 4.2.1 Build version 4D502 MBP81:~ ii343hbka$ port version Version: 2.1.1
and i'm sure about logs. i just saw an error and try to resolve the place where it occurred i saw error at 8649 line in logfile that i attach than i try to do it by myself and get that error with libjpeg linking
Maybe Qt4 qjpeghandler.o somehow depends on libjpeg
and as you can see to lines upper your log there is
:info:build rm -f libqjpeg.dylib :info:build /usr/bin/llvm-g++-4.2 -headerpad_max_install_names -arch x86_64 -arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.7.sdk -single_module -dynamiclib -Xarch_x86_64 -mmacosx-version-min=10.7 -o libqjpeg.dylib .obj/release-shared/qjpeghandler.o .obj/release-shared/main.o -ljpeg -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.2/lib -lQtGui -lQtCore
so i think it's really Qt problem :(
comment:8 Changed 12 years ago by michaelld (Michael Dickens)
Can you try:
sudo port clean qt4-mac sudo port upgrade qt4-mac
and see if the error still happens? Sometimes cruft happens and cleaning it helps. Doubtful, but worth a try.
comment:9 Changed 12 years ago by michaelld (Michael Dickens)
XCode 4.3.2 is available and free. Maybe upgrading to it will help?
Changed 12 years ago by ii343hbka
Attachment: | qt4-mac-buildlog_140612-2156.tar.gz added |
---|
qt4-mac-buildlog_140612-2156
comment:10 Changed 12 years ago by ii343hbka
trying
port clean port install +quartz -universal
and the last few lines from output is
-everywhere-opensource-src-4.8.2/src/plugins/graphicssystems/trace' make[2]: Leaving directory `/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.2/src/plugins/graphicssystems' make[1]: Leaving directory `/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.2/src/plugins' make: *** [sub-plugins-all-ordered] Error 2 make: Leaving directory `/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.2' Command failed: cd "/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.2" && /usr/bin/make -j2 -w all Exit code: 2 Error: org.macports.build for port qt4-mac returned: command execution failed Warning: targets not executed for qt4-mac: org.macports.activate org.macports.build org.macports.destroot org.macports.install Error: Failed to install qt4-mac Please see the log file for port qt4-mac for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac/qt4-mac/main.log Error: The following dependencies were not installed: qt4-mac Error: Unable to upgrade port: 1 Error rebuilding doxygen while executing "error "Error rebuilding $portname"" (procedure "revupgrade_scanandrebuild" line 370) invoked from within "revupgrade_scanandrebuild broken_port_counts $opts" (procedure "macports::revupgrade" line 5) invoked from within "macports::revupgrade $opts" (procedure "action_revupgrade" line 2) invoked from within "action_revupgrade $action $portlist $opts" (procedure "action_target" line 94) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 95) invoked from within "process_cmd $line" (procedure "process_command_file" line 42) invoked from within "process_command_file $in" (procedure "process_command_files" line 15) invoked from within "process_command_files $ui_options(ports_commandfiles)" invoked from within "if { ($exit_status == 0 || [macports::ui_isset ports_processall]) && [info exists ui_options(ports_commandfiles)] } { set exit_status [process_com..." (file "/opt/local/bin/port" line 4791)
then macports crashed so build log is broken as well but i've attached it
comment:11 Changed 12 years ago by ii343hbka
it's strange, but
[Users/ii343hbka] > installed qt4-mac
shows
qt4-mac @4.7.4_1+demos+examples+odbc+quartz+raster+universal platform='darwin 11' archs='i386 x86_64' qt4-mac @4.8.2_0+quartz-universal (active) platform='darwin 11' archs='x86_64'
and QtDesigner launching 4.8.2 version
maybe +raster variant brakes building
comment:12 Changed 12 years ago by michaelld (Michael Dickens)
The 2nd attached log shows the same issue as the first. Thus, maybe it could be the +raster that's the issue; I don't know that I've ever tried that variant. I'll try that once I get the +framework install from another ticket working.
comment:13 follow-up: 14 Changed 12 years ago by ii343hbka
well, thanks a lot! i think ticket maybe closed
comment:14 Changed 12 years ago by ii343hbka
or i can try build qt4 with all my variant exclude +raster
what should i do?
comment:15 Changed 12 years ago by michaelld (Michael Dickens)
Try to build without +raster, but with whatever other variants you like. I'll leave this ticket open. Hopefully we'll figure out the actual issue (not just +raster, but the coding error) and find a way to correct it.
comment:16 Changed 12 years ago by ii343hbka
installing qt4-mac +framework+odbc+quartz+universal fails with the same error as earlier :(
comment:17 Changed 12 years ago by michaelld (Michael Dickens)
Are you willing to upgrade to XCode 4.3.2? I don't know if that will help, but it might. I'll start looking into that undefined symbol ("qt_convert_rgb888_to_rgb32_ssse3") to see what's going on.
comment:19 Changed 12 years ago by ii343hbka
well. i've installed new xcode 4.3.3 from appstore, command line tools and other staff, but it's still fails on building plugins
comment:20 Changed 12 years ago by michaelld (Michael Dickens)
OK; thanks for trying. What Mac type / model are you using for this compile?
I've tracked down the symbol to "src/gui/image/qimage_ssse3.cpp", and it is enclosed in the macro "#ifdef QT_HAVE_SSSE3". This macro will be defined in "mkspecs/features/qt.prf" line 223 "ssse3:DEFINES += QT_HAVE_SSSE3" if SSE3 is detected as part of QMake's build. So, for some reason maybe QMake does not register SSE3 detection for your computer's CPU; and maybe the plugin isn't "#ifdef QT_HAVE_SSSE3" around the symbol? I'll also search around the internet a bit and see if anyone else has had this issue.
So, what I'll need is the -full- build log (again, with the new XCode) -- so please "clean qt4-mac" first, then either install or upgrade until it errors out, with whatever variants you like. Then attached the compressed log file to this ticket & I'll see if I can make any sense of this.
Changed 12 years ago by ii343hbka
Attachment: | qt4-mac-buildlog_160612.tar.gz added |
---|
comment:21 Changed 12 years ago by ii343hbka
i'm using MacBook Pro late '11(8.1) with i5-2435 build log i've attached
comment:24 Changed 12 years ago by michaelld (Michael Dickens)
Thanks. From the logfile, "qimage_ssse3.cpp" is not being compiled into that library. I need to look over the log file and do a bit more sleuthing; I'll post again when I know, or think I know, more. It's amazing how good compression is these days: the .tar.gz logfile is a mere 211 kB but uncompressed it's 14.2 MB. Nice!
comment:25 Changed 12 years ago by michaelld (Michael Dickens)
For anyone else (not the OP): can you post your Mac type/model and the output of
uname -a xcodebuild -version port version
comment:26 Changed 12 years ago by pixilla (Bradley Giesbrecht)
$ uname -a;xcodebuild -version;port version;port -q installed qt4-mac and active Darwin pillbox.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 Xcode 3.2.6 Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0 BuildVersion: 10M2518 Version: 2.1.99 qt4-mac @4.7.4_1+quartz+universal (active)
comment:27 Changed 12 years ago by michaelld (Michael Dickens)
Can you try again with ccache disabled? I doubt this is the issue, but if you have a few spare cycles trying this can't hurt.
comment:28 Changed 12 years ago by ii343hbka
Without ccache it built successfully. can't understand how ccache could affect
And one more question:
cat i leave ccache enabled in the macports.conf and use configure.configureccache=no
where enabled ccache can cause a build failure?
comment:29 Changed 12 years ago by michaelld (Michael Dickens)
OK; thanks. That gives me a hint where to look. There's a difference in Qt's 'configure' script between 4.8.1 and 4.8.2 where I had to remove a patch that was put in place specifically to allow ccache to work in all phases. So, it's possible that I need to re-work the intent of that patch back in somehow. I don't remember the exact reason why using ccache messed up compiling back in the 4.7 series, but the end result was that ccache was required for -all- testing and compiling, and this patch to configure was the only way to get it in place throughout.
comment:30 Changed 12 years ago by michaelld (Michael Dickens)
Yes, you can use a command-line variable to set ccache manually each time and override a global macports.conf setting; I think it's "configure.ccache".
comment:31 Changed 12 years ago by michaelld (Michael Dickens)
Summary: | qt4-mac 4.8.2: ld: library not found for -ljpeg → qt4-mac 4.8.2: using ccache does not work |
---|
When I enable ccache (via 'configure.ccache=yes' after the port command line), I get the same error; which is good since I can now work locally to fix the issue. I'll work on it.
comment:32 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|
I've had the same error too, and can confirm that disabling ccache works around the problem. You should commit a change to the qt4-mac Portfile (and the qt4-mac-devel Portfile, if it's also affected) to disable ccache. If you can later find a better way to fix it that allows ccache to still be used, then by all means do that. But for now, something should be done so users don't run into this problem, and waste hours on failed builds in the process. I recommend committing the patch I'll attach momentarily.
Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | qt4-mac-no-ccache.diff added |
---|
comment:36 Changed 12 years ago by michaelld (Michael Dickens)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I've disabled ccache in r96486. I don't know why ccache isn't working. I've tried a bunch of things to get it working, with no success. I'll continue to hack on this issue, but don't hold your breath. I'm closing this ticket as "fixed"; if you want to be able to use ccache with qt4-mac, please open a new ticket to address that augmentation.
Please attach the main.log file.
Is the jpeg port installed and active? It is declared as a dependency of qt4-mac so it should be. Does it contain the libjpeg.dylib file?
What OS version and Xcode version are you using?