Help compiling ZPU toolchain on Ubuntu 13.04


kwoods

Recommended Posts

I'm using Ubuntu 13.04 64-bit and I noticed that the ZPUino IDE came with "zpu_tools_linux32.tar.bz". I tried to use these on my machine, but I got a "No such file or directory" error. I did a google search and saw this: http://askubuntu.com/questions/133389/no-such-file-or-directory-but-the-file-exists

 

Which has made me think I must compile the ZPU toolchain for a 64-bit machine. I follow the steps as directed by this page: http://opensource.zylin.com/zpudownload.html

 

I run into this error:

*** buffer overflow detected ***: zpu-elf-ar terminated======= Backtrace: =========/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x2aaaaade15cc]/lib/x86_64-linux-gnu/libc.so.6(+0x110560)[0x2aaaaade0560]/lib/x86_64-linux-gnu/libc.so.6(+0x10f9e9)[0x2aaaaaddf9e9]/lib/x86_64-linux-gnu/libc.so.6(_IO_default_xsputn+0xdb)[0x2aaaaad4caeb]/lib/x86_64-linux-gnu/libc.so.6(_IO_padn+0xf0)[0x2aaaaad40720]/lib/x86_64-linux-gnu/libc.so.6(_IO_vfprintf+0x4638)[0x2aaaaad1de68]/lib/x86_64-linux-gnu/libc.so.6(__vsprintf_chk+0x94)[0x2aaaaaddfa84]/lib/x86_64-linux-gnu/libc.so.6(__sprintf_chk+0x7d)[0x2aaaaaddf9cd]zpu-elf-ar[0x4072cd]zpu-elf-ar[0x4091ff]zpu-elf-ar[0x40cda7]zpu-elf-ar[0x40494b]zpu-elf-ar[0x404f07]zpu-elf-ar[0x40274b]/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x2aaaaacf1ea5]zpu-elf-ar[0x402a95]======= Memory map: ========00400000-00452000 r-xp 00000000 08:02 12724355                           /home/kwoods/workspace/ZPU/zpugcc/toolchain/install/bin/zpu-elf-ar00652000-00653000 r--p 00052000 08:02 12724355                           /home/kwoods/workspace/ZPU/zpugcc/toolchain/install/bin/zpu-elf-ar00653000-00654000 rw-p 00053000 08:02 12724355                           /home/kwoods/workspace/ZPU/zpugcc/toolchain/install/bin/zpu-elf-ar00654000-00658000 rw-p 00000000 00:00 0 0162e000-01736000 rw-p 00000000 00:00 0                                  [heap]2aaaaaaab000-2aaaaaace000 r-xp 00000000 08:02 11013730                   /lib/x86_64-linux-gnu/ld-2.17.so2aaaaaace000-2aaaaaad0000 rw-p 00000000 00:00 0 2aaaaaad0000-2aaaaaad7000 r--s 00000000 08:02 787339                     /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache2aaaaaad7000-2aaaaaad8000 rw-p 00000000 00:00 0 2aaaaaae4000-2aaaaaae7000 rw-p 00000000 00:00 0 2aaaaaccd000-2aaaaacce000 r--p 00022000 08:02 11013730                   /lib/x86_64-linux-gnu/ld-2.17.so2aaaaacce000-2aaaaacd0000 rw-p 00023000 08:02 11013730                   /lib/x86_64-linux-gnu/ld-2.17.so2aaaaacd0000-2aaaaae8e000 r-xp 00000000 08:02 11013754                   /lib/x86_64-linux-gnu/libc-2.17.so2aaaaae8e000-2aaaab08d000 ---p 001be000 08:02 11013754                   /lib/x86_64-linux-gnu/libc-2.17.so2aaaab08d000-2aaaab091000 r--p 001bd000 08:02 11013754                   /lib/x86_64-linux-gnu/libc-2.17.so2aaaab091000-2aaaab093000 rw-p 001c1000 08:02 11013754                   /lib/x86_64-linux-gnu/libc-2.17.so2aaaab093000-2aaaab098000 rw-p 00000000 00:00 0 2aaaab098000-2aaaab779000 r--p 00000000 08:02 399404                     /usr/lib/locale/locale-archive2aaaab779000-2aaaab78d000 r-xp 00000000 08:02 11013779                   /lib/x86_64-linux-gnu/libgcc_s.so.12aaaab78d000-2aaaab98d000 ---p 00014000 08:02 11013779                   /lib/x86_64-linux-gnu/libgcc_s.so.12aaaab98d000-2aaaab98e000 r--p 00014000 08:02 11013779                   /lib/x86_64-linux-gnu/libgcc_s.so.12aaaab98e000-2aaaab98f000 rw-p 00015000 08:02 11013779                   /lib/x86_64-linux-gnu/libgcc_s.so.17fff2233d000-7fff22360000 rw-p 00000000 00:00 0                          [stack]7fff223fe000-7fff22400000 r-xp 00000000 00:00 0                          [vdso]ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]make[2]: *** [libgcc.a] Aborted (core dumped)make[2]: *** Deleting file `libgcc.a'make[2]: Leaving directory `/home/kwoods/workspace/ZPU/zpugcc/toolchain/gccbuild/gcc'make[1]: *** [stmp-multilib] Error 2make[1]: Leaving directory `/home/kwoods/workspace/ZPU/zpugcc/toolchain/gccbuild/gcc'make: *** [all-gcc] Error 2

Is there any way to get around this? I'm a bit stuck and my end goal right now is just to get the ZPUino IDE to work. Also, is there any chance a simplified version of Linux could be compiled with the ZPU toolchain?

Link to comment
Share on other sites

To compile zpu gcc tool chain available here http://repo.or.cz/w/zpugcc.git on a 64bit native linux workstation, the build.sh script need to be modify. Otherwise one of zpu tools we just compile and we use to build the toolchain will crash.

binutils need to be compile with the additional following flags in CFLAGS variable:

-DFORTIFY_SOURCE=0

I use this tips on previous release of Ubuntu and didn't test it with the latest.

 

 

Thomas

Link to comment
Share on other sites

  • 2 weeks later...

Unfortunately I was unable to compile the toolchain for my 64-bit machine. I did find a quick fix though. On my Ubuntu 13.04 machine I ran the following command to allow 32-bit programs to run on my 64-bit machine.

sudo apt-get install ia32-libs

I found this here: http://askubuntu.com/questions/297151/how-to-run-32-bit-programs-on-a-64-bit-system-ubuntu-13-04

 

My ZPUino IDE works like a charm now. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.