1. Error compiling to C
- Posted by lib9 3 weeks ago
- 398 views
Hi,
I'm running version 3.1.1 on Linux 64 bit.
$ ecu eratosthenes2.eu
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
3 .c files were created.
To build your executable file, type: ./emake
$ ls
emake
eratosthenes2.c
eratosthenes2.eu
init-.c
main-.c
main-.h
$ ./emake
compiling with GNU C
main-.c
main-.c: In function main:
main-.c:35:5: error: implicit declaration of function DeRef1; did you mean DeRef5? [-Wimplicit-function-declaration]
35 | DeRef1(_1t0);
| ^~~~~~
| DeRef5
eratosthenes2.c
init-.c
linking
/usr/bin/ld: cannot find main-.o: No such file or directory
collect2: error: ld returned 1 exit status
you can now execute: ./eratosthenes2
$ ls ./eratosthenes2
ls: cannot access './eratosthenes2': No such file or directory
How can I solve this?
2. Re: Error compiling to C
- Posted by Icy_Viking 3 weeks ago
- 344 views
Is there a reason why are you using version 3.1.1? Version 4.1.0 Beta 2 is out and it has many useful features and quality of life improvements. I have used it for years and I can attest that it is very stable, even if in beta.
3. Re: Error compiling to C
- Posted by irv 3 weeks ago
- 316 views
The first error was from ld.so, not Euphoria.
libgtk3-nocsd.so.0 was a hack added to prevent the GTK developers from messing with the native look and feel of the window managers on various platforms. It's no longer included in modern linux distros.
You could look for lines in your .bashrc, bash/.bashrc, or .bash_profile files which reference libgtk3-nocds.so, and comment them out. Why they would exist in your bash files is a different question.
However, that's still no guarantee that your Eu 3.1 program will compile on 64-bit machines. See my other post, where I tried to do exactly that. Perhaps with some compile flags, it will work, but that's beyond my pay grade.
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".
4. Re: Error compiling to C
- Posted by lib9 1 day ago
- 85 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
5. Re: Error compiling to C
- Posted by jmduro 1 day ago
- 66 views
I get the same error with EU 4.1 but it compiles with eu.cfg configured for EU 4.2. I don't know what kind of mix it does, calling EU 4.1's euc while having eu.cfg set to EU 4.2, but it works!
$ euc eratosthenes.eu Build directory: build-558766/ 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 $ eui --version Euphoria Interpreter v4.1.0 development 64-bit Linux, Using System Memory Revision Date: 2015-02-02 14:18:53, Id: 5861:57179171dbed $ cat eu.cfg [all] -d E64 -eudir /usr/local/euphoria-4.2.0-Linux-x64 -i /usr/local/euphoria-4.2.0-Linux-x64/include [translate] -arch ix86_64 -gcc -con -com /usr/local/euphoria-4.2.0-Linux-x64 -lib-pic /usr/local/euphoria-4.2.0-Linux-x64/bin/euso.a -lib /usr/local/euphoria-4.2.0-Linux-x64/bin/eu.a [bind] -eub /usr/local/euphoria-4.2.0-Linux-x64/bin/eub
Jean-Marc
6. Re: Error compiling to C
- Posted by jmduro 1 day ago
- 75 views
I changed to EU 4.2 only and it compiles with no problem on Linux Mint Debian Edition Gigi x64.
7. Re: Error compiling to C
- Posted by lib9 20 hours ago
- 45 views
4.2 has not been released. For an outsider, euc should work with the stable release.

