<div dir="ltr"><div dir="ltr"><div dir="ltr">Seems my last reply was too large. Sorry about that.<br><div><br><div class="gmail_quote"><div dir="ltr">---------- Forwarded message ---------<br>From: <b class="gmail_sendername" dir="auto">Jonathan Busby</b> <span dir="ltr"><<a href="mailto:jonathanbusby@gmail.com">jonathanbusby@gmail.com</a>></span><br>Date: Wed, Jan 9, 2019 at 3:07 PM<br>Subject: Re: [RPL/2] Build of 4.1.29 fails on Linux Mint 19 Cinnamon 64-bit<br>To: RPL/2 mailing list <<a href="mailto:rpl2@systella.fr">rpl2@systella.fr</a>><br></div><br><br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 9, 2019 at 2:22 AM BERTRAND Joël <<a href="mailto:joel.bertrand@systella.fr" target="_blank">joel.bertrand@systella.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
        Please not send output of make -d. This is not a makefile's bug but a <br>
trouble with your system.<br></blockquote><div><br></div><div>Well, if it's a problem with my system, then it's a problem with all the latest versions of Linux Mint 19 Cinnamon 64-bit. I've tested the code on another Linux Mint install and I get the same error.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
        Can you check that wmluiltok.c is not empty ? wmluiltok.c is created by <br>
flex.<br></blockquote><div><br></div><div>wmluiltok.c is not empty and contains a proper Flex scanner. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
        I have found that flex is faulty on several Linux system. If <br>
wmluiltok.c is not empty, you have to rebuild flex with <br>
-ffat-lto-objects option, allowing to use lto also on motif.<br></blockquote><div><br></div><div>I guess I'll have to do what you suggest above. Just to make sure I understand, I need to build the latest version of Flex from the source and make sure to include the "-ffat-lto-objects" option to GCC? When you say "allowing to use lto also on motif" what do you mean exactly? Do I have to compile Motif from the sources in the archive and supply the same option to GCC as you suggested above?</div><div><br></div><div>EDIT : After I typed the above, I compiled GNU Flex with the -ffat-lto-objects by modifying its <a href="http://configure.ac" target="_blank">configure.ac</a> to get it to supply the option to GCC and then I tried compiling the Motif source that comes packaged with RPL/2 ( I also had to modify <a href="http://configure.ac" target="_blank">configure.ac</a> ). Although your suggestions seem to have cleared up the previous problem with wmluiltok.c, I now get a new error :</div><br></div><div class="gmail_quote"><a href="http://www.mediafire.com/file/v7wwlc8tuen6bt2/make-log-error-paste-1.asc/file">http://www.mediafire.com/file/v7wwlc8tuen6bt2/make-log-error-paste-1.asc/file</a><br><div><br></div><div>I resolved the above just by issuing an "apt update && apt install libfl2" command and rebuilding the source.</div><div><br></div><div>EDIT 2 : Well, this time all the X Windows and Motif related code built fine, but then the build failed with a new error :</div><div><br></div><div><a href="http://www.mediafire.com/file/hhx46jxfh3l39je/make-log-error-2.asc/file">http://www.mediafire.com/file/hhx46jxfh3l39je/make-log-error-2.asc/file</a><br></div></div><div class="gmail_quote"><br><div>It looks like the main RPL/2 configure script is not calling the zlib configure script. When I manually corrected that, I got a new error when trying to compile zlib :</div><div><br></div><div>"</div><div>cc -shared -march=core2 -O2 -pipe -ffat-lto-objects -D_LARGEFILE64_SOURCE=1 -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc <br>/usr/bin/ld: deflate.lo: relocation R_X86_64_PC32 against symbol `_length_code' can not be used when making a shared object; recompile with -fPIC<br>/usr/bin/ld: final link failed: Bad value<br>collect2: error: ld returned 1 exit status<br>Makefile:282: recipe for target 'libz.so.1.2.11' failed<br>make: *** [libz.so.1.2.11] Error 1<br>"</div><div><br></div><div>I added "-fPIC" via the usual environment variables but that didn't fix the build failure. I next modified the zlib Makefile.in and that fixed the problem. Then I restarted the RPL/2 build and it finally built! :D After running "sudo checkinstall"  and installing the package I was able to "run" "rpl -i" but it exited with the error : <br></div><div><br></div><div>"mint@mint:~$ rpl -i<br>+++RPL/2 (R) version 4.1.29 (Wednesday 01/09/19, 14:41:11 CST)<br>+++Copyright (C) 1989 to 2017, 2018 BERTRAND Joel<br><br>+++This is a free software with absolutely no warranty.<br>+++For details, type 'warranty'.<br><br>+++Fatal : Hash code mismatch<br>Function md5(/usr/local/bin/rpliconv)<br>Computed hash code : 10a03ae9906b128e4e0acd855f3856f4<br>Expected hash code : 9a1e8ca96b5eab8831a59d31f11de7f8<br>+++Fatal : Error in compilation"<br></div><div><br></div><div>I then removed the Debian package and I used the old school "sudo make install" and guess what, it now works! :D <br></div><div><br></div><div>"mint@mint:~$ rpl -i<br>+++RPL/2 (R) version 4.1.29 (Wednesday 01/09/19, 14:58:27 CST)<br>+++Copyright (C) 1989 to 2017, 2018 BERTRAND Joel<br><br>+++This is a free software with absolutely no warranty.<br>+++For details, type 'warranty'.<br><br>RPL/2> 1<br><br>1: 1<br>RPL/2> dup<br><br>2: 1<br>1: 1<br>RPL/2> +<br><br>1: 2<br>RPL/2></div><div>"</div><div><br></div><div>:)<br></div><div><br></div><div><br></div>Thanks and regards,<div><br></div><div>Jonathan</div></div></div></div></div></div></div></div>
</div></div></div></div></div>