exaloop / codon

A high-performance, zero-overhead, extensible Python compiler using LLVM
https://docs.exaloop.io/codon
Other
15.17k stars 520 forks source link

gcc: error: unrecognized command line option ‘-no-pie’ #289

Closed darklord1807 closed 1 week ago

darklord1807 commented 1 year ago

Hello,

Getting error:

gcc: error: unrecognized command line option ‘-no-pie’

Using : codon build -release codon.py

Any advise

arshajii commented 1 year ago

Hi @darklord1807 -- I believe this is due to an old gcc version. Which version of gcc do you have (i.e. gcc --version)? Is it possible to upgrade it?

darklord1807 commented 1 year ago

[root@ec-mt-mu-rb-bigdata-rpa-prod-1 ~]# gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I am on Centos 7

I did a yum update but its saying that it is the latest version.

darklord1807 commented 1 year ago

Which version you support?

inumanag commented 1 week ago

You will need gcc 6 or later. You can also just copy/paste the final compiler command (run CODON_DEBUG=lt codon ... to see it) and remove that flag (or replace it with -fPIE that should work with gcc 5 and earlier) to link the executable.