Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6376 closed defect (fixed)

/GDALmake.opt:579: recipe for target 'gdalserver.lo' failed

Reported by: jazzmy Owned by: warmerdam
Priority: high Milestone: 2.0.3
Component: default Version: 2.0.2
Severity: normal Keywords:


I have just downloaded GDAL from and now installing on CYGWIN_NT-6.1 2.4.1(0.293/5/3) 2016-01-24 11:26 x86_64 Cygwin as : cd gdal ./configure --prefix=/usr/local/gdal make

But, make gives following errors:

make[1]: Entering directory '/usr/local/gdal-2.0.2/apps' /bin/sh /usr/local/gdal-2.0.2/libtool --mode=compile --tag=CC gcc -I/usr/local/gdal-2.0.2/port -I/usr/local/gdal-2.0.2/gcore -I/usr/local/gdal-2.0.2/alg -I/usr/local/gdal-2.0.2/ogr -I/usr/local/gdal-2.0.2/ogr/ogrsf_frmts -g -O2 -Wall -Wdeclaration-after-statement -I/usr/local/gdal-2.0.2/frmts/vrt -DOGR_ENABLED -I/usr/local/gdal-2.0.2/port -I/usr/include -I/usr/include/cfitsio -DGDAL_COMPILATION -I/usr/include/json-c -I/usr/local/gdal-2.0.2/ogr/ogrsf_frmts/geojson -c -o gdalserver.lo gdalserver.c libtool: compile: gcc -I/usr/local/gdal-2.0.2/port -I/usr/local/gdal-2.0.2/gcore -I/usr/local/gdal-2.0.2/alg -I/usr/local/gdal-2.0.2/ogr -I/usr/local/gdal-2.0.2/ogr/ogrsf_frmts -g -O2 -Wall -Wdeclaration-after-statement -I/usr/local/gdal-2.0.2/frmts/vrt -DOGR_ENABLED -I/usr/local/gdal-2.0.2/port -I/usr/include -I/usr/include/cfitsio -DGDAL_COMPILATION -I/usr/include/json-c -I/usr/local/gdal-2.0.2/ogr/ogrsf_frmts/geojson -c gdalserver.c -DDLL_EXPORT -DPIC -o .libs/gdalserver.o gdalserver.c: In function 'RunServer': gdalserver.c:446:9: error: unknown type name 'fd_set'

fd_set read_fds;

gdalserver.c:451:13: warning: implicit declaration of function 'FD_ZERO' [-Wimplicit-function-declaration]


gdalserver.c:452:13: warning: implicit declaration of function 'FD_SET' [-Wimplicit-function-declaration]

FD_SET(nListenSocket, &read_fds);

gdalserver.c:457:16: warning: implicit declaration of function 'select' [-Wimplicit-function-declaration]

while( select(nListenSocket + 1, &read_fds, NULL, NULL, &tv) != 1 );

../GDALmake.opt:579: recipe for target 'gdalserver.lo' failed make[1]: * [gdalserver.lo] Error 1 make[1]: Leaving directory '/usr/local/gdal-2.0.2/apps' GNUmakefile:67: recipe for target 'app

I will be grateful if someone help me in resolving the issue

Change History (6)

comment:1 by Even Rouault, 6 years ago

I think you may need to add #include <sys/select.h> just after the #else at line 46, similarly to this changeset in trunk :

comment:2 by Even Rouault, 6 years ago

for the sake of clarity : at line 46 of apps/gdalserver.c

comment:3 by Even Rouault, 6 years ago

Can you confirm it fixes your issue ?

comment:4 by jingsam, 6 years ago

Yes, I confirm it works. I want to note that there two other places should be fixed if you want to successful compile gdal on Cygwin. One is line 111 of egif_lib.c, the other is line 137 dgif_lib.c. You should add "#include <io.h>" before each line to reference the function of setmode().

comment:5 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

In 34426:

Compilation fix for gdalserver.c on OpenBSD (backport of r32150, fix #6376)

comment:6 by Even Rouault, 6 years ago

Milestone: 2.0.3
Note: See TracTickets for help on using tickets.