[GRASS-user] Linking error in photo.2image

Hamish hamish_b at yahoo.com
Sun Sep 14 01:22:27 EDT 2008


> > Craig Leat:
> When running make in /grass6_devel/imagery/i.ortho.photo/photo.2image
> I get a linking error as follows:
>
> /usr/bin/ld:
> OBJ.i686-pc-linux-gnu/mark.o(.text+0x94a): unresolvable
> R_386_32 relocation against symbol `line'
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: ld returned 1 exit status
> make: ***
> [/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/etc/photo.2image]
> Error 1

Hamish:
> > After SVN update of the grass6 source I now get the same error when
> > compling photo.2image.
> >
> > I reverted the only recent change (indent) but still get the error.
>
> > Nothing else on the machine has changed much since the last build,
> > maybe a newer version of GDAL from Debian backports.org?

Craig:
> This error persists even though I have:
> 1. Upgraded to gcc 4.3.2 (self compiled)
> 2. Recompiled gdal 1.5.2 using '-fpic' compiler flag
> 3. compiled GRASS with each of these flags in turn: -fpic,
> -Wl,--warn-unresolved-symbols, -Wl,--unresolved-symbols=ignore-all
> 
> GRASS 6.3.1 compiles beautifully and so at least I have a
> working GRASS.
...
> Ps I'm on ubuntu 7.10, 32 bit, i686


Getting back to the actual error message, maybe the "line" variable
set in imagery/i.ortho.photo/photo.2image/camera_ref.h is conflicting
between the "line" variable used in marc.c and the one in use_camera.c?

camera_ref.h:
#ifndef GLOBALCAM
#  define GLOBALCAM extern
#endif
....
GLOBALCAM int line;

use_camera.c:
#define  GLOBALCAM
#include "camera_ref.h"

mark.c:
#include "camera_ref.h"


Hamish



      



More information about the grass-user mailing list