build failed.

hello.

I downloaded 2.8.12.1 package and during step. I got an error like
this.
http://paste.ubuntu.com/771881/
checking for -lGL... found in /usr/lib
checking for -lGLU... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available

I installed freeglut3, freeglut3-dev, libgl1-mesa-dev, libglu1-mesa-
dev, mesa-common-dev.
but there is still error what should I do?

I have followed http://www.wxpython.org/BUILD-2.8.html

Wonjun, Choi

If you look at config.log you may be able to see more details about what caused the error and perhaps what it was expecting to find but didn't.

If all else fails and if you do not need the GLCanvas window then you can disable it in the configure step, and add BUILD_GLCANVAS=0 to the command line in the setup.py step.

···

On 12/15/11 10:10 PM, Wonjun, Choi wrote:

hello.

I downloaded 2.8.12.1 package and during step. I got an error like
this.
http://paste.ubuntu.com/771881/
checking for -lGL... found in /usr/lib
checking for -lGLU... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available

I installed freeglut3, freeglut3-dev, libgl1-mesa-dev, libglu1-mesa-
dev, mesa-common-dev.
but there is still error what should I do?

I have followed http://www.wxpython.org/BUILD-2.8.html

--
Robin Dunn
Software Craftsman

here is the log file. and what did I do is below:

             cd $WXDIR
mkdir bld
cd bld
../configure --prefix=/opt/wx/2.8 \
--with-gtk \
--with-gnomeprint \
--with-opengl \ <============= I deleted this line. but there is also same error.
--enable-debug \
--enable-debug_gdb \
--enable-geometry \
--enable-graphics_ctx \
--enable-sound --with-sdl \
--enable-mediactrl \
--enable-display \

Wonjun, Choi

config.log (92.2 KB)

The log file shows that it is still acting as if --with-opengl was given, so you probably did not clean your build folder when trying it without the option. Please start from an empty build folder, and also use --witout-opengl just to be sure, and try again.

···

On 12/19/11 9:56 PM, 최원준 wrote:

here is the log file. and what did I do is below:

cd $WXDIR
mkdir bld
cd bld
../configure --prefix=/opt/wx/2.8 \
              --with-gtk \
              --with-gnomeprint \
              --with-opengl \<============= I deleted this line. but there is also same error.
              --enable-debug \
              --enable-debug_gdb \
              --enable-geometry \
              --enable-graphics_ctx \
              --enable-sound --with-sdl \
              --enable-mediactrl \
              --enable-display \

--
Robin Dunn
Software Craftsman

shouldn’t I use opengl? Is there a way to use it?

Yes, it can be built and is built successfully on lots of computers. I was just suggesting a way to work around the issue since you can't figure out what is missing on yours that is preventing the build from being successful.

···

On 12/20/11 10:51 AM, 최원준 wrote:

shouldn't I use opengl? Is there a way to use it?

--
Robin Dunn
Software Craftsman

for 2.8.12.1 version, I could build the source and install it with the option [–without-opengl]

but how can I use it? I run python and import wx. I typed wx.version(). it still displays “2.8.11.0”
I appended /opt/wx/2.8/lib path to PYTHONPATH

like this :

export PYTHONPATH=/opt/wx/2.8/lib:${PYTHONPATH} in bash file.

or also I used below command in the Terminal

export LD_LIBRARY_PATH=/opt/wx/2.8/lib
export PYTHONPATH=$WXDIR/wxPython

but still.

Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import wx
>>> wx.version()
'2.8.11.0 (gtk2-unicode)'

for 2.9.2.4 version, there is still same error I couldn’t put the option like above.
I followed the build instruction

cd wxPython-src-2.9.0.1/wxPython
python build-wxpython.py --build_dir=../bld

and the error was :

checking for -lGLU... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available
Error running configure
ERROR: failed building wxWidgets

Traceback (most recent call last):
  File "build-wxpython.py", line 352, in <module>
    wxbuild.main(wxscript, build_options)
  File "/home/choiwonjun/Downloads/wxPython/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 328, in main

    "Error running configure")
  File "/home/choiwonjun/Downloads/wxPython/wxPython-src-2.9.2.4/build/tools/build-wxwidgets.py", line 62, in exitIfError
    raise builder.BuildError, msg
BuildError

and I wonder how can I switch them when I use them.

for 2.8.12.1 version, I could build the source and install it with the
option [--without-opengl]

but how can I use it? I run python and import wx. I typed wx.version().
it still displays "2.8.11.0"
I appended /opt/wx/2.8/lib path to PYTHONPATH

like this :

export PYTHONPATH=/opt/wx/2.8/lib:${PYTHONPATH} in bash file.

Double-check where the setup.py install step installed the files, but you will probably need to use something like /opt/wx/2.8/lib/python2.7/site-packages/wx-2.8-gtk-unicode

or also I used below command in the Terminal

export LD_LIBRARY_PATH=/opt/wx/2.8/lib
export PYTHONPATH=$WXDIR/wxPython

but still.

Python 2.7.2+ (default, Oct 4 2011, 20:03:08)
[GCC 4.6.1] on linux2
Type"help","copyright","credits" or"license" for more information.

import wx
wx.version()

'2.8.11.0 (gtk2-unicode)'

Look at the sys.path and see how the wx folders are ordered. The first one in the list containing a matching 'wx' package name will be the one that is imported with "import wx"

  >>> import sys, pprint
  >>> pprint.pprint(sys.path)

