Just notice that <unistd.h> is not included in HamaPipes.cc. Adding unistd.h to HamaPipes.cc solves the problem, but not sure if this is the right way to fix it.
Environment: debian 3.10-2-rt-686-pae cmake version 2.8.11.2 gcc/ g++ version 4.7.3 make version 3.81 On 8 September 2013 17:39, Martin Illecker <[email protected]> wrote: > Do you have *cmake* installed? > > > 2013/9/8 Chia-Hung Lin <[email protected]> > >> When compiling trunk, following errors are thrown. How can I fix this >> problem? >> >> Environment: debian, 3.10-2-rt-686-pae, g++ 4.7.3, make 3.8.1 >> >> Thanks >> >> ... >> [exec] /path/to/trunk/c++/src/main/native/pipes/impl/HamaPipes.cc: >> In function ‘void* HamaPipes::ping(void*)’: >> [exec] >> /path/to/trunk/c++/src/main/native/pipes/impl/HamaPipes.cc:1148:16: >> error: ‘sleep’ was not declared in this scope >> [exec] >> /path/to/trunk/c++/src/main/native/pipes/impl/HamaPipes.cc:1167:30: >> error: ‘close’ was not declared in this scope >> [exec] /path/to/trunk/c++/src/main/native/pipes/impl/HamaPipes.cc: >> In function ‘bool HamaPipes::runTask(const HamaPipes::Factory&)’: >> [exec] >> /path/to/trunk/c++/src/main/native/pipes/impl/HamaPipes.cc:1280:28: >> error: ‘close’ was not declared in this scope >> [exec] make[2]: *** >> [CMakeFiles/hamapipes.dir/main/native/pipes/impl/HamaPipes.cc.o] Error >> 1 >> [exec] make[1]: *** [CMakeFiles/hamapipes.dir/all] Error 2 >> [exec] make: *** [all] Error 2 >> [exec] make[2]: Leaving directory `/path/to/trunk/c++/target/native' >> [exec] make[1]: Leaving directory `/path/to/trunk/c++/target/native' >> ... >> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to >> execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run >> (make) on project hama-pipes: An Ant BuildException has occured: exec >> returned: 2 >>
