Togl build fails under Fedora Core 1
Brought to you by:
mcfletch
I am getting this errormessage when attempting to build
under FC1.
building "Togl"
skipping src/Togl-1.6/togl.c
(build/temp.linux-i686-2.2/togl.o up-to-date)
gcc -shared build/temp.linux-i686-2.2/togl.o
-L/usr/share -L/usr/share -Lbuild/temp.linux-i686-2.2
-L/usr/share -L/usr/share -Lbuild/temp.linux-i686-2.2
-lGL -lX11 -lXext -lGLU -lXmu -lXt -lm -ltcl8.3 -ltk8.3
-linterface_util -o build/Togl-1.6-tk8.3/Togl.so
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Logged In: NO
hi...
your problem same as mine so i read installation
instruction and i downloaded tcl and tk source file from
"https://sourceforge.net/project/showfiles.php?group_id=10894"
and i tried " python setup.py build_togl
--tcl-source=/your/soure/directory
--tk-source=/your/source/directory" command but i get same
error. So how can i solve this problem ?
Thank you..
Logged In: NO
Same problem. I am under Gentoo, using python 2.3.3 and tk8.4
Logged In: YES
user_id=34901
This appears to be a problem with the Togl build script not
picking up the libraries for some reason. I'm looking into
it now.
Logged In: YES
user_id=34901
Somehow I deleted the call to copy the option dictionary
into the togl_build command. Darned if I know why I did it,
but putting it back in seems to solve the problem. In
togl_setup.py:
def finalize_options (self):
"""Finalise the options for building, we add Togl-specific
includes/libs"""
distutils.command.build_ext.build_ext.finalize_options( self )
self.distribution._set_command_options(
self, self.distribution.get_option_dict('build_togl')
)
if not Togl or not self.distribution.BUILD_TOGL:
return
tkDirs = ['generic', 'xlib' ]
tclDirs = [ 'generic', 'win', ] #'include', ]
is how the first few lines of finalize_options should look.
Logged In: YES
user_id=34901
Tested on Gentoo, but someone on Fedora should test to see
if it works there. To test, checkout the maint-2_0 branch
from CVS (you'll need SWIG 1.3.13 installed) (or just
manually patch the file as outlined against the 2.0.1.08
tarball).
Logged In: NO
I have manually patched the togl_setup.py file from the 2.0.1.08
tarball. I don't have swig installed. I have still the same
error :
src/Togl-1.6/togl.c: In function `Togl_Configure':
src/Togl-1.6/togl.c:1070: warning: passing arg 5 of pointer
to function from incompatible pointer type
gcc -pthread -shared
build/temp.linux-i686-2.3/src/Togl-1.6/togl.o -L/usr/lib
-L/usr/lib -Lbuild/temp.linux-i686-2.3 -L/usr/lib -L/usr/lib
-Lbuild/temp.linux-i686-2.3 -lGL -lX11 -lXext -lGLU -lXmu
-lXt -lm -ltcl8.4 -ltk8.4 -linterface_util -o
build/Togl-1.6-tk8.4/Togl.so
/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../i686-pc-linux-gnu/bin/ld:
cannot find -lX11
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
There is also a lot a file not found before :
...
package init file 'OpenGL/Demo/NeHe/__init__.py' not found
(or not a regular file)
package init file 'OpenGL/Demo/GLUT/examples/__init__.py'
not found (or not a regular file)
package init file 'OpenGL/Demo/GLE/__init__.py' not found
(or not a regular file)
package init file 'OpenGL/scripts/__init__.py' not found (or
not a regular file)
Logged In: YES
user_id=34901
Okay, let's get down and dirty, add these lines:
self.include_dirs.extend( self.distribution.include_dirs )
self.library_dirs.extend( self.distribution.library_dirs )
just after the lines:
self.include_dirs.extend( newIncludes )
self.library_dirs.append(
os.path.normpath(os.path.join(tk.getvar('tk_library'), '..')) )
the "package init file" warnings are because those
directories are not actually packages, they're just
collections of Python files/scripts. Should fix that some
day I suppose, just more distutils hacking that I really
don't have time for.
Logged In: NO
Now it builds fine :)