[GRASS-dev] nviz compilation problem
Helena Mitasova
hmitaso at unity.ncsu.edu
Wed Jun 27 21:40:04 EDT 2007
On Jun 27, 2007, at 12:53 AM, Glynn Clements wrote:
>
> Helena Mitasova wrote:
>
>> I have compiled the CVS GRASS63 on a new 64bit computer with nvidia
>> graphics card running
>> RedHat Enterprise Linux. Everything compiled successfully except for
>> nviz that has some troubles with
>> shared GL libraries.
>> I have seen others with similar problems (I had it on another machine
>> too ) mostly due to broken symlink,
>> but that does not seem to be the case here:
>>
>> Errors in:
>> /local/home/helena/grassdev/grass6/lib/ogsf
>> /local/home/helena/grassdev/grass6/visualization/nviz
>>
>> (cd /local/home/helena/grassdev/grass6/dist.x86_64-unknown-linux-
>> gnu/lib; ln -f -s libgrass_ogsf.6.3.cvs.so /local/home/helena/
>> grassdev/grass6/dist.x86_64-unknown-linux-gnu/lib/libgrass_ogsf.so)
>> /usr/bin/ld: /usr/X11R6/lib64/libGL.a(glapi.o): relocation
>> R_X86_64_32 against `a local symbol' can not be used when making a
>> shared object; recompile with -fPIC
>> /usr/X11R6/lib64/libGL.a: could not read symbols: Bad value
>> collect2: ld returned 1 exit status
>> make: *** [/local/home/helena/grassdev/grass6/dist.x86_64-unknown-
>> linux-gnu/lib/libgrass_ogsf.6.3.cvs.so] Error 1
>>
>> what to recompile with -fPIC?
>
> libGL.a :(
>
>> if that is really the problem?
>
> The main problem is that you have a static libGL rather than a shared
> libGL. The GRASS build system tends to assume that all external
> libraries
> are shared libraries (unless building with --disable-shared, in which
> case either will work).
>
> You can probably work around it by removing $(OPENGLLIB) $(OPENGLULIB)
> from the definition of EXTRA_LIBS in lib/ogsf/Makefile, and adding
> them
> either to the definition of OGSFLIB in include/Make/Grass.make[.in]
> or to
> the individual Makefiles (primarily, visualization/nviz/src/Makefile).
>
> Actually, the NVIZ Makefile adds these explicitly, and r3.showdspf
> is no
> longer compiled, so simply removing them from lib/ogsf/Makefile will
> probably suffice.
Glynn,
thank you for your help - removing $(OPENGLLIB) $(OPENGLULIB) from
the ogsf/Makefile solved the ogsf compilation problem.
The nviz compilation still gives a related error:
Errors in:
/local/home/helena/grassdev/grass6/visualization/nviz
/usr/X11R6/lib64/libGL.a(glxcmds.o)(.text+0x32c1): In function
`glXGetMscRateOML':
: undefined reference to `XF86VidModeQueryVersion'
/usr/X11R6/lib64/libGL.a(glxcmds.o)(.text+0x32fd): In function
`glXGetMscRateOML':
: undefined reference to `XF86VidModeGetModeLine'
collect2: ld returned 1 exit status
make[1]: *** [nvwish] Error 1
make[1]: Leaving directory `/local/home/helena/grassdev/grass6/
visualization/nviz/src'
make: *** [nvwish] Error 2
thanks you
Helena
> Ideally, external shared libraries would be linked into the library
> while
> external static libraries would be linked into each module which
> uses the
> library. But I have no idea how to tell whether an external library is
> shared or static; configure just checks whether adding "-l<library>"
> works.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list