Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failing to install omentpp 4.1

I am trying to install omnetpp 4.1 (can't install the new version). Anyway, running ./configure reports no errors or warnings, but when I run make I get the following:

make MODE=release
make[1]: Entering directory `/home/yotam/omnetpp-4.1'
***** Configuration: MODE=release, TOOLCHAIN_NAME=gcc, LIB_SUFFIX=.so ****
===== Checking environment =====
mkdir -p /home/yotam/omnetpp-4.1/bin
===== Compiling utils ====
cd /home/yotam/omnetpp-4.1/src/utils && make
make[2]: Entering directory `/home/yotam/omnetpp-4.1/src/utils'
g++ abspath.cc -o /home/yotam/omnetpp-4.1/out/gcc-release/src/utils/abspath
abspath.cc: In function ‘std::string toAbsolutePath(const char*)’:
abspath.cc:62:38: error: ‘getcwd’ was not declared in this scope
make[2]: *** [/home/yotam/omnetpp-4.1/out/gcc-release/src/utils/abspath] Error 1
make[2]: Leaving directory `/home/yotam/omnetpp-4.1/src/utils'
make[1]: *** [utils] Error 2
make[1]: Leaving directory `/home/yotam/omnetpp-4.1'
make: *** [allmodes] Error 2

I am running ununtu 12.10 if it matters. Seems to be code errors, right?

Any suggestions? Thanks

like image 751
Yotam Avatar asked Dec 09 '22 19:12

Yotam


1 Answers

Edit the file src/utils/abspath.cc and manually add the following:

#include <unistd.h>

Save and compile again. Problem solved.

like image 113
Doron Ben Elazar Avatar answered Jan 12 '23 13:01

Doron Ben Elazar