Discussion:
OGL, Wxwidgets, bakefile has odd dependency
(too old to reply)
Peter Geoghegan
2011-01-19 16:50:32 UTC
Permalink
Raw Message
Hi,

I am a developer on the PgAdmin project, a popular open source tool
for PostgreSQL administration and development. I have taken
responsibility for making our code build against both wxWidgets 2.8
and 2.9.

Our code is dependent on the Wxwidget's OGL module for things like the
graphical query builder and graphical explain visualisations. The fact
that OGL has been taken out of Wx's contrib for 2.9, and is only
available on wx-code presents us with a predicament.

I have everything compiling correctly (from the ogl.tag.gz package
available from sourceforge), but I still get this weird link error:

/usr/bin/ld: ogl_dll_composit.o: relocation R_X86_64_32 against
`wxDivisionControlPoint::ms_classInfo' can not be used when making a
shared object; recompile with -fPIC ogl_dll_composit.o: could not read
symbols: Bad value collect2: ld returned 1 exit status

Could you please help with this problem? I have built wxWidgets on
Linux/GTK in this way:

make clean
./configure --with-gtk --enable-gtk2 --enable-unicode
--enable-mimetype=no --disable-shared --enable-debug
make all
make install

make clean
./configure --with-gtk --enable-gtk2 --enable-unicode
--enable-mimetype=no --disable-shared --disable-debug
make all
make install

make clean
./configure --with-gtk --enable-gtk2 --enable-unicode
--enable-mimetype=no --enable-shared --enable-debug
make all
make install

make clean
./configure --with-gtk --enable-gtk2 --enable-unicode
--enable-mimetype=no --enable-shared --disable-debug
make all
make install

cd ./utils/hhp2cached
make all
make install
cd ../wxrc
make all
make install

I think this might be a bug with the makefile though. I think it was
generated with quite an old version of bakefile. I'm working off of
the ogl.tar.gz file that is available from sourceforge, and linked to
here:

http://wxcode.sourceforge.net/showcomp.php?name=ogl

I tried to run bakefile myself, but the shipped .bkl has a dependency
I cannot satisfy for "presets/wxcode.bkl". Please advise me on this
matter. Here is the bakefile in full:


<?xml version="1.0" ?>

<!-- RCS-ID: $Id: ogl.bkl,v 1.1 2007/03/28 15:15:44 frm Exp $ -->

<makefile>

<include file="presets/wxcode.bkl"/>


<!-- ================================================================= -->
<!-- Settings for this component -->
<!-- ================================================================= -->

<set-comp-name>ogl</set-comp-name>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Library settings -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<lib id="ogl_lib" template="wxcode-lib" cond="WX_SHARED=='0'">
</lib>
<dll id="ogl_dll" template="wxcode-dll" cond="WX_SHARED=='1'">
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib> <!-- base must be last wx-lib -->
</dll>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- This makes the MSVC6 project files much nicer... -->
<set var="MSVC6PRJ_MERGED_TARGETS">
ogl=ogl_lib+ogl_dll
</set>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- Sample(s) settings -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<wxcode-sample id="ogl">
<dir>samples/ogledit</dir>
<has-win32-res/>

<library>ogl_lib</library>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib> <!-- base must be last wx-lib -->
</wxcode-sample>

<wxcode-sample id="ogl2">
<dir>samples/studio</dir>
<has-win32-res/>

<library>ogl_lib</library>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib> <!-- base must be last wx-lib -->
</wxcode-sample>

</makefile>

Thanks,
Peter Geoghegan
Václav Slavík
2011-01-19 18:08:58 UTC
Permalink
Raw Message
Post by Peter Geoghegan
/usr/bin/ld: ogl_dll_composit.o: relocation R_X86_64_32 against
`wxDivisionControlPoint::ms_classInfo' can not be used when making a
shared object; recompile with -fPIC ogl_dll_composit.o: could not read
symbols: Bad value collect2: ld returned 1 exit status
I don't see how could this be related to Bakefile.
Post by Peter Geoghegan
I tried to run bakefile myself, but the shipped .bkl has a dependency
I cannot satisfy for "presets/wxcode.bkl". Please advise me on this
matter.
Well, you need to get it from wxCode, obviously. I don't understand, what advice other than this obvious one did you expect?

