I know that this question has been asked elsewhere, for example here, but I could not find the solution to my specific problem in there.
I have been trying to install the software Ipopt on Linux, followed the instructions in the documentation, but when I run make I obtain the following error:
/obs/xxx/Ipopt-3.12.8/build/ThirdParty/ASL/.libs/libcoinasl.so: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make[3]: *** [ipopt] Error 1
make[3]: Leaving directory `/xxx_home/xxx/Ipopt-3.12.8/build/Ipopt/src/Apps/AmplSolver'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/xxx_home/xxx/Ipopt-3.12.8/build/Ipopt/src/Apps'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/xxx_home/xxx/Ipopt-3.12.8/build/Ipopt'
make: *** [all-recursive] Error 1
According to the posts above, the way around this is to include the -lrt flag, but I do not know whether I should insert it in the make file, in what makefile, and where exactly in the makefile. FYI, here is the Ipopt archive that I have been using, where you can find the Makefile, and here is some information about my linux distribution
$ uname -or
3.2.0-0.bpo.4-amd64 GNU/Linux
$ lsb_release -irc
Distributor ID: Debian
Release: 6.0.10
Codename: squeeze
Thank you.