/contrib/ utilities make error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

/contrib/ utilities make error

Guy Picton Phillipps
Hello listers,

A further Make question - this time when attempting to run make in the
contrib directory to build the following binaries: dbfcat, dbfinfo,
shpcat, shpcentrd, shpdata, shpdxf, shpfix, shpinfo, shpproj & shpwkb.

I am installing on fresh Ubuntu9.10 32-bit server, having previously
installed:

freetype-2.3.12
gd-2.0.35
jpegsrc.v6b
libpng-1.4.1
proj-4.7.0
zlib-1.2.5
shapelib (dbfadd, dbfcreate, dbfdump, shpadd, shpcreate, shpdump,
shprewind & shptest)


When running 'make' in the contrib directory as root, I get the
following output:

==================================================================
root@vbox9-10serveri386:/usr/local/src/shapelib-1.3.0b1/contrib# make
cc -g -I.. -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpdxf.c
../shpopen.o ../dbfopen.o   -o shpdxf
shpdxf.c: In function âmainâ:
shpdxf.c:218: warning: incompatible implicit declaration of built-in
function âexitâ
shpdxf.c:221: warning: incompatible implicit declaration of built-in
function âstrcpyâ
shpdxf.c:222: warning: incompatible implicit declaration of built-in
function âstrncpyâ
shpdxf.c:222: warning: incompatible implicit declaration of built-in
function âstrlenâ
shpdxf.c:223: warning: incompatible implicit declaration of built-in
function âstrcatâ
../shpopen.o: In function `SHPOpen':
/usr/local/src/shapelib-1.3.0b1/shpopen.c:440: undefined reference to
`SASetupDefaultHooks'
../shpopen.o: In function `SHPCreate':
/usr/local/src/shapelib-1.3.0b1/shpopen.c:803: undefined reference to
`SASetupDefaultHooks'
../dbfopen.o: In function `DBFOpen':
/usr/local/src/shapelib-1.3.0b1/dbfopen.c:368: undefined reference to
`SASetupDefaultHooks'
../dbfopen.o: In function `DBFCreateEx':
/usr/local/src/shapelib-1.3.0b1/dbfopen.c:645: undefined reference to
`SASetupDefaultHooks'
collect2: ld returned 1 exit status
make: *** [shpdxf] Error 1
==================================================================

I assume that the warnings are ok, but the undefined references seem to
cause a problem. I have looked at the lines in shpopen.c & dbfopen.c,
and have found SASetupDefaultHooks in the shapefil.h library, but afraid
that this hasn't given me much insight into solving the problem.

The relevant lines from shpopen.c, dbfopen.c & shapefil.h are as follows:

shpopen.c - line 440: SASetupDefaultHooks( &sHooks );
shpopen.c - line 803: SASetupDefaultHooks( &sHooks );
dbfopen.c - line 368: SASetupDefaultHooks( &sHooks );
dbfopen.c - line 645: SASetupDefaultHooks( &sHooks );
 
shapefil.h - line 247: void SHPAPI_CALL SASetupDefaultHooks( SAHooks
*psHooks );

I noticed that there seem to be 2 arguments for SASetupDefaultHooks
(although I wonder if the asterix means the second is optional?), but
only one is provided in the shpopen.c & dbfopen.c  - could this be the
cause of the problem?


For information -  make check yields the following:

