compiling from source "wxPython-src-3.0.2.0/include/wx/platform.h:183:22: fatal error: wx/setup.h"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

compiling from source "wxPython-src-3.0.2.0/include/wx/platform.h:183:22: fatal error: wx/setup.h"

zylyco
Hi there,

I'm trying to install from source wxPython3.0.2 on linux system openSuse.

In file " build-wxwidgets.py " :
I disabled the option "--enable-mediactrl", with "--disable-mediactrl"

I installed packages for wxWidgets-2.8.12 (same problem occurs with 3.0.2 version anyway)
see picture " opensuse-wxWidgets-files.png "

I run :
wx-config --list
Default config is gtk2-unicode-release-2.8
Default config will be used for output

Then, I launch (not in root, but as user) :
python2.7 build-wxpython.py --build_dir=../bld


Build starts with :
see picture " opensuse-wxPython-compilation.png "


And build fails on :


(if test -f utils/wxrc/Makefile ; then cd utils/wxrc && make all ; fi)
make[1]: Entering directory '/home/regis/Programmes/wxPython-src-3.0.2.0/bld/utils/wxrc'
/home/regis/Programmes/wxPython-src-3.0.2.0/bld/bk-deps g++ -c -o wxrc_wxrc.o -D__WXGTK__      -I/home/regis/Programmes/wxPython-src-3.0.2.0/utils/wxrc -DWXUSINGDLL -DwxUSE_GUI=0 -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -D_FILE_OFFSET_BITS=64 -I/home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib/wx/include/gtk2-unicode-3.0 -I/home/regis/Programmes/wxPython-src-3.0.2.0/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/webkitgtk-1.0 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/webkitgtk-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DWX_PRECOMP -pthread -O2 -fno-strict-aliasing -pthread -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gtk-unix-print-2.0 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -fvisibility=hidden -fvisibility-inlines-hidden /home/regis/Programmes/wxPython-src-3.0.2.0/utils/wxrc/wxrc.cpp
g++ -o wxrc wxrc_wxrc.o    -L/home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib  -pthread     -lwx_baseu_xml-3.0 -lexpat -lwx_baseu-3.0     -lwxregexu-3.0  -pthread   -Wl,--version-script,/home/regis/Programmes/wxPython-src-3.0.2.0/bld/version-script -lz -ldl -lm  -lz -ldl -lm
make[1]: Leaving directory '/home/regis/Programmes/wxPython-src-3.0.2.0/bld/utils/wxrc'
**** /usr/bin/python2.7 -u ./setup.py build_ext --inplace UNICODE=1 BUILD_BASE=build WX_CONFIG=/home/regis/Programmes/wxPython-src-3.0.2.0/bld/wx-config
WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running build_ext
running build_ext
building '_core_' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/gtk
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DSWIG_PYTHON_SILENT_MEMLEAK -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -Iinclude -Isrc -I/home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib64/wx/include/gtk2-unicode-3.0 -I/home/regis/Programmes/wxPython-src-3.0.2.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/python2.7 -c src/helpers.cpp -o build/temp.linux-x86_64-2.7/src/helpers.o -pthread -O3 -pthread
In file included from /home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/defs.h:27:0,
                 from /home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/wx.h:14,
                 from include/wx/wxPython/wxPython_int.h:35,
                 from src/helpers.cpp:17:
/home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/platform.h:183:22: fatal error: wx/setup.h: Aucun fichier ou dossier de ce type
 #include "wx/setup.h"
                      ^
compilation terminated.
error: command 'gcc' failed with exit status 1
ERROR: failed building wxPython.


Any clue on what's going on ?

What development package is missing ?
 

Thanx in advance

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

