[Development] osx search paths with 5.3.2
Hi all, I've been using qt 4.8.6 for quite some time on my macbook installed from homebrew with no problem whatsoever. I decided over the weekend to upgrade my install to the latest qt5 build which on homebrew is 5.3.2. Everything installed, qmake ran and I was able to successfully build qjsonrpc on my mac. Cool. Now, I've got another test app that links to qjsonrpc, and when I build that it turns out that I'm no longer able to find anything in /usr/include or link to anything in /usr/lib. I naturally assumed this was an issue with the compiler's search paths, but then why did 4.8.6 work? Hmm, okay, let's just use Qt's distributed 5.3.2 binaries, maybe homebrew got it wrong... Same problem. I went through a diff of the mkspecs dirs of both versions and couldn't see anything that would obviously cause this. Has anyone using Qt on mac run into this problem? Running out of ideas here! Cheers, Matt ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] osx search paths with 5.3.2
On Oct 13, 2014, at 4:55 PM, Matt Broadstone wrote: > Hi all, > > I've been using qt 4.8.6 for quite some time on my macbook installed > from homebrew with no problem whatsoever. I decided over the weekend > to upgrade my install to the latest qt5 build which on homebrew is > 5.3.2. Everything installed, qmake ran and I was able to successfully > build qjsonrpc on my mac. Cool. > > Now, I've got another test app that links to qjsonrpc, and when I > build that it turns out that I'm no longer able to find anything in > /usr/include or link to anything in /usr/lib. I naturally assumed this > was an issue with the compiler's search paths, but then why did 4.8.6 > work? Hmm, okay, let's just use Qt's distributed 5.3.2 binaries, maybe > homebrew got it wrong... Same problem. I went through a diff of the > mkspecs dirs of both versions and couldn't see anything that would > obviously cause this. > > Has anyone using Qt on mac run into this problem? Running out of ideas here! Hard so say anything without knowing what the things are that are not found. General hints are: Have a look at the actual compiler command lines and look for the -I and -F s, and run qmake with “qmake -d -d -d” to get detailed information on which files are pulled in and how specific qmake variables get their values. Br, Eike -- Eike Ziller, Senior Software Engineer - Digia, Qt Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius Sitz der Gesellschaft: Berlin. Registergericht: Amtsgericht Charlottenburg, HRB 144331 B ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] osx search paths with 5.3.2
On Mon, Oct 13, 2014 at 11:07 AM, Ziller Eike wrote: > > On Oct 13, 2014, at 4:55 PM, Matt Broadstone wrote: > >> Hi all, >> >> I've been using qt 4.8.6 for quite some time on my macbook installed >> from homebrew with no problem whatsoever. I decided over the weekend >> to upgrade my install to the latest qt5 build which on homebrew is >> 5.3.2. Everything installed, qmake ran and I was able to successfully >> build qjsonrpc on my mac. Cool. >> >> Now, I've got another test app that links to qjsonrpc, and when I >> build that it turns out that I'm no longer able to find anything in >> /usr/include or link to anything in /usr/lib. I naturally assumed this >> was an issue with the compiler's search paths, but then why did 4.8.6 >> work? Hmm, okay, let's just use Qt's distributed 5.3.2 binaries, maybe >> homebrew got it wrong... Same problem. I went through a diff of the >> mkspecs dirs of both versions and couldn't see anything that would >> obviously cause this. >> >> Has anyone using Qt on mac run into this problem? Running out of ideas here! > > Hard so say anything without knowing what the things are that are not found. > General hints are: Have a look at the actual compiler command lines and look > for the -I and -F s, and run qmake with “qmake -d -d -d” to get detailed > information on which files are pulled in and how specific qmake variables get > their values. > > Br, Eike > Hi Eike, Thanks for the quick response. The things that are not found are for isntance, "/usr/include/qjsonrpc/qjsonrpcmessage.h". I can fix this manually by adding "/usr/include" to my INCLUDEPATH - no problem, but definitely wasn't a requirement on the exact same machine with the qt 4.8.6 install (maybe a more basic question: is this just something that changed in 5.x mkspecs?). My compile lines with 4.8.6 installed add -I/usr/include to the compile lines, while the 5.3.2 install does not. Additionally, adding "-L/usr/lib" to my LIBS line in the pro file with 5.3.2 still breaks and can't find files that are definitely there. I'll pour through this "qmake -d -d -d" now and see if I can provide any more information. Matt > -- > Eike Ziller, Senior Software Engineer - Digia, Qt > Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin > Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius > Sitz der Gesellschaft: Berlin. Registergericht: Amtsgericht Charlottenburg, > HRB 144331 B > ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] osx search paths with 5.3.2
On Oct 13, 2014, at 5:23 PM, Matt Broadstone wrote: > On Mon, Oct 13, 2014 at 11:07 AM, Ziller Eike > wrote: >> >> On Oct 13, 2014, at 4:55 PM, Matt Broadstone wrote: >> >>> Hi all, >>> >>> I've been using qt 4.8.6 for quite some time on my macbook installed >>> from homebrew with no problem whatsoever. I decided over the weekend >>> to upgrade my install to the latest qt5 build which on homebrew is >>> 5.3.2. Everything installed, qmake ran and I was able to successfully >>> build qjsonrpc on my mac. Cool. >>> >>> Now, I've got another test app that links to qjsonrpc, and when I >>> build that it turns out that I'm no longer able to find anything in >>> /usr/include or link to anything in /usr/lib. I naturally assumed this >>> was an issue with the compiler's search paths, but then why did 4.8.6 >>> work? Hmm, okay, let's just use Qt's distributed 5.3.2 binaries, maybe >>> homebrew got it wrong... Same problem. I went through a diff of the >>> mkspecs dirs of both versions and couldn't see anything that would >>> obviously cause this. >>> >>> Has anyone using Qt on mac run into this problem? Running out of ideas here! >> >> Hard so say anything without knowing what the things are that are not found. >> General hints are: Have a look at the actual compiler command lines and look >> for the -I and -F s, and run qmake with “qmake -d -d -d” to get detailed >> information on which files are pulled in and how specific qmake variables >> get their values. >> >> Br, Eike >> > > Hi Eike, > Thanks for the quick response. The things that are not found are for > isntance, "/usr/include/qjsonrpc/qjsonrpcmessage.h". I can fix this > manually by adding "/usr/include" to my INCLUDEPATH - no problem, but > definitely wasn't a requirement on the exact same machine with the qt > 4.8.6 install (maybe a more basic question: is this just something > that changed in 5.x mkspecs?). Could be that it changed in Qt 5 mkspecs, since /usr/include actually is not required as an include path by the Qt libraries. Also, the Qt4 binary packages are installed systemwide, I’m not sure if that was just /usr/local/include, or also /usr/include. So, all in all, it looks to me like the Qt 5 behavior is the expected one, and adding INCLUDEPATH=/usr/include(/qjsonrpc) is the way to go. Br, Eike > My compile lines with 4.8.6 installed > add -I/usr/include to the compile lines, while the 5.3.2 install does > not. Additionally, adding "-L/usr/lib" to my LIBS line in the pro file > with 5.3.2 still breaks and can't find files that are definitely > there. I'll pour through this "qmake -d -d -d" now and see if I can > provide any more information. > > Matt > >> -- >> Eike Ziller, Senior Software Engineer - Digia, Qt >> Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin >> Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius >> Sitz der Gesellschaft: Berlin. Registergericht: Amtsgericht Charlottenburg, >> HRB 144331 B -- Eike Ziller, Senior Software Engineer - Digia, Qt Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius Sitz der Gesellschaft: Berlin. Registergericht: Amtsgericht Charlottenburg, HRB 144331 B ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] osx search paths with 5.3.2
On Monday 13 October 2014 11:23:11 Matt Broadstone wrote: > Thanks for the quick response. The things that are not found are for > isntance, "/usr/include/qjsonrpc/qjsonrpcmessage.h". I can fix this > manually by adding "/usr/include" to my INCLUDEPATH - no problem, but > definitely wasn't a requirement on the exact same machine with the qt > 4.8.6 install (maybe a more basic question: is this just something > that changed in 5.x mkspecs?). My compile lines with 4.8.6 installed > add -I/usr/include to the compile lines, while the 5.3.2 install does > not. Additionally, adding "-L/usr/lib" to my LIBS line in the pro file > with 5.3.2 still breaks and can't find files that are definitely > there. I'll pour through this "qmake -d -d -d" now and see if I can > provide any more information. The difference is the way we call the compiler on OS X, starting with Qt 5.1 or 5.2. We now tell it to use the Apple sysroot that is present inside the XCode bundle. That means it will not search /usr/incude or /usr/lib -- instead, it will only use the libs that are inside that sysroot. That way, we're guaranteed to use only libraries that are always present on the target OS version. Previously, it was easy to make mistakes in depending on libraries that Apple doesn't ship just because they were in /usr/lib. On OS X, you should not link to libs in /usr/lib. Instead, make sure they are proper frameworks and that they get deployed into your app's bundle. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development