Re: [Monetdb-developers] [Monetdb-checkins] MonetDB5/src/modules/atoms Makefile.ag, 1.29, 1.30
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms In directory sc8-pr-cvs16:/tmp/cvs-serv28157
Modified Files: Makefile.ag Log Message: color.mx uses floor, which (at least on my machine -- for as long as it's running) needs -lm during linking.
Have no libm on W2K. Other modules abuse LDFLAGS = -lm and this seems to be ignored be the Makefile.msc generator - so LDFLAGS works somehow as a workaround. Whats your policy in this regard? Steffen
On 25-04-2007 11:26:29 +0200, Steffen Goeldner wrote:
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms In directory sc8-pr-cvs16:/tmp/cvs-serv28157
Modified Files: Makefile.ag Log Message: color.mx uses floor, which (at least on my machine -- for as long as it's running) needs -lm during linking.
Have no libm on W2K. Other modules abuse LDFLAGS = -lm and this seems to be ignored be the Makefile.msc generator - so LDFLAGS works somehow as a workaround. Whats your policy in this regard?
I don't have a policy here. I discussed this with Sjoerd, first proposing that configure should set -lm after a configure check. Because Sjoerd didn't know a platform that this doesn't work on, we agreed on just hacking it in (it seems to be done like that in other places). However, judging from your problem, it better is dealt with by some autotools thing, as my primary intuition said. Feel free to "fix" it, if you know how.
Steffen Goeldner wrote:
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms In directory sc8-pr-cvs16:/tmp/cvs-serv28157
Modified Files: Makefile.ag Log Message: color.mx uses floor, which (at least on my machine -- for as long as it's running) needs -lm during linking.
Have no libm on W2K. Other modules abuse LDFLAGS = -lm and this seems to be ignored be the Makefile.msc generator - so LDFLAGS works somehow as a workaround. Whats your policy in this regard?
We should probably do something similar to what we do for the socket libraries. That is, introduce a new make variable MATH_LIBS that is set by configure to contain -lm when needed, and on Windows it should be set to empty in rules.msc. -- Sjoerd Mullender
Sjoerd Mullender wrote:
Steffen Goeldner wrote:
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms In directory sc8-pr-cvs16:/tmp/cvs-serv28157
Modified Files: Makefile.ag Log Message: color.mx uses floor, which (at least on my machine -- for as long as it's running) needs -lm during linking.
Have no libm on W2K. Other modules abuse LDFLAGS = -lm and this seems to be ignored be the Makefile.msc generator - so LDFLAGS works somehow as a workaround. Whats your policy in this regard?
We should probably do something similar to what we do for the socket libraries. That is, introduce a new make variable MATH_LIBS that is set by configure to contain -lm when needed, and on Windows it should be set to empty in rules.msc.
Sounds good! Here my proposed changes: 1. I'll add to buildtools/conf/MonetDB.m4 MATH_LIBS="" AC_CHECK_LIB(m, main, [ MATH_LIBS="-lm" ] ) AC_SUBST(MATH_LIBS) 2. I'll look after -lm in MonetDB4/src/modules/calibrator/Makefile.ag: LDFLAGS = -lm MonetDB4/src/modules/calibrator/Makefile.ag: LIBS = -lm MonetDB4/src/modules/contrib/Makefile.ag: LDFLAGS = -lm MonetDB4/src/modules/contrib/Makefile.ag: LDFLAGS = -lm MonetDB4/src/modules/mnetcdf/Makefile.ag: LDFLAGS = -lm $(NETCDF_LIBS) MonetDB4/src/modules/plain/Makefile.ag: LDFLAGS = -lm MonetDB5/src/modules/atoms/Makefile.ag: LIBS = $(MONETDB_LIBS) -lbat -lstream -lm \ MonetDB5/src/modules/kernel/Makefile.ag: LDFLAGS = -lm MonetDB5/src/modules/mal/Makefile.ag: LIBS = ../../mal/libmal $(MONETDB_LIBS) -lbat -lstream -lm \ MonetDB5/src/optimizer/Makefile.ag: LDFLAGS = -lm and substitute it with LIBS = ... $(MATH_LIBS) 3. I'll add to MonetDB/conf/rules.msc: MATH_LIBS = OK? Steffen
Steffen Goeldner wrote:
Sjoerd Mullender wrote:
Steffen Goeldner wrote:
Fabian wrote:
Update of /cvsroot/monetdb/MonetDB5/src/modules/atoms In directory sc8-pr-cvs16:/tmp/cvs-serv28157
Modified Files: Makefile.ag Log Message: color.mx uses floor, which (at least on my machine -- for as long as it's running) needs -lm during linking.
Have no libm on W2K. Other modules abuse LDFLAGS = -lm and this seems to be ignored be the Makefile.msc generator - so LDFLAGS works somehow as a workaround. Whats your policy in this regard?
We should probably do something similar to what we do for the socket libraries. That is, introduce a new make variable MATH_LIBS that is set by configure to contain -lm when needed, and on Windows it should be set to empty in rules.msc.
Sounds good! Here my proposed changes:
1. I'll add to buildtools/conf/MonetDB.m4
MATH_LIBS="" AC_CHECK_LIB(m, main, [ MATH_LIBS="-lm" ] ) AC_SUBST(MATH_LIBS)
2. I'll look after -lm in
MonetDB4/src/modules/calibrator/Makefile.ag: LDFLAGS = -lm MonetDB4/src/modules/calibrator/Makefile.ag: LIBS = -lm MonetDB4/src/modules/contrib/Makefile.ag: LDFLAGS = -lm MonetDB4/src/modules/contrib/Makefile.ag: LDFLAGS = -lm MonetDB4/src/modules/mnetcdf/Makefile.ag: LDFLAGS = -lm $(NETCDF_LIBS) MonetDB4/src/modules/plain/Makefile.ag: LDFLAGS = -lm MonetDB5/src/modules/atoms/Makefile.ag: LIBS = $(MONETDB_LIBS) -lbat -lstream -lm \ MonetDB5/src/modules/kernel/Makefile.ag: LDFLAGS = -lm MonetDB5/src/modules/mal/Makefile.ag: LIBS = ../../mal/libmal $(MONETDB_LIBS) -lbat -lstream -lm \ MonetDB5/src/optimizer/Makefile.ag: LDFLAGS = -lm
and substitute it with LIBS = ... $(MATH_LIBS)
3. I'll add to MonetDB/conf/rules.msc:
MATH_LIBS =
OK?
Sounds good. Of course, libraries should not be added to LDFLAGS since that comes too early in the commandline (before the object files). I've been bitten by this in the past. So make sure that you use LIBS or something like that. Only the function that you use to check the library is a bit weird, so maybe use AC_CHECK_LIB(m, sqrt, [ MATH_LIBS=-lm ]) -- Sjoerd Mullender
participants (3)
-
Fabian Groffen
-
Sjoerd Mullender
-
Steffen Goeldner