opensuse-wxWidgets-files.png (96K) Download Attachment
opensuse-wxPython-compilation.png (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: compiling from source "wxPython-src-3.0.2.0/include/wx/platform.h:183:22: fatal error: wx/setup.h"

Robin Dunn
[hidden email] wrote:
Hi there,

I'm trying to install from source wxPython3.0.2 on linux system openSuse.

In file " build-wxwidgets.py " :
I disabled the option "--enable-mediactrl", with "--disable-mediactrl"

I installed packages for wxWidgets-2.8.12 (same problem occurs with 3.0.2 version anyway)
see picture " opensuse-wxWidgets-files.png "

I run :
wx-config --list
Default config is gtk2-unicode-release-2.8
Default config will be used for output

You will need to use 3.0.2, the wxPython 3.0.2.0 code almost certainly won't work with wx 2.8. However, this is not the version of wxWidgets the build is using anyway.  See below.


Then, I launch (not in root, but as user) :
python2.7 build-wxpython.py --build_dir=../bld


By default build-wxpython.py will build and use the wxWidgets located in the same source tree. If you want to use a wxWidgets already installed on the system then you'll need to use the --no_wxbuild flag.


Build starts with :
see picture " opensuse-wxPython-compilation.png "


And build fails on :



**** /usr/bin/python2.7 -u ./setup.py build_ext --inplace UNICODE=1 BUILD_BASE=build WX_CONFIG=/home/regis/Programmes/wxPython-src-3.0.2.0/bld/wx-config

Here you can see which wxWidgets is being used for the wxPython build. It is set by setting the WX_CONFIG value on the setup.py command line.

WARNING: WXWIN not set in environment. Assuming '..'
Preparing CORE...
Preparing STC...
Preparing GLCANVAS...
Preparing GIZMOS...
running build_ext
running build_ext
building '_core_' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/gtk
gcc -pthread -fno-strict-aliasing -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DNDEBUG -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE -DSWIG_PYTHON_SILENT_MEMLEAK -DWXP_USE_THREAD=1 -UNDEBUG -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -Iinclude -Isrc -I/home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib64/wx/include/gtk2-unicode-3.0 -I/home/regis/Programmes/wxPython-src-3.0.2.0/include -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/python2.7 -c src/helpers.cpp -o build/temp.linux-x86_64-2.7/src/helpers.o -pthread -O3 -pthread
In file included from /home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/defs.h:27:0,
                 from /home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/wx.h:14,
                 from include/wx/wxPython/wxPython_int.h:35,
                 from src/helpers.cpp:17:
/home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/platform.h:183:22: fatal error: wx/setup.h: Aucun fichier ou dossier de ce type
 #include "wx/setup.h"
                      ^
compilation terminated.

That file should have been generated during the configuration step when building wxWidgets, and based on the flags in the compile command above it should be located under in /home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib64/wx/include/gtk2-unicode-3.0. If it's not there then look at the output from wx's configure portion of the build for clues.



--
Robin Dunn
Software Craftsman
http://wxPython.org

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: compiling from source "wxPython-src-3.0.2.0/include/wx/platform.h:183:22: fatal error: wx/setup.h"

zylyco

Hi Robin,

first, thanks for your reply.


I changed my mind, and I uninstalled wxWigets2.8 packages from my openSuse system, in order I can compile either wxWidgets and wxPython from scratch.


Then I ran the command line :
python2.7 build-wxpython.py --build_dir=../bld

The same error remains :
In file included from /home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/defs.h:27:0,
                 from /home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/wx.h:14,
                 from include/wx/wxPython/wxPython_int.h:35,
                 from src/helpers.cpp:17:
/home/regis/Programmes/wxPython-src-3.0.2.0/include/wx/platform.h:183:22: fatal error: wx/setup.h: Aucun fichier ou dossier de ce type
 #include "wx/setup.h"
                      ^
compilation terminated.
error: command 'gcc' failed with exit status 1
ERROR: failed building wxPython.

You wrote me :
That file should have been generated during the configuration step when building wxWidgets, and based on the flags in the compile command above it should be located under in /home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib64/wx/include/gtk2-unicode-3.0. If it's not there then look at the output from wx's configure portion of the build for clues.


I checked where was the setup.h file, and it is present at path :
/home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib/wx/include/gtk2-unicode-3.0/wx/setup.h

So I created a symbolic link in /bld directory :
/wxPython-src-3.0.2.0/bld> ln -s lib/ lib64

Then I launch again the build command :
python2.7 build-wxpython.py --build_dir=../bld

And build finished with success :
------------ BUILD FINISHED ------------
To run the wxPython demo you may need to:
 - set your PYTHONPATH variable to /home/regis/Programmes/wxPython-src-3.0.2.0/wxPython
 - set your LD_LIBRARY_PATH to /home/regis/Programmes/wxPython-src-3.0.2.0/bld/lib
And then:
 - Run python demo/demo.py

Thanks for your advice Robin.


Note:
now I'm struggling with another problem : create a standalone application with cx_Freeze on openSuse...
May be it will be the subject of my next post...

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.