Opened 13 years ago

Closed 13 years ago

#1370 closed defect (fixed)

[raster] undefined references to GDAL library

Reported by: strk Owned by: pracine
Priority: blocker Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: Cc:

Description (last modified by strk)

raster/loader/raster2pgsql.c:695: undefined reference to `GDALOpenShared'
raster/loader/raster2pgsql.c:701: undefined reference to `GDALGetRasterCount'
raster/loader/raster2pgsql.c:718: undefined reference to `GDALGetProjectionRef'
...

Many more. As of r8375

Change History (13)

comment:1 by strk, 13 years ago

Description: modified (diff)

comment:2 by strk, 13 years ago

Somehow LDFLAGS gets eaten here. Changing name to the variable fixes the issue for me (like: ALL_LDFLAGS)

comment:3 by strk, 13 years ago

Droppin the PGXS include also fixes this. Do we really need it for raster2pgsql ?

comment:4 by Bborie Park, 13 years ago

PGXS isn't needed for raster2pgsql. Removed as of r8383.

comment:5 by Bborie Park, 13 years ago

Summary: undefined references to GDAL library[raster] undefined references to GDAL library

comment:6 by Bborie Park, 13 years ago

Reverted changes made in r8383 in r8384. PGXS is need to properly install the loader as without it, the bindir variable isn't set. Need to dig at what's happening.

comment:7 by strk, 13 years ago

Resolution: fixed
Status: newclosed

works here

comment:8 by strk, 13 years ago

Resolution: fixed
Status: closedreopened

Oops, sorry, I had local modifications to Makefile. It still fails as of r8383

comment:9 by Bborie Park, 13 years ago

Can you attach the output of the make? I can't seem to understand what could be going wrong.

comment:10 by strk, 13 years ago

The output clearly shows LDFLAG evaluating to the empty string. I don't think you're doing anything bad, it's more likely PGXS is. Just replacing LDFLAGS with ALL_LDFLAGS (both in definition and use) fixes it for me. I could commit that change but maybe you want to figure out why PGXS is doing that (with postgresql 8.4). Let me know.

comment:11 by Bborie Park, 13 years ago

OK. I'll do some testing with 8.4 as it works fine in 9.0. Will need to test 9.1 as well.

comment:12 by Bborie Park, 13 years ago

Fixed in r8388.

comment:13 by strk, 13 years ago

Resolution: fixed
Status: reopenedclosed

confirmed. thanks.

Note: See TracTickets for help on using tickets.