Experiment with setting PYTHONPATH and/or creating .pth files and check how it affects sys.path until you get it to have your desired version of wx first in the list. Another option would be to use virtualenv which would let you have more control over what modules and packages are available to the python in the virtualenv.

for 2.9.2.4 version, there is still same error I couldn't put the option
like above.
I followed the build instruction

cd wxPython-src-2.9.0.1/wxPython
python build-wxpython.py --build_dir=../bld

and the error was :

checking for -lGLU... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available
Error running configure
ERROR: failed building wxWidgets

You'll either need to figure out what is missing on your system that is preventing the configure step from succeeding, or you'll need to edit build-wxpython.py and build-wxwidgets.py to make building the GLCanvas optional.

···

On 12/20/11 4:37 PM, 최원준 wrote:

--
Robin Dunn
Software Craftsman

Double-check where the setup.py install step installed the files, but you will probably need to use something like /opt/wx/2.8/lib/python2.7/site-packages/wx-2.8-gtk-unicode

there is no python2.7 folder in /opt/wx/2.8/

[===>08:36:20]~:cd /opt/wx/2.8/lib/
[===>08:36:49]lib:ls
libwx_based-2.8.so libwx_gtk2d_core-2.8.so.0

libwx_based-2.8.so.0 libwx_gtk2d_core-2.8.so.0.8.0
libwx_based-2.8.so.0.8.0 libwx_gtk2d_html-2.8.so
libwx_based_net-2.8.so libwx_gtk2d_html-2.8.so.0

libwx_based_net-2.8.so.0 libwx_gtk2d_html-2.8.so.0.8.0
libwx_based_net-2.8.so.0.8.0 libwx_gtk2d_qa-2.8.so
libwx_based_xml-2.8.so libwx_gtk2d_qa-2.8.so.0

libwx_based_xml-2.8.so.0 libwx_gtk2d_qa-2.8.so.0.8.0
libwx_based_xml-2.8.so.0.8.0 libwx_gtk2d_richtext-2.8.so
libwx_gtk2d_adv-2.8.so libwx_gtk2d_richtext-2.8.so.0

libwx_gtk2d_adv-2.8.so.0 libwx_gtk2d_richtext-2.8.so.0.8.0
libwx_gtk2d_adv-2.8.so.0.8.0 libwx_gtk2d_xrc-2.8.so
libwx_gtk2d_aui-2.8.so libwx_gtk2d_xrc-2.8.so.0

libwx_gtk2d_aui-2.8.so.0 libwx_gtk2d_xrc-2.8.so.0.8.0
libwx_gtk2d_aui-2.8.so.0.8.0 wx
libwx_gtk2d_core-2.8.so

Look at the sys.path and see how the wx folders are ordered. The first one in the list containing a matching ‘wx’ package name will be the one that is imported with “import wx”

import sys, pprint

pprint.pprint(sys.path)

Experiment with setting PYTHONPATH and/or creating .pth files and check how it affects sys.path until you get it to have your desired version of wx first in the list. Another option would be to use virtualenv which would let you have more control over what modules and packages are available to the python in the virtualenv.

import pprint
pprint.pprint(sys.path)
[‘’,
‘/home/workspace/Python_modules’,
‘/opt/wx/2.8/lib’,
‘/usr/lib/python2.7’,

‘/usr/lib/python2.7/plat-linux2’,
‘/usr/lib/python2.7/lib-tk’,
‘/usr/lib/python2.7/lib-old’,
‘/usr/lib/python2.7/lib-dynload’,
‘/usr/local/lib/python2.7/dist-packages’,

‘/usr/lib/python2.7/dist-packages’,
‘/usr/lib/python2.7/dist-packages/PIL’,
‘/usr/lib/python2.7/dist-packages/gst-0.10’,
‘/usr/lib/python2.7/dist-packages/gtk-2.0’,
‘/usr/lib/pymodules/python2.7’,

‘/usr/lib/python2.7/dist-packages/ubuntu-sso-client’,
‘/usr/lib/python2.7/dist-packages/ubuntuone-client’,
‘/usr/lib/python2.7/dist-packages/ubuntuone-control-panel’,
‘/usr/lib/python2.7/dist-packages/ubuntuone-couch’,

‘/usr/lib/python2.7/dist-packages/ubuntuone-installer’,
‘/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol’,
‘/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode’]

You’ll either need to figure out what is missing on your system that is preventing the configure step from succeeding, or you’ll need to edit build-wxpython.py and build-wxwidgets.py to make building the GLCanvas optional.

which part should I change in attached file for the GLCanvas optional? and I couldn’t find the file “build-wxwidgets.py”

Wonjun, Choi

build-wxpython.py (18.2 KB)

    Double-check where the setup.py install step installed the files,
    but you will probably need to use something like
    /opt/wx/2.8/lib/python2.7/__site-packages/wx-2.8-gtk-__unicode

there is no python2.7 folder in /opt/wx/2.8/

Which is why I said that you should double check where the package was installed to. If you didn't install then using the wxPython folder in the source tree should work, but you will need to have used the --inplace flag when building.

which part should I change in attached file for the GLCanvas optional?

Read the existing code and you should be able to follow the examples already there for adding a new command line option, and responding to it being set by adding flags to be used with build-wxwidgets.py and when running setup.py.

and I couldn't find the file "build-wxwidgets.py"

It is in the wxWidgets part of the source tree.

···

On 12/21/11 4:08 PM, 최원준 wrote:

--
Robin Dunn
Software Craftsman