1. problem with euc on Mac OS Snow Leopard with 4.0 beta 2

I usually use the Euphoria to C translator to make my programs stand-alone executables. With Beta 2, it works until it gets to the linking step. Ld says that eu.a is not of required architecture. Then Ld doesn't link the program.

new topic     » topic index » view message » categorize

2. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

tiger0581 said...

I usually use the Euphoria to C translator to make my programs stand-alone executables. With Beta 2, it works until it gets to the linking step. Ld says that eu.a is not of required architecture. Then Ld doesn't link the program.

You should be able to build eu.a from the C source. Simply go into the source/ dir and type 'make library', then copy the generated eu.a into the same location as euc.

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

3. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

tiger0581 said...

I usually use the Euphoria to C translator to make my programs stand-alone executables. With Beta 2, it works until it gets to the linking step. Ld says that eu.a is not of required architecture. Then Ld doesn't link the program.

Hm. It's been a while since I have done dev work on OS X. I'll check it out now.

Jeremy

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

4. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

tiger0581 said...

I usually use the Euphoria to C translator to make my programs stand-alone executables. With Beta 2, it works until it gets to the linking step. Ld says that eu.a is not of required architecture. Then Ld doesn't link the program.

Do you have a 32bit or 64bit OS X?

Jeremy

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

5. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

I uploaded a new file to SF.net. Can you please try it? It's of the same filename. Make sure the file date (when downloading) is 9/1/2009 not 8/31/2009.

Let me know how thinks work with it. I specifically added -m32 to the build process so that a 64bit file isn't built.

If that does not work, can you please use the -verbose parameters to euc and paste the output here in a message?

Thanks,

Jeremy

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

6. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

jeremy said...

I uploaded a new file to SF.net. Can you please try it? It's of the same filename. Make sure the file date (when downloading) is 9/1/2009 not 8/31/2009.

Let me know how thinks work with it. I specifically added -m32 to the build process so that a 64bit file isn't built.

If that does not work, can you please use the -verbose parameters to euc and paste the output here in a message?

Thanks,

Jeremy

I just downloaded the file again and it still doesn't work.

Script started on Tue Sep  1 21:21:09 2009 
bash-3.2$ euc -verbose ctimer.ex 
Translating code, pass: 1 2 3 4 5 6 7 8 9 10 11  generating 
Compiling with GCC 
Compiling   3% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math init-.c 
Compiling  14% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math ctimer.c 
Compiling  22% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math main-.c 
Compiling  29% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math get.c 
Compiling  37% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math sequence.c 
Compiling  44% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math sort.c 
Compiling  51% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math text.c 
Compiling  59% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math filesys.c 
Compiling  66% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math dll.c 
Compiling  74% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math machine.c 
Compiling  81% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math memory.c 
Compiling  88% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math types.c 
Compiling  96% gcc  -fomit-frame-pointer -c -w -fsigned-char -O2 -m32 -I/Users/rmann/euphoria -ffast-math 0et.c 
Linking 100% gcc -o ctimer  init-.o ctimer.o main-.o get.o sequence.o sort.o text.o filesys.o dll.o machine.o memory.o types.o 0et.o /Users/rmann/euphoria/bin/eu.a -lresolv 
ld: warning: in init-.o, file is not of required architecture 
ld: warning: in ctimer.o, file is not of required architecture 
ld: warning: in main-.o, file is not of required architecture 
ld: warning: in get.o, file is not of required architecture 
ld: warning: in sequence.o, file is not of required architecture 
ld: warning: in sort.o, file is not of required architecture 
ld: warning: in text.o, file is not of required architecture 
ld: warning: in filesys.o, file is not of required architecture 
ld: warning: in dll.o, file is not of required architecture 
ld: warning: in machine.o, file is not of required architecture 
ld: warning: in memory.o, file is not of required architecture 
ld: warning: in types.o, file is not of required architecture 
ld: warning: in 0et.o, file is not of required architecture 
ld: warning: in /Users/rmann/euphoria/bin/eu.a, file is not of required architecture 
Undefined symbols: 
  "_main", referenced from: 
      start in crt1.10.6.o 
