[MacPorts] #34947: qt4-mac: pkg-config in +framework

MacPorts noreply at macports.org
Thu Jun 21 06:43:48 PDT 2012


#34947: qt4-mac: pkg-config in +framework
--------------------------------------------+-------------------------------
 Reporter:  mojca.miklavec.lists@…          |       Owner:  macports-tickets@…                   
     Type:  defect                          |      Status:  new                                  
 Priority:  Normal                          |   Milestone:                                       
Component:  ports                           |     Version:  2.1.1                                
 Keywords:                                  |        Port:  qt4-mac                              
--------------------------------------------+-------------------------------
 If I install qt4-mac +framework, gnuplot compilation breaks with
 {{{
 c++ -DHAVE_CONFIG_H -I. -I..  -I../term -I../term
 -DBINDIR=\"/path/to/gnuplot/inst/bin\"
 -DX11_DRIVER_DIR=\"/path/to/gnuplot/inst/libexec/gnuplot/4.7\"
 -DQT_DRIVER_DIR=\"/path/to/gnuplot/inst/libexec/gnuplot/4.7\"
 -DGNUPLOT_SHARE_DIR=\"/path/to/gnuplot/inst/share/gnuplot/4.7\"
 -DGNUPLOT_PS_DIR=\"/path/to/gnuplot/inst/share/gnuplot/4.7/PostScript\"
 -DGNUPLOT_JS_DIR=\"/path/to/gnuplot/inst/share/gnuplot/4.7/js\"
 -DGNUPLOT_LUA_DIR=\"/path/to/gnuplot/inst/share/gnuplot/4.7/lua\"
 -DCONTACT=\"gnuplot-bugs at lists.sourceforge.net\"
 -DHELPFILE=\"/path/to/gnuplot/inst/share/gnuplot/4.7/gnuplot.gih\"
 -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's,x,x,'`\"
 -DXAPPLRESDIR=\"/etc/X11/app-defaults/\"
 -DQTGNUPLOT_DATA_DIR=\"/path/to/gnuplot/inst/share/gnuplot/4.7/qt\"
 -I/opt/local/include -I/opt/local/include -I/opt/local/include
 -D_REENTRANT -I/opt/local/include/cairo -I/opt/local/include/glib-2.0
 -I/opt/local/lib/glib-2.0/include -I/opt/local/include
 -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2
 -I/opt/local/include/libpng14 -I/opt/local/include/pango-1.0   -DQT_SHARED
 -I/opt/local/include -I/opt/local/include/QtCore
 -I/opt/local/include/QtGui -I/opt/local/include/QtNetwork
 -I/opt/local/include/QtSvg    -g -O2  -ObjC -MT qt_term.o -MD -MP -MF
 .deps/qt_term.Tpo -c -o qt_term.o `test -f 'qtterminal/qt_term.cpp' ||
 echo './'`qtterminal/qt_term.cpp
 In file included from qtterminal/qt_term.cpp:44:
 In file included from /opt/local/include/QtCore/QtCore:3:
 /opt/local/include/QtCore/qalgorithms.h:57:1: error: expected function
 body after function declarator
 namespace QAlgorithmsPrivate {
 ^
 /opt/local/include/QtCore/qalgorithms.h:165:1: error: unknown type name
 'template'
 template <typename T>
 ^
 /opt/local/include/QtCore/qalgorithms.h:165:10: error: expected identifier
 or '('
 template <typename T>
          ^
 /opt/local/include/QtCore/qalgorithms.h:176:1: error: unknown type name
 'template'
 template <typename RandomAccessIterator>
 ^
 /opt/local/include/QtCore/qalgorithms.h:176:10: error: expected identifier
 or '('
 template <typename RandomAccessIterator>
          ^
 In file included from qtterminal/qt_term.cpp:44:
 In file included from /opt/local/include/QtCore/QtCore:4:
 In file included from /opt/local/include/QtCore/qbitarray.h:45:
 In file included from /opt/local/include/QtCore/qbytearray.h:45:
 In file included from /opt/local/include/QtCore/qatomic.h:46:
 /opt/local/include/QtCore/qbasicatomic.h:130:1: error: unknown type name
 'template'
 template <typename T>
 ^
 /opt/local/include/QtCore/qbasicatomic.h:130:10: error: expected
 identifier or '('
 template <typename T>
          ^
 In file included from qtterminal/qt_term.cpp:44:
 In file included from /opt/local/include/QtCore/QtCore:4:
 In file included from /opt/local/include/QtCore/qbitarray.h:45:
 In file included from /opt/local/include/QtCore/qbytearray.h:45:
 In file included from /opt/local/include/QtCore/qatomic.h:46:
 In file included from /opt/local/include/QtCore/qbasicatomic.h:227:
 In file included from /opt/local/include/QtCore/qatomic_arch.h:70:
 In file included from /opt/local/include/QtCore/qatomic_macosx.h:48:
 /opt/local/include/QtCore/qatomic_x86_64.h:52:8: error: unknown type name
 'bool'
 inline bool QBasicAtomicInt::isReferenceCountingNative()
        ^
 /opt/local/include/QtCore/qatomic_x86_64.h:52:1: error: 'inline' can only
 appear on functions
 inline bool QBasicAtomicInt::isReferenceCountingNative()
 ^
 /opt/local/include/QtCore/qatomic_x86_64.h:52:28: error: expected ';'
 after top level declarator
 inline bool QBasicAtomicInt::isReferenceCountingNative()
                            ^
                            ;
 /opt/local/include/QtCore/qatomic_x86_64.h:52:29: error: expected
 identifier or '('
 inline bool QBasicAtomicInt::isReferenceCountingNative()
                             ^
 In file included from qtterminal/qt_term.cpp:44:
 In file included from /opt/local/include/QtCore/QtCore:4:
 In file included from /opt/local/include/QtCore/qbitarray.h:45:
 In file included from /opt/local/include/QtCore/qbytearray.h:45:
 /opt/local/include/QtCore/qatomic.h:124:1: error: unknown type name
 'template'
 template <typename T>
 ^
 /opt/local/include/QtCore/qatomic.h:124:10: error: expected identifier or
 '('
 template <typename T>
          ^
 /opt/local/include/QtCore/qatomic.h:194:1: error: unknown type name
 'template'
 template <typename T>
 ^
 /opt/local/include/QtCore/qatomic.h:194:10: error: expected identifier or
 '('
 template <typename T>
          ^
 In file included from qtterminal/qt_term.cpp:44:
 In file included from /opt/local/include/QtCore/QtCore:4:
 In file included from /opt/local/include/QtCore/qbitarray.h:45:
 In file included from /opt/local/include/QtCore/qbytearray.h:46:
 /opt/local/include/QtCore/qnamespace.h:1820:1: error: unknown type name
 'class'; did you mean 'Class'?
 class Q_CORE_EXPORT QInternal {
 ^~~~~
 Class
 note: 'Class' declared here
 /opt/local/include/QtCore/qnamespace.h:1820:20: error: expected ';' after
 top level declarator
 class Q_CORE_EXPORT QInternal {
                    ^
                    ;
 In file included from qtterminal/qt_term.cpp:44:
 In file included from /opt/local/include/QtCore/QtCore:4:
 In file included from /opt/local/include/QtCore/qbitarray.h:45:
 /opt/local/include/QtCore/qbytearray.h:77:1: error: expected function body
 after function declarator
 Q_CORE_EXPORT char *qstrdup(const char *);
 ^
 /opt/local/include/QtCore/qbytearray.h:79:8: error: unknown type name
 'uint'; did you mean 'int'?
 inline uint qstrlen(const char *str)
        ^
 /opt/local/include/QtCore/qbytearray.h:80:16: warning: implicit
 declaration of function 'uint' is invalid in C99 [-Wimplicit-function-
 declaration]
 { return str ? uint(strlen(str)) : 0; }
                ^
 fatal error: too many errors emitted, stopping now [-ferror-limit=]
 1 warning and 20 errors generated.
 make[3]: *** [qt_term.o] Error 1
 make[2]: *** [all-recursive] Error 1
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2
 }}}

 I'm not sure what is going on, but with `pkg-config` I get
 {{{
 > pkg-config --cflags QtGui
 -DQT_SHARED -I/opt/local/include -I/opt/local/include/QtGui
 -I/opt/local/include/QtCore
 }}}
 since the file `/opt/local/lib/pkgconfig/QtGui.pc` contains
 {{{
 prefix=/opt/local
 exec_prefix=${prefix}
 libdir=${prefix}/Library/Frameworks
 includedir=${prefix}/include/QtGui
 ...
 Name: Qtgui
 Description: Qtgui Library
 Version: 4.8.2
 Libs: -F${libdir} -framework QtGui
 Cflags: -DQT_SHARED -I${prefix}/include -I${includedir}
 Requires: QtCore
 }}}
 Shouldn't the includedir be those Cflags be
 `${prefix}/Library/Frameworks/QtGui.framework/Headers` instead? (Or even
 better another variable like frameworkdir.) But maybe I'm wrong. And this
 probably wouldn't solve the reported problem anyway.

-- 
Ticket URL: <https://trac.macports.org/ticket/34947>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list