[gdal-dev] building plugin in Linux64
Ivan Lucena
ivan.lucena at princeton-ma.us
Thu Jun 28 06:50:13 PDT 2012
Hi there,
I am trying to build a GDAL driver as a plugin in a Linux 64 environment and I am having a little bit of problem. Besides the fact that I don't' have my glasses today...
1. I run ./configure, make, make install without any problem. Everything works, the driver works just fine. But I need to build it as a plugin, so when I try to run "make plugin" on the driver folder the GNUmakefile crashes because the variable LD_SHARED is not defined. I did that several times before in Linux32 and never have that problem.
By looking at GDAL I can see:
LD_SHARED =
That is kind of strange because the main GDAL shared library was created perfectly in the same environment. Don't it uses the same settings?
2. Then I add this to the command: 'make plugin -e LD_SHARED="gcc -shared"' what results in:
relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
Again, why do I need that if it was perfectly fine when I build that same driver into the GDAL shared library?
3. If I add the '-fPIC" to the compilation and run the gcc -shared again, I got the plugin built but when I run it it complains that it cannot find the first initialization function on the commercial shared library that the driver uses. It seems like a shared library architecture mismatch to me. I don't know.
But again, that same driver works perfectly when build into the GDAL shared library, without any -fPIC at all.
Does anybody has a glue?
Thanks in advance,
Ivan
More information about the gdal-dev
mailing list