ld: symbol(s) not found 
collect2: ld returned 1 exit status 
Unable to link ctimer 
Status: 256 Command: gcc -o ctimer  init-.o ctimer.o main-.o get.o sequence.o sort.o text.o filesys.o dll.o machine.o memory.o types.o 0et.o /Users/rmann/euphoria/bin/eu.a -lresolv 
bash-3.2$ exit 
exit 
 
Script done on Tue Sep  1 21:21:57 2009 

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

7. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

tiger0581 said...

I just downloaded the file again and it still doesn't work.

Can you give us more detail about your machine? What is the result of:

  
  $ uname -a 
 

Matt

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

8. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

tiger0581 said...

Linking 100% gcc -o ctimer  init-.o ctimer.o main-.o get.o sequence.o sort.o text.o filesys.o dll.o machine.o memory.o types.o 0et.o /Users/rmann/euphoria 

Actually, it looks like the problem is that the linker isn't using the -m32 flag. As a workaround, try the -lflags option:

 $ euc -lflags -m32 app.ex 
I've not tested this myself, but alternatively, you can use the -makefile-full option with euc, and then add the -m32 flag to the linker flags.

Basically, you should see a line that looks something like this in the generated makefile:

LFLAGS = /usr/local/lib/eu.a -ldl -lm 

Add -m32 to this, and it should work.

Matt

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

9. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

mattlewis said...
tiger0581 said...

Linking 100% gcc -o ctimer  init-.o ctimer.o main-.o get.o sequence.o sort.o text.o filesys.o dll.o machine.o memory.o types.o 0et.o /Users/rmann/euphoria 

Actually, it looks like the problem is that the linker isn't using the -m32 flag. As a workaround, try the -lflags option:

 $ euc -lflags -m32 app.ex 
I've not tested this myself, but alternatively, you can use the -makefile-full option with euc, and then add the -m32 flag to the linker flags.

Basically, you should see a line that looks something like this in the generated makefile:

LFLAGS = /usr/local/lib/eu.a -ldl -lm 

Add -m32 to this, and it should work.

Matt

Thanks. Using -makefile-full, then adding -m32 to the linker flags allowed me to compile a program.

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

10. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

tiger0581 said...

Thanks. Using -makefile-full, then adding -m32 to the linker flags allowed me to compile a program.

If you do not wish to go the makefile route, you can simply run:

$ euc -lflags -m32 prog.ex 

and that should work as well. However, I am going to fix this problem right now and release OS X binaries again.

Jeremy

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

11. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

jeremy said...

However, I am going to fix this problem right now and release OS X binaries again.

Ok. The new binaries are up. I would give it a good 30 minutes before trying to download to make sure that SF.net has actually put the new file online. Also, it's now listed on the downloads page. You can ensure you have the latest binary by two means:

$ eui -version 
Euphoria Interpreter 4.0.0 development (r2681M) for OS X 
Using System Memory 
 
$ euc -verbose test.ex 
... 
Linking 100% gcc -o test  init-.o test.o main-.o /Users/jeremy/Projects/Euphoria/euphoria/bin/eu.a -m32  -lresolv 
$ 

Notice the "-m32" in the Linking line. If you do not see that, you do not have the latest version. Also compare the version numbers on eui. It should report 2681.

Jeremy

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

12. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

jeremy said...
jeremy said...

However, I am going to fix this problem right now and release OS X binaries again.

Ok. The new binaries are up. I would give it a good 30 minutes before trying to download to make sure that SF.net has actually put the new file online. Also, it's now listed on the downloads page. You can ensure you have the latest binary by two means:

$ eui -version 
Euphoria Interpreter 4.0.0 development (r2681M) for OS X 
Using System Memory 
 
$ euc -verbose test.ex 
... 
Linking 100% gcc -o test  init-.o test.o main-.o /Users/jeremy/Projects/Euphoria/euphoria/bin/eu.a -m32  -lresolv 
$ 

Notice the "-m32" in the Linking line. If you do not see that, you do not have the latest version. Also compare the version numbers on eui. It should report 2681.

Jeremy

I just downloaded the new binaries. Euc now works normally. Thanks.

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

13. Re: problem with euc on Mac OS Snow Leopard with 4.0 beta 2

tiger0581 said...

I just downloaded the new binaries. Euc now works normally. Thanks.

Great, I'm glad we figured it out. This will affect any 64bit OS, Win64, Linux 64, 64bit FreeBSD/SunOS, etc... So, it was good to find/fix before final releases.

Jeremy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu