[Xastir] Ubuntu 6.10 Bootstrap error

Tom Russo russo at bogodyn.org
Fri Nov 17 00:13:48 EST 2006


On Thu, Nov 02, 2006 at 06:56:32AM -0800, we recorded a bogon-computron collision of the <nielsen at oz.net> flavor, containing:
> 
> On Nov 2, 2006, at 1:39 AM, John Ronan wrote:
> 
> >>
> >I'm replying to my own post, which is my bad, but anyways
> >>however trying to compile geotiff I get this
> >>
> >>gcc -O2  -Wall makegeo.o -L/usr/local/lib -L.. -lgeotiff -lproj - 
> >>ltiff -ljpeg -lz  -lm  -o makegeo
> >>/usr/bin/ld: makegeo: hidden symbol `__stack_chk_fail_local' in / 
> >>usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by  
> >>DSO
> >>/usr/bin/ld: final link failed: Nonrepresentable section on output
> >>collect2: ld returned 1 exit status
> >>make[1]: *** [makegeo] Error 1
> >>make[1]: Leaving directory `/home/j0n/sources/xastir/tmp/ 
> >>libgeotiff-1.2.3/bin'
> >>make: *** [Progs] Error 2


When I built libgeotiff on my SAR team's Ubuntu machine (one that had been
upgraded from 5.10 through 6.06 to 6.10) I did not see this problem, but 
today I did a fresh install of 6.10 on a new laptop and there it was.  I have
no idea why there should have been a difference, but there was, exactly as
you and John have both seen.

I tracked down the issue, with the help of google on the error message.  
The really helpful search result was this one:
  http://comments.gmane.org/gmane.linux.redhat.fedora.general/217819

The issue is that libgeotiff's configure script looks around for how to build 
shared libraries, and concludes that it needs to do "ld -shared" to make 
libgeotiff.so from its object files.  This is, however, completely incorrect 
with GCC 4.x.  The right thing to do is "gcc -shared"

The workaround is to configure libgeotiff by overriding its internal probe
for the way to do shared libraries.  That is, libgeotiff should be built
with 
   ./configure --with-ld-shared="gcc -shared"
   make
   sudo make install

Unfortunately, if I were to slam that into get-maptools, it would probably 
break the script for some other platform.  Instead, I'm documenting the
cheesy hack I did on my temporary copy of get-maptools.sh, and adding that
to the wiki.  I've tried to make it so that anyone googling on the error
message would get a quick answer to their question, too, so it has 
unfortunately bloated the step-by-step instructions somewhat.  It's still
pretty straightforward.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
 one trick, rational thinking, but when you're good and crazy, oooh, oooh,
 oooh, the sky is the limit!"  --- The Tick



More information about the Xastir mailing list