Problem Setting Up D Cross Compiler In Ubuntu

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
brentS
Posts: 16
Joined: Sat Jun 27, 2009 5:41 pm

Problem Setting Up D Cross Compiler In Ubuntu

Post by brentS »

Hey Guys,

So today I am trying to set a cross compiler in D using the wiki tutorial. Whenever I use sudo make all-gcc it gives me this error "make[2]: i586-elf-ar: Command not found". I then enter $PATH and it shows this '/bin:/pgm:/usr/hla:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/cross/bin:/usr/cross/bin../gcc-x.x.x/configure: No such file or directory'. Obviously /usr/cross/bin is in my directory but it is still giving me this error. Any advice? Thanks
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: Problem Setting Up D Cross Compiler In Ubuntu

Post by 01000101 »

brentS wrote: I then enter $PATH and it shows this '/bin:/pgm:/usr/hla:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/cross/bin:/usr/cross/bin../gcc-x.x.x/configure: No such file or directory'.
It looks to me like you have "/usr/cross/bin../gcc-x.x.x/configure" when it should just be "/usr/cross/bin/" (that way it can find the proper values (assuming i586-elf-* is in /usr/cross/bin/". You map directly to the configure folder and you also have a weird ".." after "/bin" which may be doing something nasty.
brentS
Posts: 16
Joined: Sat Jun 27, 2009 5:41 pm

Re: Problem Setting Up D Cross Compiler In Ubuntu

Post by brentS »

Thanks I fixed that but now im having a buffer overflow issue.

Code: Select all

*** buffer overflow detected ***: i586-elf-ar terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40137da8]
/lib/tls/i686/cmov/libc.so.6[0x40135eb0]
/lib/tls/i686/cmov/libc.so.6[0x401355a8]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400a7bb8]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4009aded]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27bf)[0x4007bfef]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0x40135654]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x4013559d]
i586-elf-ar[0x80508b2]
i586-elf-ar[0x804ea6b]
i586-elf-ar[0x8051578]
i586-elf-ar[0x8058838]
i586-elf-ar[0x804b615]
i586-elf-ar[0x804c2a0]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40050775]
i586-elf-ar[0x8049661]
======= Memory map: ========
08048000-080a5000 r-xp 00000000 08:01 2384017    /usr/cross/bin/i586-elf-ar
080a5000-080a6000 r--p 0005c000 08:01 2384017    /usr/cross/bin/i586-elf-ar
080a6000-080a7000 rw-p 0005d000 08:01 2384017    /usr/cross/bin/i586-elf-ar
080a7000-080ab000 rw-p 080a7000 00:00 0 
09af7000-09cd8000 rw-p 09af7000 00:00 0          [heap]
40000000-4001c000 r-xp 00000000 08:01 1032404    /lib/ld-2.9.so
4001c000-4001d000 r--p 0001b000 08:01 1032404    /lib/ld-2.9.so
4001d000-4001e000 rw-p 0001c000 08:01 1032404    /lib/ld-2.9.so
4001e000-4001f000 r-xp 4001e000 00:00 0          [vdso]
4001f000-40021000 rw-p 4001f000 00:00 0 
40021000-40022000 r--p 00000000 08:01 106245     /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40022000-40029000 r--s 00000000 08:01 90113      /usr/lib/gconv/gconv-modules.cache
40029000-40033000 rw-p 40029000 00:00 0 
4003a000-40196000 r-xp 00000000 08:01 1400836    /lib/tls/i686/cmov/libc-2.9.so
40196000-40197000 ---p 0015c000 08:01 1400836    /lib/tls/i686/cmov/libc-2.9.so
40197000-40199000 r--p 0015c000 08:01 1400836    /lib/tls/i686/cmov/libc-2.9.so
40199000-4019a000 rw-p 0015e000 08:01 1400836    /lib/tls/i686/cmov/libc-2.9.so
4019a000-4019e000 rw-p 4019a000 00:00 0 
4019e000-401dd000 r--p 00000000 08:01 1703950    /usr/lib/locale/en_US.utf8/LC_CTYPE
401f6000-40203000 r-xp 00000000 08:01 1318932    /lib/libgcc_s.so.1
40203000-40204000 r--p 0000c000 08:01 1318932    /lib/libgcc_s.so.1
40204000-40205000 rw-p 0000d000 08:01 1318932    /lib/libgcc_s.so.1
bf890000-bf8a6000 rw-p bffea000 00:00 0          [stack]
make[2]: *** [libgcc.a] Aborted
make[2]: *** Deleting file `libgcc.a'
make[2]: Leaving directory `/usr/src/build/gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/usr/src/build/gcc/gcc'
make: *** [all-gcc] Error 2

User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Problem Setting Up D Cross Compiler In Ubuntu

Post by Combuster »

Why do people forget to substitute gcc-x.x.x with gcc-3.4.6 or whatever version they are using?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: Problem Setting Up D Cross Compiler In Ubuntu

Post by Brynet-Inc »

Combuster wrote:Why do people forget to substitute gcc-x.x.x with gcc-3.4.6 or whatever version they are using?
The bleeding obvious eludes them?
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
brentS
Posts: 16
Joined: Sat Jun 27, 2009 5:41 pm

Re: Problem Setting Up D Cross Compiler In Ubuntu

Post by brentS »

That was just a mistake when trying to fix the path issue. With or without it, it still gave me the same issue because /usr/cross/bin is still there. When I tried it in root terminal it then gave me the buffer overflow.
Post Reply