[ODE] Old makefile build system

Rodrigo Hernandez kwizatz at aeongames.com
Thu Apr 6 14:07:16 MST 2006


Ah, you're right, I looked thru the gcc manual, the variable you want to 
set is LIBRARY_PATH sans the LD_ prefix, my mistake:

|LIBRARY_PATH|
    The value of |LIBRARY_PATH| is a colon-separated list of
    directories, much like |PATH|. When configured as a native compiler,
    GCC tries the directories thus specified when searching for special
    linker files, if it can't find them using |GCC_EXEC_PREFIX|. Linking
    using GCC also uses these directories when searching for ordinary
    libraries for the |-l| option (but directories specified with |-L|
    come first). 

Also, I ran configure on a Fedora Core 4 machine here, and it seems to 
look for and find the path for both headers and libs for X, something 
must have changed about the way configure looks for it since Redhat 9.

I made the changes so GLU is tested having GL as part of LDFLAGS, that 
should work now, I have no idea what exactly is going on
with the library path issue, but setting LIBRARY_PATH  would likelly help.

Cheers!

Peter Kyme wrote:

> Rodrigo Hernandez wrote:
>
>>
>> Ok, thats better :), now the problem with adding a check for glut is 
>> that it may not be available everywhere and its not needed anyway,
>> the solution is to push the GL library temporally into LDFLAGS, I can 
>> do that.
>>
>> Did you add the line to .bash_profile? did you start a new xterm 
>> after that? you can also run the line as a command from the command 
>> line,
>> and make sure the variable is set by calling "set" with no parameters.
>>
>
> Yes I did, though I don't see how it would help since AFAIK 
> LD_LIBRARY_PATH isn't used at link time.
>
> Ok I think I see where the problem is coming from. On my installation 
> of Redhat 9 libGLU has no dependency on libGL or libX11.
>
> ldd /usr/lib/libGLU.so
>
>         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40096000)
>         libm.so.6 => /lib/libm.so.6 (0x40149000)
>         libc.so.6 => /lib/libc.so.6 (0x4016b000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x402a4000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
> while on Fedora Core 4
>
> ldd /usr/lib/libGLU.so
>
>         linux-gate.so.1 =>  (0xffffe000)
>         libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xf7f43000)
>         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xf7e6f000)
>         libGL.so.1 => /usr/lib/libGL.so.1 (0xf7dec000)
>         libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf7d0c000)
>         libm.so.6 => /lib/libm.so.6 (0xf7ce8000)
>         libc.so.6 => /lib/libc.so.6 (0xf7bbe000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7bb4000)
>         libdl.so.2 => /lib/libdl.so.2 (0xf7bb0000)
>         libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0xf73f2000)
>         libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 
> (0xf73ef000)
>         /lib/ld-linux.so.2 (0x56555000)
>
>> Peter Kyme wrote:
>>
>>> Rodrigo Hernandez wrote:
>>>
>>>>
>>>> It shouldn't fail because the test makes no references to any 
>>>> functions in either library (the only error that should come up is 
>>>> if the lib.a file isn't found),
>>>> but check your config.log file to find out what exactly is the 
>>>> cause of the error.
>>>
>>>
>>>
>>> configure:9432: checking for main in -lGLU
>>> configure:9456: gcc -o conftest -g -g  conftest.c -lGLU   >&5
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glPixelStorei'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEvalPoint2'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glMultMatrixd'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glPopAttrib'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glTexImage2D'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glMapGrid2f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glTexImage3D'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glMapGrid1f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glColor3f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glMapGrid2d'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEvalCoord1f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEvalMesh2'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glVertex3f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glNormal3fv'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glTexImage1D'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glMultMatrixf'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glGetTexLevelParameteriv'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glDisable'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glVertex3fv'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glBegin'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glMap1f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEvalPoint1'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glGetFloatv'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glVertex2f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glTexCoord2f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glGetIntegerv'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glPushAttrib'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glTranslated'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glOrtho'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glGetString'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEnable'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glNormal3f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glPolygonMode'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glMap2f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glScalef'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glVertex2fv'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glTranslatef'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEvalCoord2f'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEnd'
>>> /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../libGLU.so: 
>>> undefined reference to `glEvalMesh1'
>>> collect2: ld returned 1 exit status
>>>
>>>> Also, I just made the changes about an hour ago, could you update 
>>>> your SVN directory and try again?
>>>>
>>>
>>> Yes I already updated to latest trunk. The libXmu and libXi tests 
>>> also fail since /usr/X11R6/lib/ isn't in the link path.
>>>
>>>> Oh and if you want to keep the discussion inside the list make sure 
>>>> ODE at q12.org is copied on your mailings.
>>>>
>>>> Cheers!
>>>>
>>>> Peter Kyme wrote:
>>>>
>>>>> Rodrigo Hernandez wrote:
>>>>>
>>>>>>
>>>>>> As for the change in libraries, I will add checks for libXmu.a 
>>>>>> and libXi, those shoudnt pose a problem, but the path to 
>>>>>> /usr/X11R6/lib/
>>>>>> should be set in the LD_LIBRARY_PATH enviroment variable (unless 
>>>>>> of course there is an M4 macro to detect the X library path).
>>>>>>
>>>>>> try adding:
>>>>>>
>>>>>> LD_LIBRARY_PATH=/usr/X11R6/lib/:$LD_LIBRARY_PATH ; export 
>>>>>> LD_LIBRARY_PATH
>>>>>>
>>>>>> to your ~/.bash_profile file.
>>>>>>
>>>>>
>>>>> I think the actual problem is that the configure script attempts 
>>>>> to do:
>>>>>
>>>>> gcc -o conftest -g -g  conftest.c -lGLU
>>>>>
>>>>> and fails because libGLU has dependencies on libGL.
>>>>>
>>>>> I can make the problem go away (and remove the need for the Xmu & 
>>>>> Xi tests) by linking against glut.
>>>>>
>>>>> AC_CHECK_LIB(glut, main,[GL_LIBS="$GL_LIBS -lglut"])
>>>>>
>>>>> This allows ode to build on my system.
>>>>>
>>>>
>>>>
>>>
>>
>>
>



More information about the ODE mailing list