[RPL/2] Autoconf error in finding libm

BERTRAND Joël joel.bertrand at systella.fr
Wed Jan 16 07:14:41 CET 2019


Jonathan Busby a écrit :
> 
> 
> On Mon, Jan 14, 2019 at 11:45 AM BERTRAND Joël
> <joel.bertrand at systella.fr <mailto:joel.bertrand at systella.fr>> wrote:
> 
> 
>             No idea. If you want to debug, please re-run unmodified
>     configure.ac <http://configure.ac>
>     (./autogen.sh will rebuild regular configure script) and check error in
>     config.log.
> 
> 
> I deleted the build directory, untared the source again, and ran
> configure with the "--enable-rplcas" option. I get the same error, which
> can be found in config.log
> 
> "
> configure:7464: checking for main in -lm
> configure:7483: gcc -o conftest -g -O2  -O2 -fno-strict-overflow 
> -pthread conftest.c -lm  -lcurl >&5
> /usr/bin/ld: cannot find -lcurl
> collect2: error: ld returned 1 exit status
> configure:7483: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "rpl"
> | #define PACKAGE_TARNAME "rpl"
> | #define PACKAGE_VERSION "4.1.29"
> | #define PACKAGE_STRING "rpl 4.1.29"
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | #define PACKAGE "rpl"
> | #define VERSION "4.1.29"
> | #define HAVE_INLINE 1
> | /* end confdefs.h.  */
> |
> |
> | int
> | main ()
> | {
> | return main ();
> |   ;
> |   return 0;
> | }
> configure:7492: result: no
> configure:7502: error: Can not find libm !
> "
>  
> The " usr/bin/ld: cannot find -lcurl" is strange since I have curl and
> libcurl installed. I have a feeling that the failure to link / find
> libcurl is the problem.

	Libcurl is mandatory to build RPL/CAS. I could modify configure.ac to
check if curl is available on build system.

> EDIT 1 : Indeed, for some reason, the GNU autotools link against libcurl
> ( in the autoconf generated " gcc -o conftest -g -O2  -O2
> -fno-strict-overflow  -pthread conftest.c -lm  -lcurl >&5 " ) and after
> I installed the development files for libcurl, the build "succeeded", in
> a way.
> 
> After, starting the build again, when the motif source was being built,
> I received the build error :
> 
> "
> Making install in Mrm
> make[4]: Entering directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/lib/Mrm'
> make  install-am
> make[5]: Entering directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/lib/Mrm'
> make[6]: Entering directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/lib/Mrm'
>  /bin/mkdir -p
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/install/lib'
>  /bin/bash ../../libtool   --mode=install /usr/bin/install -c  
> libMrm.la '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/install/lib'
> libtool:   error: error: cannot install 'libMrm.la' to a directory not
> ending in /usr/lib
> Makefile:435: recipe for target 'install-libLTLIBRARIES' failed
> make[6]: *** [install-libLTLIBRARIES] Error 1
> make[6]: Leaving directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/lib/Mrm'
> Makefile:656: recipe for target 'install-am' failed
> make[5]: *** [install-am] Error 2
> make[5]: Leaving directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/lib/Mrm'
> Makefile:650: recipe for target 'install' failed
> make[4]: *** [install] Error 2
> make[4]: Leaving directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/lib/Mrm'
> Makefile:396: recipe for target 'install-recursive' failed
> make[3]: *** [install-recursive] Error 1
> make[3]: Leaving directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8/lib'
> Makefile:453: recipe for target 'install-recursive' failed
> make[2]: *** [install-recursive] Error 1
> make[2]: Leaving directory
> '/home/jdb2/src/rpl2/rpl-4.1.29/tools/motif-2.3.8'
> Makefile:1215: recipe for target 'tools/motif-2.3.8/install/lib/libXm.a'
> failed
> make[1]: *** [tools/motif-2.3.8/install/lib/libXm.a] Error 2
> make[1]: Leaving directory '/home/jdb2/src/rpl2/rpl-4.1.29'
> Makefile:964: recipe for target 'all' failed
> make: *** [all] Error 2
> "
> 
> After I typed "make" again, this time the build completed successfully. :)

	configure process is very complex as ./tools and ./rplcas directories
contain all libraries required for basic RPL/2 (./tools) and RPL/CAS
(./rplcas). Some libraries are often available on modern Unix systems
but RPL/2 can be built on non Unix systems without these basic libraries
(OpenSSL, ncurses...). They don't use autoconf nor automake. Thus,
dependencies are not checked by autoconf/automake but only by Makefile's
and, in cas of build error, you should run make purge and configure again.

> The problem I'm having now is that basic tests are failing. For example,
> if I untar tests/tests.tar.gz and run "rpl arith.rpl" I get the error :

	test directory is only for me ;-)
> "
> +++Error : Undefined implicit name [92178]
> "

	arith.rpl has to abort with this error. If you want to run arith.rpl,
you have to add "all" implicit after first '<<'. But there is a bug,
arith.rpl aborts with "access violation" error. I'll fix this bug as
soon as possible.

> Also, when I run "rpl --help" I get an error after the license text that
> reads :
> 
> "
> +++Error : Any executable definition
> "

	What do you expect ? If you want to obtain a prompt, you have to start
RPL/2 with rpl -i. If not, you should add a script name (or a shebang in
script like !#/usr/local/bin/rpl -csp

	Best regards,

	JKB


More information about the RPL2 mailing list