cinohub / libkml

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

libkml does not compile with gcc 4.7 #179

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ./configure
2. make

What is the expected output? What do you see instead?

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  -fPIC -DPIC -o .libs/file_posix.o
file_posix.cc: In static member function 'static bool 
kmlbase::File::Delete(const string&)':
file_posix.cc:56:33: error: 'unlink' was not declared in this scope
file_posix.cc: In static member function 'static bool 
kmlbase::File::CreateNewTempFile(std::string*)':
file_posix.cc:68:11: error: 'close' was not declared in this scope
file_posix.cc: In static member function 'static bool 
kmlbase::File::Delete(const string&)':
file_posix.cc:57:1: error: control reaches end of non-void function 
[-Werror=return-type]

What version of the product are you using? On what operating system?

trunk revision 864
Did you run the unit test suite that comes with the project? Did all tests pass?

no 
Please provide any additional information below.

see also : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667247

Original issue reported on code.google.com by manuel.g...@gmail.com on 15 May 2012 at 9:08

GoogleCodeExporter commented 8 years ago
a patch seems available here : 
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667247

Original comment by manuel.g...@gmail.com on 15 May 2012 at 9:08

GoogleCodeExporter commented 8 years ago
I haven't been able to reproduce this myself (no easy access to gcc 4.7) but 
I'm going to apply the suggested fix which appears to just be including 
unistd.h in src/kml/base/file_posix.cc. 

Original comment by fwarmerdam@gmail.com on 29 Jan 2013 at 10:38