================================================
root@vbox9-10serveri386:/usr/local/src/shapelib-1.3.0b1/contrib# make check
tests/shpproj.sh
rm: cannot remove `test*': No such file or directory
tests/shpproj.sh: 21: ../shpproj: not found
tests/shpproj.sh: 22: ../shpproj: not found
tests/shpproj.sh: 23: ../shpproj: not found
failure...
=================================================


as ever will be grateful for any suggestions as to the cause of this.

Many thanks,

Guy



--

Guy Picton Phillipps (MSc)
Remote Sensing & GIS
WCS Tanzania Program

www.wcs.org <http://www.wcs.org>

_______________________________________________
Shapelib mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/shapelib
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /contrib/ utilities make error

Frank Warmerdam-2
guy picton phillipps wrote:

> Hello listers,
>
> A further Make question - this time when attempting to run make in the
> contrib directory to build the following binaries: dbfcat, dbfinfo,
> shpcat, shpcentrd, shpdata, shpdxf, shpfix, shpinfo, shpproj & shpwkb.
>
> I am installing on fresh Ubuntu9.10 32-bit server, having previously
> installed:
>
> freetype-2.3.12
> gd-2.0.35
> jpegsrc.v6b
> libpng-1.4.1
> proj-4.7.0
> zlib-1.2.5
> shapelib (dbfadd, dbfcreate, dbfdump, shpadd, shpcreate, shpdump,
> shprewind & shptest)
>
>
> When running 'make' in the contrib directory as root, I get the
> following output:
>
> ==================================================================
> root@vbox9-10serveri386:/usr/local/src/shapelib-1.3.0b1/contrib# make
> cc -g -I.. -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpdxf.c
> ../shpopen.o ../dbfopen.o   -o shpdxf
> shpdxf.c: In function âmainâ:
> shpdxf.c:218: warning: incompatible implicit declaration of built-in
> function âexitâ
> shpdxf.c:221: warning: incompatible implicit declaration of built-in
> function âstrcpyâ
> shpdxf.c:222: warning: incompatible implicit declaration of built-in
> function âstrncpyâ
> shpdxf.c:222: warning: incompatible implicit declaration of built-in
> function âstrlenâ
> shpdxf.c:223: warning: incompatible implicit declaration of built-in
> function âstrcatâ
> ../shpopen.o: In function `SHPOpen':
> /usr/local/src/shapelib-1.3.0b1/shpopen.c:440: undefined reference to
> `SASetupDefaultHooks'

Guy,

I believe this is a missing entry for safileio.o in the makefile and I
believe it is fixed in CVS. I have prepared a new beta release of shapelib
1.3.0 that should have the fix:

   http://download.osgeo.org/shapelib/shapelib-1.3.0b2.tar.gz

I'd actually push ahead and make this the 1.3.0 release except that
now there is discussion of adding 64bit integer support for wide
integer fields which seems like something that should be addressed
in the 1.3.0 release.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
Shapelib mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/shapelib
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /contrib/ utilities make error

Guy Picton Phillipps
Hello Frank,

Thanks again for your reply which has, I think, solved the issue. A
number of warning messages are displayed, and the make check fails, but
ultimately the binaries are created. FYI, the output of both make & make
check is attached, as it is quite long.

All the best,

Guy



Frank Warmerdam wrote:

> guy picton phillipps wrote:
>> Hello listers,
>>
>> A further Make question - this time when attempting to run make in
>> the contrib directory to build the following binaries: dbfcat,
>> dbfinfo, shpcat, shpcentrd, shpdata, shpdxf, shpfix, shpinfo, shpproj
>> & shpwkb.
>>
>> I am installing on fresh Ubuntu9.10 32-bit server, having previously
>> installed:
>>
>> freetype-2.3.12
>> gd-2.0.35
>> jpegsrc.v6b
>> libpng-1.4.1
>> proj-4.7.0
>> zlib-1.2.5
>> shapelib (dbfadd, dbfcreate, dbfdump, shpadd, shpcreate, shpdump,
>> shprewind & shptest)
>>
>>
>> When running 'make' in the contrib directory as root, I get the
>> following output:
>>
>> ==================================================================
>> root@vbox9-10serveri386:/usr/local/src/shapelib-1.3.0b1/contrib# make
>> cc -g -I.. -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpdxf.c
>> ../shpopen.o ../dbfopen.o   -o shpdxf
>> shpdxf.c: In function âmainâ:
>> shpdxf.c:218: warning: incompatible implicit declaration of built-in
>> function âexitâ
>> shpdxf.c:221: warning: incompatible implicit declaration of built-in
>> function âstrcpyâ
>> shpdxf.c:222: warning: incompatible implicit declaration of built-in
>> function âstrncpyâ
>> shpdxf.c:222: warning: incompatible implicit declaration of built-in
>> function âstrlenâ
>> shpdxf.c:223: warning: incompatible implicit declaration of built-in
>> function âstrcatâ
>> ../shpopen.o: In function `SHPOpen':
>> /usr/local/src/shapelib-1.3.0b1/shpopen.c:440: undefined reference to
>> `SASetupDefaultHooks'
>
> Guy,
>
> I believe this is a missing entry for safileio.o in the makefile and I
> believe it is fixed in CVS. I have prepared a new beta release of
> shapelib
> 1.3.0 that should have the fix:
>
>   http://download.osgeo.org/shapelib/shapelib-1.3.0b2.tar.gz
>
> I'd actually push ahead and make this the 1.3.0 release except that
> now there is discussion of adding 64bit integer support for wide
> integer fields which seems like something that should be addressed
> in the 1.3.0 release.
>
> Best regards,

root@vbox9-10serveri386:/usr/local/src/shapelib-1.3.0b2/contrib# make
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2    -c -o ../shpopen.o ../shpopen.c
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2    -c -o ../dbfopen.o ../dbfopen.c
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2    -c -o ../safileio.o ../safileio.c
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpdxf.c ../shpopen.o ../dbfopen.o ../safileio.o  -o shpdxf
shpdxf.c: In function âmainâ:
shpdxf.c:218: warning: incompatible implicit declaration of built-in function âexitâ
shpdxf.c:221: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpdxf.c:222: warning: incompatible implicit declaration of built-in function âstrncpyâ
shpdxf.c:222: warning: incompatible implicit declaration of built-in function âstrlenâ
shpdxf.c:223: warning: incompatible implicit declaration of built-in function âstrcatâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  -c shpgeo.c
shpgeo.c: In function âasFileNameâ:
shpgeo.c:115: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpgeo.c:116: warning: incompatible implicit declaration of built-in function âstrlenâ
shpgeo.c: In function âSHPReadSHPStreamâ:
shpgeo.c:288: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c: In function âSHPWriteSHPStreamâ:
shpgeo.c:346: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c:341: warning: ignoring return value of âreallocâ, declared with attribute warn_unused_result
shpgeo.c: In function âWKBStreamWriteâ:
shpgeo.c:376: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c: In function âWKBStreamReadâ:
shpgeo.c:396: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c: In function âSHPWriteOGisWKBâ:
shpgeo.c:497: warning: too few arguments for format
shpgeo.c: In function âSHPCloneâ:
shpgeo.c:1462: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c:1467: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c:1492: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c:1498: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c:1504: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpgeo.c:1510: warning: incompatible implicit declaration of built-in function âmemcpyâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpproj.c  ../shpopen.o ../dbfopen.o ../safileio.o ./shpgeo.o -lm -L/root/bld/lib -lproj -lm -lproj  -o shpproj
shpproj.c: In function âmainâ:
shpproj.c:121: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpproj.c:139: warning: incompatible implicit declaration of built-in function âstrlenâ
shpproj.c:140: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpproj.c:152: warning: incompatible implicit declaration of built-in function âstrlenâ
shpproj.c:156: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpproj.c:168: warning: incompatible implicit declaration of built-in function âstrlenâ
shpproj.c:169: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpproj.c:180: warning: incompatible implicit declaration of built-in function âstrlenâ
shpproj.c:184: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpproj.c:227: warning: incompatible implicit declaration of built-in function âmemcpyâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  dbfinfo.c ../shpopen.o ../dbfopen.o ../safileio.o  -o dbfinfo
dbfinfo.c: In function âmainâ:
dbfinfo.c:41: warning: incompatible implicit declaration of built-in function âexitâ
dbfinfo.c:51: warning: incompatible implicit declaration of built-in function âexitâ
dbfinfo.c:60: warning: format â%ldâ expects type âlong intâ, but argument 2 has type âintâ
dbfinfo.c:60: warning: format â%ldâ expects type âlong intâ, but argument 3 has type âintâ
dbfinfo.c:67: warning: incompatible implicit declaration of built-in function âmallocâ
dbfinfo.c:76: warning: incompatible implicit declaration of built-in function âstrcpyâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpcentrd.c ../shpopen.o ../dbfopen.o ../safileio.o  ./shpgeo.o -lm -L/root/bld/lib -lproj -o shpcentrd
shpcentrd.c: In function âmainâ:
shpcentrd.c:122: warning: incompatible implicit declaration of built-in function âmemcpyâ
shpcentrd.c:141: warning: incompatible implicit declaration of built-in function âmemcpyâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpdata.c ../shpopen.o ../dbfopen.o ../safileio.o  ./shpgeo.o -lm -L/root/bld/lib -lproj -o shpdata
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpwkb.c ../shpopen.o ../dbfopen.o ../safileio.o  ./shpgeo.o -lm -L/root/bld/lib -lproj -o shpwkb
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  dbfcat.c ../shpopen.o ../dbfopen.o ../safileio.o  -o dbfcat
dbfcat.c: In function âmainâ:
dbfcat.c:48: warning: incompatible implicit declaration of built-in function âexitâ
dbfcat.c:55: warning: incompatible implicit declaration of built-in function âstrcpyâ
dbfcat.c:56: warning: incompatible implicit declaration of built-in function âstrcatâ
dbfcat.c:61: warning: incompatible implicit declaration of built-in function âexitâ
dbfcat.c:71: warning: incompatible implicit declaration of built-in function âexitâ
dbfcat.c:78: warning: incompatible implicit declaration of built-in function âexitâ
dbfcat.c:115: warning: incompatible implicit declaration of built-in function âexitâ
dbfcat.c:118: warning: incompatible implicit declaration of built-in function âexitâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpinfo.c ../shpopen.o ../dbfopen.o ../safileio.o  ./shpgeo.o -lm -L/root/bld/lib -lproj -o shpinfo
shpinfo.c: In function âmainâ:
shpinfo.c:61: warning: incompatible implicit declaration of built-in function âexitâ
shpinfo.c:72: warning: incompatible implicit declaration of built-in function âexitâ
shpinfo.c:79: warning: incompatible implicit declaration of built-in function âstrcpyâ
shpinfo.c:97: warning: format â%ldâ expects type âlong intâ, but argument 4 has type âintâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpfix.c ../shpopen.o ../dbfopen.o ../safileio.o  -o shpfix
shpfix.c: In function âmainâ:
shpfix.c:54: warning: incompatible implicit declaration of built-in function âexitâ
shpfix.c:68: warning: incompatible implicit declaration of built-in function âexitâ
shpfix.c:82: warning: incompatible implicit declaration of built-in function âexitâ
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpcat.c ../shpopen.o ../dbfopen.o ../safileio.o  -o shpcat
shpcat.c: In function âmainâ:
shpcat.c:50: warning: incompatible implicit declaration of built-in function âexitâ
shpcat.c:61: warning: incompatible implicit declaration of built-in function âexitâ
shpcat.c:75: warning: incompatible implicit declaration of built-in function âexitâ
shpcat.c:96: warning: incompatible implicit declaration of built-in function âexitâ
g++ -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  Shape_PointInPoly.cpp ../shpopen.o ../dbfopen.o ../safileio.o  \
                -o Shape_PointInPoly
cc -g -I.. -I/root/bld/include -DPROJ4 -D_LITTLE_ENDIAN -DDEBUG -DDEBUG2  shpsort.c ../shpopen.o ../dbfopen.o ../safileio.o  -lm -o shpsort


root@vbox9-10serveri386:/usr/local/src/shapelib-1.3.0b2/contrib# make check
tests/shpproj.sh
rm: cannot remove `test*': No such file or directory
../shpproj: error while loading shared libraries: libproj.so.0: cannot open shared object file: No such file or directory
../shpproj: error while loading shared libraries: libproj.so.0: cannot open shared object file: No such file or directory
../shpproj: error while loading shared libraries: libproj.so.0: cannot open shared object file: No such file or directory
failure...






_______________________________________________
Shapelib mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/shapelib
Loading...