[Xastir] GDAL and ImageMagik support for Xastir

Curt Mills archer at eskimo.com
Wed Jan 12 00:12:24 EST 2005


On Tue, 11 Jan 2005, Jason & Kim Conolly wrote:

> configure:14574: checking for GDALAllRegister in -lgdal
> configure:14604: gcc -o conftest.exe -g -O2 -pipe -Wall  -I/usr/local/include
> -I/usr/X11R6/include -L/usr/local/lib   -L/usr/X11R6/lib conftest.c -lgdal
> -lintl -lcurl -lXm -lXt -lXp -lXext   -lSM -lICE -lX11  -lpcre -lproj -ltiff
> -lgeotiff >&5
> /usr/local/lib/libgdal.a(gdaldrivermanager.o)(.text+0x32):gdaldrivermanager.cpp:
> undefined reference to `___gxx_personality_sj0'


> And the "undefined references" continue indefinitely.  libgdal.a is located in
> /usr/local/lib. One possible clue from the .log:  the only GDAL specific PATH
> reference reads PATH: /usr/local/bin/gdal-config.  This is taken from the
> "GDAL/OGR install guide" at qgis.sourceforge.net/docs/install_guide/node8.html
> (step 7), although it didn't make sense to me.  I also did not undersand the
> LD_LIBRARY_PATH comments at step 6.

"ld" is the GNU Linker program.  At the point you actually run
"xastir", "ld" get invoked and it does the final linking between
Xastir and any shared libraries that Xastir uses.

In the case above, configure is attempting to compile/link a test
program that uses the gdal library ("-lgdal" is where the library is
called out, and stands for "libgdal").

On Unix boxes you often have to add additional directories to
"/etc/ld.so.conf" and then run "ldconfig" in order to compile all of
that info into "/etc/ld.so.cache".  That last file is the set of
directories that "ld" will automatically look through in order to
satisfy all of the unresolved links as it is getting ready to run a
program.  Whether Cygwin uses ld.so.conf/ld.so.cache/ldconfig at
all, I don't know, but that's the Unix/Linux way of doing things.
Perhaps that gives you enough info to track it down.

"LD_LIBRARY_PATH" is another method of telling the "ld" linker where
to look for libraries.  It's an environment variable, so you can
look at it by typing:

    echo $LD_LIBRARY_PATH

and set it by typing:

    export LD_LIBRARY_PATH=/blah/blah/blah/blah

or

    export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):/blah/blah/blah/blah

That last example will add a path onto the end of the existing set
of paths.

-- 
Curt, WE7U.				archer at eskimo dot com
http://www.eskimo.com/~archer
  Lotto:  A tax on people who are bad at math. - unknown
Windows:  Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me:  I picked the coordinate system!"



More information about the Xastir mailing list