[gdal-dev] Re: error compiling gdal with ArcSDE support

Howard Butler hobu.inc at gmail.com
Wed Sep 21 09:50:51 EDT 2011


On Sep 21, 2011, at 7:30 AM, Wouter Schaubroeck wrote:

> Hi list,
> 
> Good news, I've fixed this issue by removing the libsde.so file from the ArcSDE libraries.
> 
> But now I have another issue, this is the error I get:
> 
> /home/sde/bin/sde100/sdeexe100//lib/libsde.a(jcapimin.o): In function `jpeg_CreateCompress':
> jcapimin.c:(.text+0x0): multiple definition of `jpeg_CreateCompress'
> /home/tux/bin/gdal/gdal-1.8.1/frmts/o/.libs/jcapimin.o:/home/tux/bin/gdal/gdal-1.8.1/frmts/jpeg/libjpeg/jcapimin.c:31: first defined here
> 
> Have any of you encountered this issue before? I'm already compiling with the --with-jpeg=internal option, but this didn't help. It looks like the libsde.a file contains these methods already, and want to join the jpeg-creation-game... Btw, this is not the only method that causes errors, but the other errors are similar.

You'll have to link to an external jpeg library and then make sure that SDE SDK is first in the link line so its internal JPEG library symbols get used first. It is unfortunate that SDE is embedding JPEG (they used to embed an ancient and crackable zlib too)


> Do any of you guys know what the problem is? I've already tried the following:
> - disabling the multi threads: --with-threads=no
> - specifically included the libpthread.so.0 in the LD_LIBRARY_PATH

libsde.so wants pthread, so you'll probably have to have --with-threads=yes  Additionally, you might try adding -pthread to the GDALMake.opt line that adds -lpthread.  Sometimes compilers treat this special.

I don't know that removing libsde.so fixed the issue. This file has symbols that are definitely needed for things to run.

Good luck,

Howard




More information about the gdal-dev mailing list