| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 2 | |
I have a QT application that I initially developed in Mac OS X 10.4. I recently upgraded my build machine to 10.5 and rebuilt the app. Now it works on 10.5, but fails to launch on 10.4, throwing the error: "dyld: Library not loaded: /usr/lib/libiconv.2.dylib Referenced from: /Applications/AssetTracker.app/Contents/MacOS/ AssetTracker Reason: Incompatible library version: AssetTracker requires version 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0" obviously this library was updated between 10.4 and 10.5, so my app is now expecting the newer version. However, as it was running fine on 10.4, it should be possible to make it work with the older version as well. How can I manage this? I have a line in my .pro file that reads "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4" but this didn't seem to help. Thanks! ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- -- [ signature omitted ]
Israel Brewster wrote: >I have a QT application that I initially developed in Mac OS X 10.4. I >recently upgraded my build machine to 10.5 and rebuilt the app. Now it >works on 10.5, but fails to launch on 10.4, throwing the error: > > "dyld: Library not loaded: /usr/lib/libiconv.2.dylib > Referenced from: /Applications/AssetTracker.app/Contents/MacOS/ >AssetTracker > Reason: Incompatible library version: AssetTracker requires version >7.0.0 or later, but libiconv.2.dylib provides version 5.0.0" > >obviously this library was updated between 10.4 and 10.5, so my app is >now expecting the newer version. However, as it was running fine on >10.4, it should be possible to make it work with the older version as >well. How can I manage this? I have a line in my .pro file that reads >"QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4" but this didn't seem to help. >Thanks! Qt 4.3.3 is the first version of Qt that officially supports MacOS X 10.5 (Tiger). If you're using an older version, please upgrade. With 4.3.3, you can build on Leopard and deploy on Tiger and Panther. Older versions will run at exactly that problem you saw (because Apple changed the iconv functions, so it's not our fault). -- [ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.
On Dec 11, 2007, at 2:44 PM, Thiago Macieira wrote: > Israel Brewster wrote: >> I have a QT application that I initially developed in Mac OS X >> 10.4. I >> recently upgraded my build machine to 10.5 and rebuilt the app. Now >> it >> works on 10.5, but fails to launch on 10.4, throwing the error: >> >> "dyld: Library not loaded: /usr/lib/libiconv.2.dylib >> Referenced from: /Applications/AssetTracker.app/Contents/MacOS/ >> AssetTracker >> Reason: Incompatible library version: AssetTracker requires version >> 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0" >> >> obviously this library was updated between 10.4 and 10.5, so my app >> is >> now expecting the newer version. However, as it was running fine on >> 10.4, it should be possible to make it work with the older version as >> well. How can I manage this? I have a line in my .pro file that reads >> "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4" but this didn't seem to help. >> Thanks! > > Qt 4.3.3 is the first version of Qt that officially supports MacOS X > 10.5 > (Tiger). If you're using an older version, please upgrade. > > With 4.3.3, you can build on Leopard and deploy on Tiger and Panther. > Older versions will run at exactly that problem you saw (because Apple > changed the iconv functions, so it's not our fault). Thanks for the info. I am, however, using Qt 4.3.3: qmake -v QMake version 2.01a Using Qt version 4.3.3 in /Library/Frameworks ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- > > > -- > Thiago José Macieira - thiago.macieira AT trolltech.com > Trolltech ASA - Sandakerveien 116, NO-0402 Oslo, Norway -- [ signature omitted ]
Two additional things: 1. When you build Qt, make sure you use the -sdk /Developer/SDKs/MacOSX10.4u.sdk as one of the parameters to configure. 2. Double check your XCode project. Make sure under project info, the General Tab, you have set: Cross-Develop Using Target SDK: Mac OS X 10.4 (Universal) In my .profile I also have: export MACOSX_DEPLOYMENT_TARGET="10.4" I was able to get Qt 4.3.1 to build this way on Leopard and deploy on Tiger, but I have since moved up to 4.3.3. Richard On Dec 11, 2007, at 6:55 PM, Israel Brewster wrote: > On Dec 11, 2007, at 2:44 PM, Thiago Macieira wrote: > >> Israel Brewster wrote: >>> I have a QT application that I initially developed in Mac OS X >>> 10.4. I >>> recently upgraded my build machine to 10.5 and rebuilt the app. >>> Now it >>> works on 10.5, but fails to launch on 10.4, throwing the error: >>> >>> "dyld: Library not loaded: /usr/lib/libiconv.2.dylib >>> Referenced from: /Applications/AssetTracker.app/Contents/MacOS/ >>> AssetTracker >>> Reason: Incompatible library version: AssetTracker requires version >>> 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0" >>> >>> obviously this library was updated between 10.4 and 10.5, so my >>> app is >>> now expecting the newer version. However, as it was running fine on >>> 10.4, it should be possible to make it work with the older version >>> as >>> well. How can I manage this? I have a line in my .pro file that >>> reads >>> "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4" but this didn't seem to >>> help. >>> Thanks! >> >> Qt 4.3.3 is the first version of Qt that officially supports MacOS >> X 10.5 >> (Tiger). If you're using an older version, please upgrade. >> >> With 4.3.3, you can build on Leopard and deploy on Tiger and Panther. >> Older versions will run at exactly that problem you saw (because >> Apple >> changed the iconv functions, so it's not our fault). > > Thanks for the info. I am, however, using Qt 4.3.3: > > qmake -v > QMake version 2.01a > Using Qt version 4.3.3 in /Library/Frameworks > > ----------------------------------------------- > Israel Brewster > Computer Support Technician > Frontier Flying Service Inc. > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7250 x293 > ----------------------------------------------- >> >> >> -- >> Thiago José Macieira - thiago.macieira AT trolltech.com >> Trolltech ASA - Sandakerveien 116, NO-0402 Oslo, Norway > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx > with "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ > -- [ signature omitted ]
On 2007-12-12 00:55:19 +0100, Israel Brewster <israel@xxxxxxxxxxxxxxxxxx> said: > On Dec 11, 2007, at 2:44 PM, Thiago Macieira wrote: > >> Israel Brewster wrote: >>> I have a QT application that I initially developed in Mac OS X 10.4. I >>> recently upgraded my build machine to 10.5 and rebuilt the app. Now > >>> it >>> works on 10.5, but fails to launch on 10.4, throwing the error: >>> >>> "dyld: Library not loaded: /usr/lib/libiconv.2.dylib >>> Referenced from: /Applications/AssetTracker.app/Contents/MacOS/ >>> AssetTracker >>> Reason: Incompatible library version: AssetTracker requires version >>> 7.0.0 or later, but libiconv.2.dylib provides version 5.0.0" >>> >>> obviously this library was updated between 10.4 and 10.5, so my app > >>> is >>> now expecting the newer version. However, as it was running fine on >>> 10.4, it should be possible to make it work with the older version as >>> well. How can I manage this? I have a line in my .pro file that reads >>> "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4" but this didn't seem to > help. >>> Thanks! >> >> Qt 4.3.3 is the first version of Qt that officially supports MacOS X > >> 10.5 >> (Tiger). If you're using an older version, please upgrade. >> >> With 4.3.3, you can build on Leopard and deploy on Tiger and Panther. >> Older versions will run at exactly that problem you saw (because Apple >> changed the iconv functions, so it's not our fault). > > Thanks for the info. I am, however, using Qt 4.3.3: > > qmake -v > QMake version 2.01a > Using Qt version 4.3.3 in /Library/Frameworks Qt 4.3.3 does not itself link against libiconv. When Leopard was released and Apple got its UNIX certification, they changed over to using the POSIX iconv instead of the GNU iconv (wow, so many capital letters). To solve this issue in Qt, we dynamically load libiconv and resolve the symbols ourselves (taking care to check the version of the operating system, so we know which we use). If you use libiconv directly, you will have to adopt a similar pattern. Alternatively, codecForLocale() should return our iconv-based codec on Mac OS X. If you can use that, then you can remove -liconv from your link line. Hope this helps, -- Trenton -- [ signature omitted ]
On Dec 11, 2007, at 11:59 PM, Trenton Schulz wrote: > > Qt 4.3.3 does not itself link against libiconv. When Leopard was > released and Apple got its UNIX certification, they changed over to > using the POSIX iconv instead of the GNU iconv (wow, so many capital > letters). To solve this issue in Qt, we dynamically load libiconv > and resolve the symbols ourselves (taking care to check the version > of the operating system, so we know which we use). If you use > libiconv directly, you will have to adopt a similar pattern. > Alternatively, codecForLocale() should return our iconv-based codec > on Mac OS X. If you can use that, then you can remove -liconv from > your link line. Ok, yeah. I did not explicitly link against libiconv in my application, but in checking the link line in Xcode, I found that it was listed there. Removing that from the link line allowed my application to compile and run on 10.4 as well as 10.5. Well, sort of - now the SQL plugins aren't loading on 10.4 (they were before I moved to 10.5), but presumably that is a different problem. This does leave me with a couple of related questions though. Since I didn't explicitly specify -liconv in the .pro file, why is this getting added to my xcode project, and how do I make it stop (other than manually removing it after each build)? Thanks again for the assistance! ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- > > > Hope this helps, > > -- Trenton > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx > with "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ > -- [ signature omitted ]
On Dec 12, 2007, at 10:52 AM, Israel Brewster wrote: > [...snip...] > > This does leave me with a couple of related questions though. Since > I didn't explicitly specify -liconv in the .pro file, why is this > getting added to my xcode project, and how do I make it stop (other > than manually removing it after each build)? Anyone have any ideas on this? it is rather annoying to have to manually remove -liconv each time, and even more annoying when I forget, and someone winds up with a non-functioning binary :) ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- > > > Thanks again for the assistance! > > ----------------------------------------------- > Israel Brewster > Computer Support Technician > Frontier Flying Service Inc. > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7250 x293 > ----------------------------------------------- >> >> >> Hope this helps, >> >> -- Trenton >> >> -- >> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx >> with "unsubscribe" in the subject or the body. >> List archive and information: http://lists.trolltech.com/qt-interest/ >> > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx > with "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ -- [ signature omitted ]
Israel Brewster wrote: > On Dec 12, 2007, at 10:52 AM, Israel Brewster wrote: > >> [...snip...] >> >> This does leave me with a couple of related questions though. Since I >> didn't explicitly specify -liconv in the .pro file, why is this >> getting added to my xcode project, and how do I make it stop (other >> than manually removing it after each build)? > > Anyone have any ideas on this? it is rather annoying to have to manually > remove -liconv each time, and even more annoying when I forget, and > someone winds up with a non-functioning binary :) Is it in the appropriate mkspecs/*.conf file? best regards Andy Brice http://www.perfecttableplan.com http://www.successfulsoftware.net -- [ signature omitted ]
On Dec 13, 2007, at 8:32 AM, Oryx Digital Ltd wrote: > Israel Brewster wrote: >> On Dec 12, 2007, at 10:52 AM, Israel Brewster wrote: >>> [...snip...] >>> >>> This does leave me with a couple of related questions though. >>> Since I didn't explicitly specify -liconv in the .pro file, why is >>> this getting added to my xcode project, and how do I make it stop >>> (other than manually removing it after each build)? >> Anyone have any ideas on this? it is rather annoying to have to >> manually remove -liconv each time, and even more annoying when I >> forget, and someone winds up with a non-functioning binary :) > > Is it in the appropriate mkspecs/*.conf file? Thanks for the response. the qmake.conf file in mkspecs/macx-xcode contains the following: # # qmake configuration for macx-xcode # # Mac OS X + XCode # MAKEFILE_GENERATOR = XCODE TEMPLATE = app CONFIG += qt warn_on release lib_version_first incremental plugin_no_soname link_prl app_bundle QT += core gui include(../common/mac-g++.conf) QMAKE_CC = QMAKE_CXX = QMAKE_CFLAGS_HIDESYMS = QMAKE_CFLAGS_PPC_64 = QMAKE_CFLAGS_X86_64 = QMAKE_CFLAGS_PPC = QMAKE_CFLAGS_X86 = QMAKE_LFLAGS_VERSION = QMAKE_LFLAGS_COMPAT_VERSION = QMAKE_LFLAGS_SONAME = QMAKE_INCDIR += /usr/local/include /System/Library/Frameworks/ CarbonCore.framework/Headers load(qt_config) No reference to the offending library there. Is there some where else I should be looking? Thanks again! ----------------------------------------------- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 ----------------------------------------------- > > > best regards > > Andy Brice > http://www.perfecttableplan.com > http://www.successfulsoftware.net > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx > with "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ -- [ signature omitted ]