[RPL/2] Autoconf error in finding libm

BERTRAND Joël joel.bertrand at systella.fr
Mon Jan 14 18:43:18 CET 2019


Jonathan Busby a écrit :
> I have been racking my brain over what is causing this problem, but so
> far, I haven't figured out what the core cause is. When I pass
> "--enable-rplcas" to configure in 4.1.29 the configure script fails with
> "configure: error: Can not find libm !" . If I change configure.ac
> <http://configure.ac> to use "AC_SEARCH_LIBS (exp, m , ,
> AC_MSG_ERROR([Can not find libm !]))" and I comment out the AC_CHECK_LIB
> line, then the configure script finds libm, but, later in the configure
> script, when the configure scripts for some of the tools are being
> executed, I get the same error. After  examining the autotools scripts,
> it seems that there is an error in the call to AC_CHECK_LIB for libm as
> main is not an exported function of libm, but, substituting something
> like "exp" still doesn't clear up the problem. Just to make sure that my
> system configuration wasn't the cause, I made a tiny test configure.ac
> <http://configure.ac> and ran autoconf :
> 
> "
> checking for gcc... gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking for exp  in -lm... yes
> configure: creating ./config.status
> "
> 
> The test configure.ac <http://configure.ac> is just :
> 
> "
> AC_INIT([test],[0.01])
> AC_CHECK_LIB(m, exp , , AC_MSG_ERROR([Can not find libm !]))
> AC_OUTPUT
> "
> 
> As you can see it finds libm, but, if I tell it to look for main in
> libm, it fails.
> 
> Do you know what the problem might be?

	No idea. If you want to debug, please re-run unmodified configure.ac
(./autogen.sh will rebuild regular configure script) and check error in
config.log.

	Regards,

	JKB


More information about the RPL2 mailing list