[Qt-interest] qmake using PKGCONFIG on mac OS

Paulo Silva paulo.jnkml at gmail.com
Thu Oct 21 17:42:17 CEST 2010


Correction, I had it on the on gnu/linux project but not on the mac
project.
So it was a stupid mistake.
Sorry.

On Fri, Oct 22, 2010 at 12:39 AM, Paulo Silva <paulo.jnkml at gmail.com> wrote:

> got it!
> CONFIG: :+=: (link_pkgconfig) is added automatically on gnu/linux (coff
> coff) but not on mac.
> Now it can't find pkg-config in the path. But that's a different problem.
> =)
>
> On Fri, Oct 22, 2010 at 12:30 AM, Paulo Silva <paulo.jnkml at gmail.com>wrote:
>
>> I just ran this thing in debug mode:
>>
>> Air:eye_detection paulo$ qmake
>> /Users/paulo/dev/eye_detection/qtc/EyeRecognitionTest.pro -r -spec macx-g++
>> -d 2>&1|grep -i pkg
>> DEBUG 1: Project Parser:
>> /Users/paulo/dev/eye_detection/qtc/EyeRecognitionTest.pro:15 :PKGCONFIG:
>> :+=: (opencv)
>> DEBUG 1: PKGCONFIG === opencv
>>
>> On the other hand if I run the same (similar) command on my linux machine
>> I get a bit more output:
>>
>> paulo at pato ~/dev/cxx/tmp/detect_circles> qmake
>> /home/paulo/dev/cxx/tmp/detect_circles/detect_circles.pro -r -spec
>> linux-g++ CONFIG+=debug -d 2>&1 | grep -i -P "pkg-?config"
>>
>> DEBUG 1: Project Parser: /home/paulo/dev/cxx/tmp/detect_circles/
>> detect_circles.pro:13 :CONFIG: :+=: (link_pkgconfig)
>> DEBUG 1: Project Parser: /home/paulo/dev/cxx/tmp/detect_circles/
>> detect_circles.pro:15 :PKGCONFIG: :+=: (opencv)
>> DEBUG 1: Processing default_post:
>> lex::yacc::warn_on::debug::uic::resources::qt::warn_on::release::incremental::link_prl::exceptions::no_mocdepend::release::stl::qt_no_framework::debug::console::link_pkgconfig
>> DEBUG 1: Processing CONFIG features:
>> lex::yacc::warn_on::debug::uic::resources::qt::warn_on::incremental::link_prl::exceptions::no_mocdepend::stl::qt_no_framework::debug::console::link_pkgconfig
>> DEBUG 1: Project Parser: load'ing file
>> /usr/share/qt4/mkspecs/features/link_pkgconfig.prf.
>> DEBUG 1: Running project expand: unique(PKGCONFIG) [16]
>> DEBUG 1: Project Parser: link_pkgconfig.prf:2 : Entering block 2 (0).
>> [for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) {]
>> DEBUG 1: Running project expand: system(pkg-config --cflags opencv) [15]
>> DEBUG 1: Project Parser: link_pkgconfig.prf:3 :QMAKE_CXXFLAGS: :+=:
>> (-I/usr/include/opencv )
>> DEBUG 1: Running project expand: system(pkg-config --cflags opencv) [15]
>> DEBUG 1: Running project expand: system(pkg-config --cflags opencv) [15]
>> DEBUG 1: Project Parser: link_pkgconfig.prf:4 :QMAKE_CFLAGS: :+=:
>> (-I/usr/include/opencv )
>> DEBUG 1: Running project expand: system(pkg-config --cflags opencv) [15]
>> DEBUG 1: Running project expand: system(pkg-config --libs opencv) [15]
>> DEBUG 1: Project Parser: link_pkgconfig.prf:5 :LIBS: :+=: (-lml -lcvaux
>> -lhighgui -lcv -lcxcore )
>> DEBUG 1: Running project expand: system(pkg-config --libs opencv) [15]
>> DEBUG 1: Project Parser: link_pkgconfig.prf:6 : Leaving block 2
>> DEBUG 1: Project Parser: moc.prf:96 :CONFIG: :=: (include_source_dir lex
>> yacc warn_on debug uic resources qt warn_on incremental link_prl exceptions
>> no_mocdepend stl qt_no_framework debug console link_pkgconfig moc thread)
>> DEBUG 1: Project Parser: uic.prf:48 :CONFIG: :=: (include_source_dir lex
>> yacc warn_on debug uic resources qt warn_on incremental link_prl exceptions
>> no_mocdepend stl qt_no_framework debug console link_pkgconfig moc thread)
>> DEBUG 1: CONFIG === include_source_dir :: lex :: yacc :: warn_on :: debug
>> :: uic :: resources :: qt :: warn_on :: incremental :: link_prl ::
>> exceptions :: no_mocdepend :: stl :: qt_no_framework :: debug :: console ::
>> link_pkgconfig :: moc :: thread
>> DEBUG 1: DISTFILES === /usr/share/qt4/mkspecs/common/g++.conf ::
>> /usr/share/qt4/mkspecs/common/unix.conf ::
>> /usr/share/qt4/mkspecs/common/linux.conf ::
>> /usr/share/qt4/mkspecs/qconfig.pri ::
>> /usr/share/qt4/mkspecs/features/qt_functions.prf ::
>> /usr/share/qt4/mkspecs/features/qt_config.prf ::
>> /usr/share/qt4/mkspecs/features/exclusive_builds.prf ::
>> /usr/share/qt4/mkspecs/features/default_pre.prf ::
>> /usr/share/qt4/mkspecs/features/debug.prf ::
>> /usr/share/qt4/mkspecs/features/default_post.prf ::
>> /usr/share/qt4/mkspecs/features/link_pkgconfig.prf ::
>> /usr/share/qt4/mkspecs/features/warn_on.prf ::
>> /usr/share/qt4/mkspecs/features/qt.prf ::
>> /usr/share/qt4/mkspecs/features/unix/thread.prf ::
>> /usr/share/qt4/mkspecs/features/moc.prf ::
>> /usr/share/qt4/mkspecs/features/resources.prf ::
>> /usr/share/qt4/mkspecs/features/uic.prf ::
>> /usr/share/qt4/mkspecs/features/yacc.prf ::
>> /usr/share/qt4/mkspecs/features/lex.prf ::
>> /usr/share/qt4/mkspecs/features/include_source_dir.prf ::
>> /home/paulo/dev/cxx/tmp/detect_circles/detect_circles.pro
>> DEBUG 1: PKGCONFIG === opencv
>> DEBUG 1: QMAKE_INTERNAL_INCLUDED_FEATURES ===
>> /usr/share/qt4/mkspecs/features/qt_config.prf ::
>> /usr/share/qt4/mkspecs/features/qt_functions.prf ::
>> /usr/share/qt4/mkspecs/features/default_pre.prf ::
>> /usr/share/qt4/mkspecs/features/exclusive_builds.prf ::
>> /usr/share/qt4/mkspecs/features/default_post.prf ::
>> /usr/share/qt4/mkspecs/features/debug.prf ::
>> /usr/share/qt4/mkspecs/features/link_pkgconfig.prf ::
>> /usr/share/qt4/mkspecs/features/warn_on.prf ::
>> /usr/share/qt4/mkspecs/features/qt.prf ::
>> /usr/share/qt4/mkspecs/features/unix/thread.prf ::
>> /usr/share/qt4/mkspecs/features/moc.prf ::
>> /usr/share/qt4/mkspecs/features/resources.prf ::
>> /usr/share/qt4/mkspecs/features/uic.prf ::
>> /usr/share/qt4/mkspecs/features/yacc.prf ::
>> /usr/share/qt4/mkspecs/features/lex.prf ::
>> /usr/share/qt4/mkspecs/features/include_source_dir.prf
>> DEBUG 1: QMAKE_INTERNAL_INCLUDED_FILES ===
>> /usr/share/qt4/mkspecs/common/g++.conf ::
>> /usr/share/qt4/mkspecs/common/unix.conf ::
>> /usr/share/qt4/mkspecs/common/linux.conf ::
>> /usr/share/qt4/mkspecs/qconfig.pri ::
>> /usr/share/qt4/mkspecs/features/qt_functions.prf ::
>> /usr/share/qt4/mkspecs/features/qt_config.prf ::
>> /usr/share/qt4/mkspecs/features/exclusive_builds.prf ::
>> /usr/share/qt4/mkspecs/features/default_pre.prf ::
>> /usr/share/qt4/mkspecs/features/debug.prf ::
>> /usr/share/qt4/mkspecs/features/default_post.prf ::
>> /usr/share/qt4/mkspecs/features/link_pkgconfig.prf ::
>> /usr/share/qt4/mkspecs/features/warn_on.prf ::
>> /usr/share/qt4/mkspecs/features/qt.prf ::
>> /usr/share/qt4/mkspecs/features/unix/thread.prf ::
>> /usr/share/qt4/mkspecs/features/moc.prf ::
>> /usr/share/qt4/mkspecs/features/resources.prf ::
>> /usr/share/qt4/mkspecs/features/uic.prf ::
>> /usr/share/qt4/mkspecs/features/yacc.prf ::
>> /usr/share/qt4/mkspecs/features/lex.prf ::
>> /usr/share/qt4/mkspecs/features/include_source_dir.prf
>>
>>
>> On Fri, Oct 22, 2010 at 12:02 AM, Paulo Silva <paulo.jnkml at gmail.com>wrote:
>>
>>> Yes, it shows:
>>> PKG_CONFIG_PATH /opt/local/lib/pkgconfig
>>> which is correct.
>>>
>>>
>>> On Thu, Oct 21, 2010 at 11:48 PM, Samuel Gaist <samuel.gaist at edeltech.ch
>>> > wrote:
>>>
>>>>
>>>> On 21 oct. 10, at 16:21, Paulo Silva wrote:
>>>>
>>>> > Well thanks for your idea.
>>>> > I tried that. Added to the environment vars, checked if it was
>>>> > there, and from the same shell started Qt Creator.
>>>> > In the same project I cleaned it, run qmake and rebuilt.
>>>> > Unfortunately nothing changed.
>>>> >
>>>> > So the problem is probably in the qmake run. How can I get more
>>>> > details of what qmake is doing? To try to see what happens when it
>>>> > runs the pkg-config?
>>>> >
>>>> > Thanks,
>>>> > Paulo
>>>> >
>>>> > Basically when the
>>>> >
>>>> > On Thu, Oct 21, 2010 at 8:53 PM, Samuel Gaist <
>>>> samuel.gaist at edeltech.ch
>>>> > > wrote:
>>>> >
>>>> > On 21 oct. 10, at 13:47, Paulo Silva wrote:
>>>> >
>>>> > > I installed opencv from macport but it was added to the pkg-config
>>>> > > correctly, otherwise it wouldn't work in the terminal right?
>>>> > >
>>>> > >
>>>> > > On Thu, Oct 21, 2010 at 7:36 PM, Samuel Gaist <
>>>> samuel.gaist at edeltech.ch
>>>> > > > wrote:
>>>> > > Sorry, I replied in private...
>>>> > > On 21 oct. 10, at 11:56, Paulo Silva wrote:
>>>> > >
>>>> > > > Hi,
>>>> > > >
>>>> > > > I was trying to compile projected that I created on my GNU/Linux
>>>> > box
>>>> > > > on my mac box.
>>>> > > > I was hopping that pkg-config would also work on mac so I kept the
>>>> > > > line:
>>>> > > > PKGCONFIG += opencv
>>>> > > >
>>>> > > > in my .pro file.
>>>> > > > Unfortunately while building the build command is not populated
>>>> > with
>>>> > > > the pkg-config output, like include path and libs.
>>>> > > > However if I run pkg-config opencv --cflags --libs on the command
>>>> > > > line, I do get the expected output.
>>>> > > >
>>>> > > > Am I doing something wrong here? I'm using qtsdk based on qt 4.7
>>>> > > > with qt-creator rev b06f25f265, that I downloaded this week from
>>>> > qt
>>>> > > > site.
>>>> > > >
>>>> > > > Thank you.
>>>> > > > Paulo
>>>> > > > _______________________________________________
>>>> > > > Qt-interest mailing list
>>>> > > > Qt-interest at trolltech.com
>>>> > > > http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>> > > Hi,
>>>> > > Did you installed opencv from macport ?
>>>> > > If so you should update PKG_CONFIG_PATH to also go look in macport
>>>> > > pkconfig directories
>>>> > >
>>>> > > Hope this helps
>>>> > > Samuel
>>>> > > _______________________________________________
>>>> > > Qt-interest mailing list
>>>> > > Qt-interest at trolltech.com
>>>> > > http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>> > >
>>>> > Hi again, don't make the same mistake as me, keep the conversation on
>>>> > the list, other could help or benefit.
>>>> >
>>>> > Settings you have on your terminal doesn't always reflect on the rest
>>>> > of your system, i have had that problem once, and starting creator
>>>> > from the command line (using open foo.pro), it found everything.
>>>> >
>>>> > Since then i have updated PKG_CONFIG_PATH in my .profile (don't forget
>>>> > to log out and in again after that) and i didn't encounter the problem
>>>> > anymore
>>>> >
>>>> > Hope this helps
>>>> > Samuel
>>>> > _______________________________________________
>>>> > Qt-interest mailing list
>>>> > Qt-interest at trolltech.com
>>>> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>> >
>>>> > _______________________________________________
>>>> > Qt-interest mailing list
>>>> > Qt-interest at trolltech.com
>>>> > http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>> You're welcome,
>>>> One other point, did you also checked that the PKG_CONFIG_PATH is
>>>> listed with the correct paths in the Build Environment in the Projects
>>>> pane under Build Settings ?
>>>>
>>>> As for qmake, you can make it more verbose using the -d option.
>>>>
>>>> Samuel
>>>> _______________________________________________
>>>> Qt-interest mailing list
>>>> Qt-interest at trolltech.com
>>>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101022/545c6372/attachment.html 


More information about the Qt-interest-old mailing list