Opened 11 years ago

Closed 11 years ago

#40308 closed defect (fixed)

py-wxpython-2.8 +gtk: missing gtk include path (-I${prefix}/include/gtk-2.0)

Reported by: mojca (Mojca Miklavec) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens)
Port: py-wxpython-2.8

Description

Compilation of py2X-wxpython-2.8 fails because of missing include flags for gtk2:

creating build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
copying wxPython/tools/__init__.py -> build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
copying wxPython/tools/dbg.py -> build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
copying wxPython/tools/helpviewer.py -> build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
copying wxPython/tools/img2img.py -> build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
copying wxPython/tools/img2png.py -> build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
copying wxPython/tools/img2py.py -> build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
copying wxPython/tools/img2xpm.py -> build-gtk2.unicode/lib.macosx-10.8-x86_64-2.7/wxPython/tools
package init file 'wx/lib/pubsub/pubsub1/__init__.py' not found (or not a regular file)
package init file 'wx/lib/pubsub/pubsub2/__init__.py' not found (or not a regular file)
package init file 'wx/tools/XRCed/plugins/__init__.py' not found (or not a regular file)
running build_ext
building '_core_' extension
creating build-gtk2.unicode/temp.macosx-10.8-x86_64-2.7
creating build-gtk2.unicode/temp.macosx-10.8-x86_64-2.7/src
creating build-gtk2.unicode/temp.macosx-10.8-x86_64-2.7/src/gtk
/usr/bin/clang -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Iinclude -Isrc -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/lib/wx/include/gtk2-unicode-release-2.8 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/include/wx-2.8 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/helpers.cpp -o build-gtk2.unicode/temp.macosx-10.8-x86_64-2.7/src/helpers.o -O3 -arch x86_64
src/helpers.cpp:28:10: fatal error: 'gdk/gdk.h' file not found
#include <gdk/gdk.h>
         ^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
Command failed:  cd "/opt/local/var/macports/build/_opt_mports_dports_python_py-wxpython-2.8/py27-wxpython-2.8/work/wxPython-src-2.8.12.1/wxPython" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py WXPORT="gtk2" WX_CONFIG="/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxGTK/2.8/bin/wx-config" build 
Exit code: 1

See the buildbot logs.

Change History (4)

comment:1 Changed 11 years ago by mojca (Mojca Miklavec)

related ticket: #38464

comment:2 Changed 11 years ago by mojca (Mojca Miklavec)

Cc: michaelld@… added

comment:3 Changed 11 years ago by mojca (Mojca Miklavec)

OK, I believe I see the problem now. The file config.py contains:

    if sys.platform[:6] == "darwin":
    ...
    else:
        # Set flags for other Unix type platforms
        GENDIR = WXPORT

        if WXPORT == 'gtk':
            WXPLAT = '__WXGTK__'
            portcfg = os.popen('gtk-config --cflags', 'r').read()[:-1]
            BUILD_BASE = BUILD_BASE + '-' + WXPORT
        elif WXPORT == 'gtk2':
            WXPLAT = '__WXGTK__'
            GENDIR = 'gtk' # no code differences so use the same generated sources
            portcfg = os.popen('pkg-config gtk+-2.0 --cflags', 'r').read()[:-1]
...

and thus

pkg-config gtk+-2.0 --cflags

never gets executed.

comment:4 Changed 11 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

Wrong observation, I already fixed that. After adding the missing pkgconfig dependency in r110414 the problem was solved.

Note: See TracTickets for help on using tickets.