Build fail on 64 bit Ubuntu

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Build fail on 64 bit Ubuntu

emacstheviking
Hi,

The repo version is 1.3 so I decided to download and build from source as I have done many times on OSX... however, I get this error at the end of the process, showing one line only for brevity:

/usr/bin/ld: /home/sean/Downloads/gprolog-code/src/BipsPl/all_pl_bips.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC

I tried re-running configure as:

    $ ./configure CFLAGS=-fPIC but it did not apear in the build

So I edited the CCFLAGS line in BipsPl/Makefile to be

CFLAGS               = -O3 -fomit-frame-pointer -fPIC

And rebuilt... this time the -fPIC option was present in the calls to gplc however it still made no difference. I also manually entered a value of -fPIC for GPLCFLAGS as well in the same makefile. Again, it showed in the build but the link error persists?

How do I solve this please anybody? I am going to install the repo version for now but I don't like not having the latest version. Presumably the repo version is 64 bit but I have not looked yet.

Thanks.
Sean.



_______________________________________________
Users-prolog mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/users-prolog
Reply | Threaded
Open this post in threaded view
|

Re: Build fail on 64 bit Ubuntu

Salvador Pinto Abreu
Hi Sean,

If you grab the latest on Ubuntu, it should work: https://launchpad.net/ubuntu/+source/gprolog

I think this is about pie (position-independent executable), which appears to default to on in recent gcc releases; you can also recompile adding -no-pie to CFLAGS.

Best
-salvador

> On 07 Jan 2017, at 22h16, emacstheviking <[hidden email]> wrote:
>
> Hi,
>
> The repo version is 1.3 so I decided to download and build from source as I have done many times on OSX... however, I get this error at the end of the process, showing one line only for brevity:
>
> /usr/bin/ld: /home/sean/Downloads/gprolog-code/src/BipsPl/all_pl_bips.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
>
> I tried re-running configure as:
>
>     $ ./configure CFLAGS=-fPIC but it did not apear in the build
>
> So I edited the CCFLAGS line in BipsPl/Makefile to be
>
> CFLAGS               = -O3 -fomit-frame-pointer -fPIC
>
> And rebuilt... this time the -fPIC option was present in the calls to gplc however it still made no difference. I also manually entered a value of -fPIC for GPLCFLAGS as well in the same makefile. Again, it showed in the build but the link error persists?
>
> How do I solve this please anybody? I am going to install the repo version for now but I don't like not having the latest version. Presumably the repo version is 64 bit but I have not looked yet.
>
> Thanks.
> Sean.
>
>
> _______________________________________________
> Users-prolog mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/users-prolog

_______________________________________________
Users-prolog mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/users-prolog

signature.asc (817 bytes) Download Attachment