1. Compiling in WSL

bugmagnet@LAPTOP-H6HBEGA9:/mnt/c/Users/bugma/Dropbox/Projects/openeuphoria/bin$ euc run.ex  
Build directory: build-925526/ 
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11  generating 
Compiling with GCC 
Compiling   2% init-.c 
Compiling   8% run.c 
Compiling  12% main-.c 
Compiling  16% filesys.c 
Compiling  20% datetime.c 
Compiling  24% dll.c 
Compiling  28% machine.c 
Compiling  32% memory.c 
Compiling  36% types.c 
Compiling  40% get.c 
Compiling  44% io.c 
Compiling  48% text.c 
Compiling  53% convert.c 
Compiling  57% search.c 
Compiling  61% math.c 
Compiling  65% sequence.c 
Compiling  69% sort.c 
Compiling  73% scinot.c 
Compiling  77% wildcard.c 
Compiling  81% cmdline.c 
Compiling  85% map.c 
Compiling  89% eumem.c 
Compiling  93% regex.c 
Compiling  97% json.c 
Linking 100% ../run 
/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 /mnt/c/Users/bugma/Dropbox/Projects/openeuphoria/bin/run 
Status: 1 Command: gcc -o /mnt/c/Users/bugma/Dropbox/Projects/openeuphoria/bin/run  init-.o run.o main-.o filesys.o datetime.o dll.o machine.o memory.o types.o get.o io.o text.o convert.o search.o math.o sequence.o sort.o scinot.o wildcard.o cmdline.o map.o eumem.o regex.o json.o   /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a -m64 -ldl -lm -lpthread 
Could not remove directory build-925526/ 
How do I get this to compile?

-Bruce

new topic     » topic index » view message » categorize

2. Re: Compiling in WSL

I found a posting from a year ago about this issue and tried it, with not much change in the last 12 months

bugmagnet@LAPTOP-H6HBEGA9:/mnt/c/Users/bugma/Dropbox/Projects/openeuphoria/bin$ euc -extra-cflags="-no-pie" -extra-lflags="-no-pie" run.ex 
Build directory: build-693284/ 
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11  generating 
Compiling with GCC 
Compiling   2% init-.c 
Compiling   8% run.c 
Compiling  12% main-.c 
Compiling  16% filesys.c 
Compiling  20% datetime.c 
Compiling  24% dll.c 
Compiling  28% machine.c 
Compiling  32% memory.c 
Compiling  36% types.c 
Compiling  40% get.c 
Compiling  44% io.c 
Compiling  48% text.c 
Compiling  53% convert.c 
Compiling  57% search.c 
Compiling  61% math.c 
Compiling  65% sequence.c 
Compiling  69% sort.c 
Compiling  73% scinot.c 
Compiling  77% wildcard.c 
Compiling  81% cmdline.c 
Compiling  85% map.c 
Compiling  89% eumem.c 
Compiling  93% regex.c 
Compiling  97% json.c 
Linking 100% ../run 
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `power': 
be_runtime.c:(.text+0x4061): undefined reference to `__powl_finite' 
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `Dpower': 
be_runtime.c:(.text+0x40dc): undefined reference to `__powl_finite' 
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `e_log': 
be_runtime.c:(.text+0x417f): undefined reference to `__log_finite' 
/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `De_log': 
be_runtime.c:(.text+0x41c1): undefined reference to `__log_finite' 
collect2: error: ld returned 1 exit status 
Unable to link /mnt/c/Users/bugma/Dropbox/Projects/openeuphoria/bin/run 
Status: 1 Command: gcc -o /mnt/c/Users/bugma/Dropbox/Projects/openeuphoria/bin/run  init-.o run.o main-.o filesys.o datetime.o dll.o machine.o memory.o types.o get.o io.o text.o convert.o search.o math.o sequence.o sort.o scinot.o wildcard.o cmdline.o map.o eumem.o regex.o json.o   /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a -m64 -ldl -lm -lpthread -no-pie 
Could not remove directory build-693284/ 

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

3. Re: Compiling in WSL

axtens_bruce said...

I found a posting from a year ago about this issue and tried it, with not much change in the last 12 months

It helps if you link to the other posts, so folks can follow what's going on.

axtens_bruce said...

/usr/bin/ld: /usr/local/euphoria-4.1.0-Linux-x64/bin/eu.a(be_runtime.o): in function `power': 
be_runtime.c:(.text+0x4061): undefined reference to `__powl_finite' 

Yeah, this was a change in the math library sometime back (by the glibc team).

Recommend trying the latest from git as that have an updated build system which seems to have been updated to deal with these issues, https://openeuphoria.org/forum/m/138137.wc

The older 4.1.0 release hasn't been touched in a while and breaks due to the changes that happened to glibc over the past few years.

axtens_bruce said...

/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 
How do I get this to compile?

-Bruce

Recompiling with -fPIE will get you further, but as per https://openeuphoria.org/forum/m/138260.wc I'd recommend getting the latest from git as that should already have these fixes.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu