GDC & BBB arm

Andrea Fontana via D.gnu d.gnu at puremagic.com
Sun Apr 19 09:29:41 PDT 2015


Today I was playing around with my beagleboneblack.

Debian jessy: gdc can be installed it compiles source and output 
works.
So far so good. I'm planning to write a library to control 
input/output from board to make some experiments (my dream: write 
firmware for my custom 3d printer in d).

Anyway in order to speed up compilation, I'm trying to compile 
using a cross compiler from my linux machine

Following instructions found on wiki I built a compiler for 
arm-unknown-linux-gnueabi.

gcc works (with -static)
and
gdc works (with -static) but it gives a lot of warnings:

/home/andrea/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.8.2/../../../../arm-unknown-linux-gnueabi/lib/libgphobos2.a(path.o): 
In function 
`_D3std4path16__T9buildPathTaZ9buildPathFNaNbNfAxAaXAya':
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/path.d:2929: 
warning: Using 'getpwnam_r' in statically linked applications 
requires at runtime the shared libraries from the glibc version 
used for linking
/home/andrea/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.8.2/../../../../arm-unknown-linux-gnueabi/lib/libgphobos2.a(socket.o): 
In function `toImpl':
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/socket.d:347: 
warning: Using 'getaddrinfo' in statically linked applications 
requires at runtime the shared libraries from the glibc version 
used for linking
/home/andrea/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.8.2/../../../../arm-unknown-linux-gnueabi/lib/libgphobos2.a(socket.o): 
In function `getHostNoSync':
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/socket.d:739: 
warning: Using 'gethostbyaddr' in statically linked applications 
requires at runtime the shared libraries from the glibc version 
used for linking
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/socket.d:738: 
warning: Using 'gethostbyname' in statically linked applications 
requires at runtime the shared libraries from the glibc version 
used for linking
/home/andrea/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.8.2/../../../../arm-unknown-linux-gnueabi/lib/libgphobos2.a(socket.o): 
In function 
`_D3std6format65__T14formatUnsignedTS3std5array20__T8AppenderTAyaTyaZ8AppenderTaZ14formatUnsignedFNaNbNfS3std5array20__T8AppenderTAyaTyaZ8AppendermKS3std6format18__T10FormatSpecTaZ10FormatSpeckbZv':
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/socket.d:474: 
warning: Using 'getprotobynumber' in statically linked 
applications requires at runtime the shared libraries from the 
glibc version used for linking
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/socket.d:461: 
warning: Using 'getprotobyname' in statically linked applications 
requires at runtime the shared libraries from the glibc version 
used for linking
/home/andrea/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.8.2/../../../../arm-unknown-linux-gnueabi/lib/libgphobos2.a(socket.o): 
In function `_D3std6socket7Service16getServiceByNameMFxAaxAaZb':
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/socket.d:563: 
warning: Using 'getservbyname' in statically linked applications 
requires at runtime the shared libraries from the glibc version 
used for linking
/home/andrea/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.8.2/../../../../arm-unknown-linux-gnueabi/lib/libgphobos2.a(socket.o): 
In function `_D3std6socket7Service16getServiceByPortMFtxAaZb':
/opt/bbb/.build/src/gcc-custom/libphobos/src/std/socket.d:575: 
warning: Using 'getservbyport' in statically linked applications 
requires at runtime the shared libraries from the glibc version 
used for linking

using instead arm-unknown-linux-gnueabihf (that it's the right 
target, i guess) I can't cross-compile gcc+gdc (but gcc, alone, 
works!). Here the error:

[ALL  ]    checking for cosl... 
/opt/bbb/.build/arm-unknown-linux-gnueabihf/build/build-cc-final/./gcc/xgcc 
-B/opt/bbb/.build/arm-u
nknown-linux-gnueabihf/build/build-cc-final/./gcc/ 
-B/home/andrea/x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/b
in/ 
-B/home/andrea/x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/lib/ 
-isystem /home/andrea/x-tools/arm-unknown-l
inux-gnueabihf/arm-unknown-linux-gnueabihf/include -isystem 
/home/andrea/x-tools/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnue
abihf/sys-include    -o core/threadasm.o -DHAVE_CONFIG_H -I ../ 
-I /opt/bbb/.build/src/gcc-custom/libphobos/libdruntime/gcc -I 
/opt
/bbb/.build/src/gcc-custom/libphobos/libdruntime/../zlib -g -Os 
-c 
/opt/bbb/.build/src/gcc-custom/libphobos/libdruntime/core/thread
asm.S
[ALL  ]    
/opt/bbb/.build/src/gcc-custom/libphobos/libdruntime/core/threadasm.S: 
Assembler messages:
[ALL  ]    
/opt/bbb/.build/src/gcc-custom/libphobos/libdruntime/core/threadasm.S:398: 
Error: selected processor does not support AR
M mode `vpush {d8-d15}'
[ALL  ]    
/opt/bbb/.build/src/gcc-custom/libphobos/libdruntime/core/threadasm.S:402: 
Error: selected processor does not support AR
M mode `vpop {d8-d15}'
[ERROR]    make[5]: *** [core/threadasm.o] Error 1
[ALL  ]    make[5]: *** Waiting for unfinished jobs....


First: It's a known bug? I didn't find anything about it on bug 
tracker.
Second: why if i compile without -static flag when I try to run 
my test it says "file not found"? Am I missing any library on my 
bbb? Can I fix it?


More information about the D.gnu mailing list