Re: Error compiling to C
- Posted by lib9 1 day ago
- 74 views
Since no one is maintaining Eu 3 anymore for many years, it would make much more sense to use Eu 4, which will compile the program correctly. See my other post in "Errors running script".
I tried to compile to C using Eu4, but it also failed.
- #
$ ../euphoria-4.1.0-Linux-x64/bin/euc eratosthenes.eu
Build directory: build-510002/
Translating code, pass: 1 2 3 generating
Compiling with GCC
Compiling 14% init-.c
Compiling 57% eratosthenes.c
Compiling 85% main-.c
Linking 100% ../eratosthenes
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_machine.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
Unable to link /home/myuser/Sync/prog/euphoria/benchmark/eratosthenes
Status: 1 Command: gcc -o /home/myuser/Sync/prog/euphoria/benchmark/eratosthenes init-.o eratosthenes.o main-.o /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a -m64 -ldl -lm -lpthread

