[RPL/2] Autoconf error in finding libm

Jonathan Busby jonathanbusby at gmail.com
Wed Jan 16 17:51:48 CET 2019


On Wed, Jan 16, 2019 at 12:15 AM BERTRAND Joël <joel.bertrand at systella.fr>
wrote:

> 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.
>

The above would be a good idea as I didn't know that the problem with
finding libm was the missing libcurl dev files. There should be a separate
test for libcurl.


> > 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.
>

Well, I can't really run "make purge" as, to get the build to succeed on an
Ubuntu / Linux Mint based system, I have to edit the GNU autotools scripts
and definition files so that Motif is built with "-ffat-lto-objects" and
zlib is built with "-fPIC". If I run "make purge" then these changes will
be lost and the build will fail.


>
> > 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 ;-)
>

Oh, heh ;)


> > "
> > +++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.
>
>
I tried placing an "all" as you described ( "ARITH all << ..." ) but I now
just receive a "+++Fatal : Invalid definition name [20637]" error. I don't
know if I'm doing something stupid or not.

Thanks :)

> 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.


Well, RPL/2's command line behavior needs to be modified to correspond with
common Unix command line conventions. That is, if I type "cp --version", I
don't receive an error. Running "rpl  -v" should behave the same way. In
addition, I had no idea what the error message was indicating -- it should
be changed to something such as "Error : No RPL/2 program found" or
something like that. If one just runs "rpl" then the command line syntax is
indicated by "rpl [-options] [program]", which, in Unix based systems,
means that both "options" and "program" are optional. I think it should be
changed to something like
"
Usage : rpl [OPTIONS] FILE
With no FILE, or when FILE is -, read standard input
"

But, all the above is just my opinion, and you'd probably have to do some
recoding and it could break compatibility... I just think that the error
messages are not very understandable...

If not, you should add a script name (or a shebang in
> script like !#/usr/local/bin/rpl -csp
>

Thanks for the tip! :)


>         Best regards,
>
>         JKB
> _______________________________________________
> RPL2 mailing list
> RPL2 at rayleigh.systella.fr
> https://www.systella.fr/cgi-bin/mailman/listinfo/rpl2
> http://www.rpl2.net
>

Thanks and regards,

Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.systella.fr/pipermail/rpl2/attachments/20190116/d1a69bc5/attachment-0001.html>


More information about the RPL2 mailing list