Opened 7 years ago

Closed 7 years ago

#2271 closed enhancement (fixed)

[raster] make -j N not working if postgis_raster enabled

Reported by: iacovellas Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.0.4
Component: raster Version: 2.0.x
Keywords: history Cc:

Description

Compiling PostGIS with -j option fails if postgis_raster is enabled. I have tested on Linux Mint 14x86 with PostGIS 2.0.3

when compiling with

$ ./configure $ make -j 4 all

it fails with following error:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -shared -o rtpostgis-2.0.so rt_pg.o -L/usr/local/pgsql/lib -L/usr/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags ../rt_core/librtcore.a ../../liblwgeom/.libs/liblwgeom.a ../../libpgcommon/libpgcommon.a -L/usr/local/lib -lgdal -L/usr/local/lib -lgeos_c -lproj -ljson -L/usr/lib -lxml2 gcc: error: ../rt_core/librtcore.a: No such file or directory make[2]: * [rtpostgis-2.0.so] Error 1 make[2]: * Waiting for unfinished jobs.... make[2]: Leaving directory `/home/stefano/sources/postgis-2.0.3/raster/rt_pg' make[1]: * [pglib] Error 2 make[1]: * Waiting for unfinished jobs.... ar rs librtcore.a rt_api.o ar: creating librtcore.a make[3]: Leaving directory `/home/stefano/sources/postgis-2.0.3/raster/rt_core' /bin/bash ../../libtool --mode=link gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom -I/usr/local/pgsql/include -I/usr/local/include -I/usr/local/include raster2pgsql.o ../rt_core/librtcore.a ../rt_core/librtcore.a ../../liblwgeom/liblwgeom.la -L/usr/local/pgsql/lib -lpq -L/usr/local/lib -lgdal -L/usr/local/lib -lgeos_c -lc -lm -o raster2pgsql ar rs librtcore.a rt_api.o make[2]: Leaving directory `/home/stefano/sources/postgis-2.0.3/raster/rt_core' libtool: link: gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom -I/usr/local/pgsql/include -I/usr/local/include -I/usr/local/include raster2pgsql.o -o .libs/raster2pgsql ../rt_core/librtcore.a ../../liblwgeom/.libs/liblwgeom.so -L/usr/local/pgsql/lib -lpq -L/usr/local/lib /usr/local/lib/libgdal.so /usr/local/lib/libgeos_c.so -lc -lm make[2]: Leaving directory `/home/stefano/sources/postgis-2.0.3/raster/loader' make[1]: Leaving directory `/home/stefano/sources/postgis-2.0.3/raster' make: * [all] Error 1

when compiling with

$ ./configure --without_raster $ make -j 4 all

There is no error

Change History (2)

comment:1 Changed 7 years ago by Bborie Park

Component: postgisraster
Milestone: PostGIS 2.0.4
Owner: changed from strk to Bborie Park
Type: defectenhancement

By the looks of it, make is trying to build librtcore.a at the same time as it is building rtpostgis-2.0.so that depends upon librtcore.a. The error makes perfect sense.

An easy workaround is to add .NOTPARALLEL pseudo-target to raster, especially due to the limited number of source files...

comment:2 Changed 7 years ago by Bborie Park

Keywords: history added
Resolution: fixed
Status: newclosed
Summary: make -j N not working if postgis_raster enabled[raster] make -j N not working if postgis_raster enabled

pseudo-target .NOTPARALLEL added for -branch 2.0 in r11283. Added for -trunk in r11284.

Note: See TracTickets for help on using tickets.