Regards,
Vaclav
Peter Geoghegan
2011-01-19 18:21:14 UTC
Permalink
Raw Message
Post by Václav Slavík
Well, you need to get it from wxCode, obviously. I don't understand, what advice other than this obvious one did you expect?
Well, I tried to, but that particular file cannot be located, despite
extensive Googling. I had hoped you'd be able to advise me on how to
re-create it or something similar, or at the very least be able to
speculate what might have caused the linker error that I see (prior to
having run bakefile myself; it is assumed by the packager that most
users won't run bakefile themselves).

The Makefile that I'm using was generated by that elderly version of bakefile.

Thanks,
Peter Geoghegan
Václav Slavík
2011-01-19 18:26:11 UTC
Permalink
Raw Message
Post by Peter Geoghegan
Well, I tried to, but that particular file cannot be located, despite
extensive Googling. I had hoped you'd be able to advise me on how to
re-create it or something similar,
That's a bit like asking a gcc developer to recreate a C++ library you want to use...
Post by Peter Geoghegan
or at the very least be able to
speculate what might have caused the linker error
No, sorry. Again, I don't see any possible relation to Bakefile.

Vaclav
Peter Geoghegan
2011-01-19 18:58:58 UTC
Permalink
Raw Message
Post by Václav Slavík
No, sorry. Again, I don't see any possible relation to Bakefile.
I apologise for the misunderstanding.

I have now located the relevant .blk files. I get the following
traceback from Bakefile though:

Traceback (most recent call last):
File "/usr/bin/bakefile", line 237, in <module>
run(sys.argv[1:])
File "/usr/bin/bakefile", line 216, in run
if not writer.write():
File "/usr/lib64/bakefile/writer.py", line 288, in write
invoke(writer, file, method)
File "/usr/lib64/bakefile/writer.py", line 243, in invoke
return invoke_em(writer, file, method)
File "/usr/lib64/bakefile/writer.py", line 201, in invoke_em
import empy.em
ImportError: No module named empy.em

I have the python module empy. Dependencies were resolved by my
package manager, yum, when I installed bakefile.

Here is the list of files associated with the empy package:

/usr/lib/python2.7/site-packages/em.py
/usr/lib/python2.7/site-packages/em.pyc
/usr/lib/python2.7/site-packages/em.pyo
/usr/lib/python2.7/site-packages/empy-3.1-py2.7.egg-info
/usr/share/doc/python-empy-3.3
/usr/share/doc/python-empy-3.3/COPYING
/usr/share/doc/python-empy-3.3/README
/usr/share/doc/python-empy-3.3/version.txt

Why do you think this might be?

Thanks,
Peter Geoghegan
Václav Slavík
2011-01-19 20:35:36 UTC
Permalink
Raw Message
Post by Peter Geoghegan
Why do you think this might be?
Something wrong, somewhere. Bakefile comes with its own copy of empy, so it's basically impossible for this to happen. Something is probably broken on your end, but it's impossible for me to tell, because you're a bit short on details (Bakefile version, OS, version, python runtime configuratio etc.). You'll have to have a closer look at it yourself.

Vaclav
Peter Geoghegan
2011-01-19 21:09:43 UTC
Permalink
Raw Message
Vaclav,

Apparently, it's a known bug my package manager's bakefile package. My
distro is F14. I've applied a patch available here, and I can now
successfully run bakefile:

https://bugzilla.redhat.com/show_bug.cgi?id=569885

Thanks,
Peter Geoghegan

Loading...