1. Error using euc

Hello, I'm new to OpenEuphoria but an old user of "classic" Euphoria 3.1.1. I've installed euphoria-4.1.0-Linux-x64 in Ubuntu 22.04 following the steps from the download page. The interpreter eui works fine, but when I try to compile with euc I have this error message:

/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_w.o): relocation R_X86_64_32 against symbol `screen_image' can not be used when making a PIE object; recompile with -fPIE 

Thanks, Rodolfo.

PS: It's a pleasure to be in an Euphoria forum again!

new topic     » topic index » view message » categorize

2. Re: Error using euc

Although for most purposes, interpreting or binding EuGTK programs works fine, if you wish to compile your program, on newest Linux distros (e.g. Mint 19) euc fails: You'll need to run a short script:.

euc -build-dir build -extra-lflags="-no-pie" -makefile $1.ex 
cd ./build  
make -j8 -f $1.mak 

Replace the -j8 with -j[n] where [n] is the number of processors you have. Makes compilation faster.

Runtime exe will be back in your home folder.

Hope that solves the problem, and welcome back!

new topic     » goto parent     » topic index » view message » categorize

3. Re: Error using euc

Thanks for the answer, irv.

I have executed the commands and now the error messages are others:

/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): en la función `power': 
be_runtime.c:(.text+0x4061): referencia a `__powl_finite' sin definir\\ 
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): en la función `Dpower': 
be_runtime.c:(.text+0x40dc): referencia a `__powl_finite' sin definir\\ 
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): en la función `e_log': 
be_runtime.c:(.text+0x417f): referencia a `__log_finite' sin definir\\ 
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): en la función `De_log': 
be_runtime.c:(.text+0x41c1): referencia a `__log_finite' sin definir\\ 
collect2: error: ld returned 1 exit status\\ 
make: *** [prueba.mak:21: /home/rodoval/prueba] Error 1 

Some messages are in Spanish, but I think they are understandable (en la función = in the function, referencia a = reference to, sin definir = undefined).

Thanks, Rodolfo.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Error using euc

I think I've seen a reference to that problem. Let me do some looking...

I'm sorry to report that problem goes back at least two years, with no one offering any answer: https://openeuphoria.org/forum/m/135124.wc

Now, I just tried a simple hello.ex program, and it compiled and ran without any errors, so I suspect the problem may be caused when programs "include" some include files. EDT: by a newer kernel.

Can you post a sample that won't compile, so that I can try it?

new topic     » goto parent     » topic index » view message » categorize

5. Re: Error using euc

irv said...

I think I've seen a reference to that problem. Let me do some looking...

It's a problem with newer versions of glibc lacking those functions. See here: https://openeuphoria.org/forum/136848.wc#136849 (that post includes links to other related posts as well)

-Greg

new topic     » goto parent     » topic index » view message » categorize

6. Re: Error using euc

It was only a very simple test, a "Hello word" too, without include.
Rodolfo.

new topic     » goto parent     » topic index » view message » categorize

7. Re: Error using euc

rodolfo said...

It was only a very simple test, a "Hello word" too, without include.
Rodolfo.

OK. I tested the usual

puts(1,"Hello World\n") 

and it compiles and runs.

I also tried several EuGTK programs (which are large and complex, and use almost all Eu includes), and they compile and run without error.

I'm using Mint Linux: Linux irv-desktop 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Ubuntu 22.04 kernel is 5.18.xx I think. Something in the newer kernel causes the problem. I don't think there is an easy fix for that, other than loading an earlier version of Linux or recompiling Euphoria. See https://openeuphoria.org/forum/m/136073.wc Note: If you do that, your executable probably won't run on older systems though.

For my programs, I just bind or shroud them. There's no significant difference in speed between the bound and the compiled versions. There's little difference in memory required, either.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Error using euc

Yes, I have 5.15.0-52-generic now in Ubuntu 22.04. In other PC with Linux Mint the kernel is 5.4.0 and the errors are the same.
According to my experience with Euphoria 3.1.1, binding is OK for most of uses, but I've made some "puzzle solvers" in which the difference in time expent was significant. I will test with 4.1.0.
Thanks for all!

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu