dreamstreat / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

Unable to build in CygWin environment #176

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install up-to-date CygWin
2. download libkml-1.2.0.tat.gz
3. tar -zxf likml-1.2.0.tar.gz
4. cd libkml-1.2.0
5. ./configure --disable-swig --disable-python --disable-java
6. make

What is the expected output? What do you see instead?
 I expect the library to make.
 This is what happens (note: this is the 2nd time I've run make - to produce less output):
----------------------
$ make
make  all-recursive
make[1]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0'
Making all in third_party
make[2]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/third_party'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/third_party'
Making all in src
make[2]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src'
Making all in kml
make[3]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
Making all in .
make[4]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
Making all in base
make[4]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml/base'
/bin/sh ../../../libtool --tag=CXX    --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../..   -I../../../src  -I../../../third_party/boost_1_34_1  
-I../../../third_party/googletest-r108/include  
-I../../../third_party/uriparser-0.7.5/include  
-I../../../third_party/zlib-1.2.3/contrib  -Wall -Wextra -Wno-unused-parameter 
-Werror -ansi -pedantic -fno-rtti -g -O2 -MT date_time.lo -MD -MP -MF 
.deps/date_time.Tpo -c -o date_time.lo date_time.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src 
-I../../../third_party/boost_1_34_1 
-I../../../third_party/googletest-r108/include 
-I../../../third_party/uriparser-0.7.5/include 
-I../../../third_party/zlib-1.2.3/contrib -Wall -Wextra -Wno-unused-parameter 
-Werror -ansi -pedantic -fno-rtti -g -O2 -MT date_time.lo -MD -MP -MF 
.deps/date_time.Tpo -c date_time.cc  -DDLL_EXPORT -DPIC -o .libs/date_time.o
date_time.cc: In member function ‘bool 
kmlbase::DateTime::ParseXsdDateTime(const std::string&)’:
date_time.cc:93:68: error: ‘strptime’ was not declared in this scope
cc1plus: warnings being treated as errors
date_time.cc:94:1: error: control reaches end of non-void function
Makefile:821: recipe for target `date_time.lo' failed
make[4]: *** [date_time.lo] Error 1
make[4]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml/base'
Makefile:271: recipe for target `all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
Makefile:245: recipe for target `all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src'
Makefile:288: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0'
Makefile:218: recipe for target `all' failed
make: *** [all] Error 2
----------------------
What version of the product are you using? On what operating system?
 I am running Ms Windows 7 x64. 
 CygWin (CYGWIN_NT-6.1-WOW64  1.7.10(0.259/5/3) 2012-02-05 12:36 i686 Cygwin). 
 gcc/g++ 4.5.3
 GNU Make 3.82.90
 LibKml-1.2.0

Did you run the unit test suite that comes with the project? Did all tests pass?
 Unable to get that far.

Please provide any additional information below.
 I think I've covered all information.

Original issue reported on code.google.com by martin.b...@bbsr.co.uk on 8 Feb 2012 at 3:30

GoogleCodeExporter commented 8 years ago
Update: Once I commented out the strptime function (which I noticed had a 
comment regarding 'fixing' it for win32) and the actual call in date_time.cc 
(bool DateTime::ParseXsdDateTime(const string& xsd_date_time)) I simply 
returned false. I then ran into the following issue with mkstemp:
------------------------------------
$ make
make  all-recursive
make[1]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0'
Making all in third_party
make[2]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/third_party'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/third_party'
Making all in src
make[2]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src'
Making all in kml
make[3]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
Making all in .
make[4]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
Making all in base
make[4]: Entering directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml/base'
/bin/sh ../../../libtool --tag=CXX    --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I../../..   -I../../../src  -I../../../third_party/boost_1_34_1  
-I../../../third_party/googletest-r108/include  
-I../../../third_party/uriparser-0.7.5/include  
-I../../../third_party/zlib-1.2.3/contrib  -Wall -Wextra -Wno-unused-parameter 
-Werror -ansi -pedantic -fno-rtti -g -O2 -MT file_posix.lo -MD -MP -MF 
.deps/file_posix.Tpo -c -o file_posix.lo file_posix.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src 
-I../../../third_party/boost_1_34_1 
-I../../../third_party/googletest-r108/include 
-I../../../third_party/uriparser-0.7.5/include 
-I../../../third_party/zlib-1.2.3/contrib -Wall -Wextra -Wno-unused-parameter 
-Werror -ansi -pedantic -fno-rtti -g -O2 -MT file_posix.lo -MD -MP -MF 
.deps/file_posix.Tpo -c file_posix.cc  -DDLL_EXPORT -DPIC -o .libs/file_posix.o
file_posix.cc: In static member function ‘static bool 
kmlbase::File::CreateNewTempFile(std::string*)’:
file_posix.cc:64:29: error: ‘mkstemp’ was not declared in this scope
Makefile:821: recipe for target `file_posix.lo' failed
make[4]: *** [file_posix.lo] Error 1
make[4]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml/base'
Makefile:271: recipe for target `all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src/kml'
Makefile:245: recipe for target `all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0/src'
Makefile:288: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/cygdrive/c/Users/martin.beynon/Downloads/libkml-1.2.0'
Makefile:218: recipe for target `all' failed
make: *** [all] Error 2
------------------------------------

I searched the headers for mkstemp and it doesn't appear to exist anywhere in 
CygWin.

Original comment by martin.b...@bbsr.co.uk on 8 Feb 2012 at 4:26