Opened 13 years ago
Closed 13 years ago
#30278 closed update (fixed)
Can qt4-mac-devel be updated to Qt 4.8.0 beta?
Reported by: | trojanfoe@… | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | carsomyr@…, fracai | |
Port: | qt4-mac-devel |
Description
Building Qt 4.7.3 doesn't work under Mac OS Lion, but there is talk that 4.8.0 beta does build. Can the qt4-mac-devel port please be updated to 4.8.0 beta so it can be used?
Attachments (4)
Change History (31)
comment:1 Changed 13 years ago by mf2k (Frank Schima)
Keywords: | qt4-mac-devel update removed |
---|---|
Milestone: | MacPorts 2.0.0 |
Owner: | changed from macports-tickets@… to michaelld@… |
Type: | request → update |
Version: | 2.0.99 |
comment:2 Changed 13 years ago by michaelld (Michael Dickens)
comment:3 Changed 13 years ago by trojanfoe@…
The download is available from the usual place (http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.8.0-beta1.tar.gz).
I will have a look at getting it running in your absence.
comment:4 Changed 13 years ago by trojanfoe@…
Qt 4.8.0 beta 1 builds fine under Lion (outside of MacPorts) but does not install correctly (qt_menu.nib is not installed correctly so all .app's fail to launch). I have tried to workaround this by manually installing it, but it does not help, so unless anyone else knows how to fix this we need to wait for 4.8.0 beta 2.
comment:5 Changed 13 years ago by michaelld (Michael Dickens)
The current qt4-mac Portfile uses the following code to install the NIB:
set destroot_qt ${destroot}${qt_dir} # install qt_menu.nib, used by any applications making use of Qt's application class. xinstall -m 755 -d ${destroot_qt}/lib/Resources copy ${worksrcpath}/src/gui/mac/qt_menu.nib \ ${destroot_qt}/lib/Resources
so you'll probably need to update the copy location, but otherwise that should work for non-framework installs. IIRC, the NIB is installed for the framework version.
comment:6 Changed 13 years ago by carsomyr@…
I submitted patches earlier to transition from 4.7.3 to 4.8.0-beta1 on another issue, unaware that this one existed. In case anyone is interested, I've attached that Port patch archive. To use, simply create a copy of the qt4-mac directory from the SVN trunk and apply the patches found herein. The changes should rename the Port to qt4-mac-devel and build for the 4.8.0-beta1 release. I built it, and no problems encountered so far. Qt applications like LyX work fine.
comment:7 Changed 13 years ago by trojanfoe@…
Thanks for the patches! I get a single failure while trying a dry-run though:
$ for f in ~andy/Downloads/patch/patch-*; do patch -p0 --dry-run < $f; done patching file Portfile Hunk #3 FAILED at 82. Hunk #4 succeeded at 113 (offset 3 lines). 1 out of 4 hunks FAILED -- saving rejects to file Portfile.rej patching file files/patch-QtHelp_10.4_only.diff patching file files/patch-configure-arch.diff patching file files/patch-macosx-deployment-target.diff patching file files/patch-mkspecs-features-qt.prf.diff patching file files/patch-mkspecs-features-qt_functions.prf.diff patching file files/patch-mkspecs_common_mac.conf.diff patching file files/patch-mkspecs_darwin-g++_qmake.conf.diff patching file files/patch-src-plugins-bearer-corewlan-corewlan.pro.diff
comment:9 follow-up: 13 Changed 13 years ago by carsomyr@…
Trojan, I think the reason for the patch failure is because qt4-mac is a moving target. In any case, I've uploaded an updated Port patch archive. I've also uploaded the qt4-mac-devel Port archive for those who don't want to apply patches.
comment:10 Changed 13 years ago by trojanfoe@…
Many thanks! That is working against a downloaded MacPorts 2.0.0.
comment:12 Changed 13 years ago by bm55b@…
Had trouble pulling the tarball from Nokia. This was a good work around
wget ftp://mirror1.mirror.garr.it/mirrors/qt/qt-everywhere-opensource-src-4.8.0-beta1.tar.gz sudo cp qt-everywhere-opensource-src-4.8.0-beta1.tar.gz /opt/local/var/macports/distfiles/qt4-mac-devel/ sudo chown macports /opt/local/var/macports/distfiles/qt4-mac-devel/qt-everywhere-opensource-src-4.8.0-beta1.tar.gz
comment:13 Changed 13 years ago by rmstonecipher@…
Replying to carsomyr@…:
Trojan, I think the reason for the patch failure is because qt4-mac is a moving target. In any case, I've uploaded an updated Port patch archive. I've also uploaded the qt4-mac-devel Port archive for those who don't want to apply patches.
Roy,
I tried testing your archive of qt4-mac-devel but came up with some UsingTheRightCompiler errors.
The Portfile uses reinplace to replace "g++" and "gcc" with ${configure.cc}, but the files in which the substitution would occur have been deprecated.
The following change to the Portfile fixes the error but is not the best solution:
@@ -120,5 +120,9 # Ensure that correct C/C++ compilers are used. - reinplace "s| g++\$| ${configure.cxx}|" \ - ${worksrcpath}/mkspecs/common/g++.conf - reinplace "s| gcc\$| ${configure.cc}|" \ - ${worksrcpath}/mkspecs/common/g++.conf + reinplace "s| g++\$| ${configure.cxx}|" \ + ${worksrcpath}/mkspecs/common/g++-base.conf + reinplace "s| g++\$| ${configure.cxx}|" \ + ${worksrcpath}/mkspecs/common/g++-unix.conf + reinplace "s| gcc\$| ${configure.cc}|" \ + ${worksrcpath}/mkspecs/common/g++-base.conf + reinplace "s| gcc\$| ${configure.cc}|" \ + ${worksrcpath}/mkspecs/common/g++-unix.conf
I am unsure of whether g++-base.conf or g++-unix.conf is used for Mac.
It would be better to use a patch to substitute a placeholder (e.g. "%%CONFIGURE.CC%%") in files which call "g++" or "gcc".
This placeholder could then be reinplace'd post-patch with "${configure.cc}".
If something changes upstream and the patch cannot be applied the maintainer can determine if (1) the patch is no longer necessary or (2) the patch needs to be updated to point to different files and/or lines.
Cheers,
Ryan Stonecipher
comment:15 Changed 13 years ago by rmstonecipher@…
Roy,
Yes to both Lion and Xcode 4.1.
Build log attached.
Cheers,
Ryan Stonecipher
comment:16 Changed 13 years ago by carsomyr@…
Ryan, the build log shows that the a .o file is too large. Do you think it has something to do with the configuration of your machine (perhaps memory)? If you applied the patch above, did it fix your problem?
Changed 13 years ago by carsomyr@…
Attachment: | patch-4.7.3-to-4.8.0-beta1.tgz added |
---|
The Port patch archive for building the 4.8.0-beta1 release (revision 3).
Changed 13 years ago by carsomyr@…
Attachment: | qt4-mac-devel-4.8.0-beta1.tgz added |
---|
The qt4-mac-devel Port for 4.8.0-beta1 (revision 2).
comment:17 Changed 13 years ago by carsomyr@…
I've attached an updated Port archive and Port patch archive which should address Ryan's problem and incorporate the latest changes in qt4-mac. Can these be considered for updating qt4-mac-devel in trunk?
comment:18 Changed 13 years ago by michaelld (Michael Dickens)
I"ve downloaded your archive, and am looking at it. Hopefully I'll get something checked in later today.
comment:19 Changed 13 years ago by carsomyr@…
Michael, you may want to look at both archives. The patch archive contains patches that apply on top of your qt4-mac. You can use those to verify that I haven't done anything out of the ordinary. The patches came out surprisingly clean. You may notice that I added a patch for replacement purposes and slightly modified the reinplace for "gcc" and "g++". I found only one file -- g++-base.conf -- that contained references to compilers. All the other files seem to include this one. I can't guarantee there are other sites where replacement is necessary, but I did my best.
comment:20 Changed 13 years ago by michaelld (Michael Dickens)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Done in r82207.
comment:23 Changed 13 years ago by trojanfoe@…
Is anyone getting errors when building 'debug' using 4.8.0-beta1?
/Developer/usr/bin/llvm-g++-4.2 -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.7 -o debug/myapp.app/Contents/MacOS/myapp debug/file1.o debug/file2.o -L/opt/local/lib -lQtSql_debug -lQtGui_debug -lQtCore_debug
There is only one _debug file in /opt/local/lib though:
$ ls -l /opt/local/lib/*_debug* -rw-r--r-- 1 root admin 11442312 27 Aug 00:48 /opt/local/lib/libQtUiTools_debug.a -rw-r--r-- 1 root admin 904 27 Aug 00:50 /opt/local/lib/libQtUiTools_debug.prl
comment:24 Changed 13 years ago by trojanfoe@…
Note: I don't think I build qt4-mac-devel using the debug variant. I'll try that now....
comment:25 Changed 13 years ago by trojanfoe@…
OK, so I've tried to build qt4-mac-devel with the variants +debug, +universal, +demos and +examples and after many long hours I get:
---> Computing dependencies for qt4-mac-devel ---> Fetching archive for qt4-mac-devel ---> Attempting to fetch qt4-mac-devel-4.8.0-beta1_0+debug+demos+examples+quartz+universal.darwin_11.i386-x86_64.tbz2 from http://packages.macports.org/qt4-mac-devel ---> Fetching qt4-mac-devel ---> Verifying checksum(s) for qt4-mac-devel ---> Extracting qt4-mac-devel ---> Applying patches to qt4-mac-devel ---> Configuring qt4-mac-devel ---> Building qt4-mac-devel Error: Target org.macports.build returned: shell command failed (see log for details) Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
However the logfile (/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac-devel/qt4-mac-devel/main.log) doesn't appear to show anything useful (unloaded anyway). Is there another logfile?
Changed 13 years ago by trojanfoe@…
Attachment: | trojanfoe_qt4-mac-devel-main.log added |
---|
Attempt to build qt4-mac-devel using +debug +universal +demos +examples
comment:26 Changed 13 years ago by trojanfoe@…
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:27 Changed 13 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
This ticket is about the update, which is done. Open a new defect ticket.
My understanding (from http://labs.qt.nokia.com/2011/07/19/qt-4-8-beta-released/ ) is that Qt 4.8 beta "will be available as an online Qt SDK 1.1 update only." I'm traveling right now, and have only sporadic access to the internet -- so I probably won't be able to do anything on this ticket until early August when I'm back. In the interim, maybe someone can figure out the download sequence -- the tarball, and how to extract and access the beta code?