Unless there is any marked benefit to using the high-resolution timer its probably best to just #define HAVE_CLOCK_GETTIME 1 in config.h after running configure.
I thought I had found a nice way to do that. I updated the
spkg-install file with :
export CPPFLAGS="-DHAVE_CLOCK_GETTIME=0"
just before configure/make/make install.
The result :
[...]
checking for COIN-OR package Msk... not given: No package 'osi-mosek' found
checking for COIN-OR package Spx... not given: No package 'osi-soplex' found
checking for COIN-OR package Xpr... not given: No package 'osi-xpress' found
checking for COIN-OR package ASL... not given: No package 'coinasl' found
checking for cbc-generic default solver... clp
checking for clock_gettime in -lrt... yes
checking for pthread_create in -lpthread... no
configure: error: --enable-cbc-parallel selected, but -lpthreads unavailable
configure: error: /bin/bash './configure' failed for Cbc
real 0m27.033s
user 0m5.628s
sys 0m3.692s
************************************************************************
Error installing package cbc-2.7.5
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the relevant part of the log file
/home/ncohen/.Sage/spkg/logs/cbc-2.7.5.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/ncohen/.Sage/spkg/build/cbc-2.7.5 and type 'make' or whatever is
appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '/home/ncohen/.Sage/spkg/build/cbc-2.7.5' &&
'/home/ncohen/.Sage/sage' -sh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
Error: Failed to install package 'cbc-2.7.5'.
~$
So now we know it uses this to handle threads. I should not touch this
solver again, each time I do I end up wanting to kill people O_O;;;
Nathann
Anyway why isn't the library linked with librt when it is compiled ? I
do not understand why we should do it ourselves when compiling the
Sage code anyway O_O;;;
Nathann
I am trying to compile it with the --ensable-static to see whether it
would solve the problem cheaply.... But God it is long O_O
Nathann
sage: MixedIntegerLinearProgram(solver="Coin")
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/home/ncohen/.Sage/devel/sage-2/<ipython console> in <module>()
/home/ncohen/.Sage/local/lib/python2.7/site-packages/sage/numerical/mip.so
in sage.numerical.mip.MixedIntegerLinearProgram.__init__
(sage/numerical/mip.c:1480)()
/home/ncohen/.Sage/local/lib/python2.7/site-packages/sage/numerical/backends/generic_backend.so
in sage.numerical.backends.generic_backend.get_solver
(sage/numerical/backends/generic_backend.c:6139)()
/home/ncohen/.Sage/local/lib/python2.7/site-packages/sage/numerical/backends/generic_backend.so
in sage.numerical.backends.generic_backend.get_solver
(sage/numerical/backends/generic_backend.c:5857)()
ImportError: /home/ncohen/.Sage/local/lib/libCbc.so.3: undefined
symbol: clock_gettime
I need simething heavy... And sharp....
Nathann