我编译了一个 GCC 4.8.1 交叉编译器(BUILD/HOST:debian/glibc,TARGET:alpinelinux/uclibc)。C 编译器运行良好,但 Ada 暂时无法运行。
juan@debian:~/HelloAda$ x86_64-alpine-linux-uclibc-gnatmake hello.adb
x86_64-alpine-linux-uclibc-gcc -c hello.adb
x86_64-alpine-linux-uclibc-gnatbind -x hello.ali
x86_64-alpine-linux-uclibc-gnatlink hello.ali
/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/libgnat.a(adaint.o): In function `__gnat_cpu_alloc':
/home/juan/GCC/obj/gcc/ada/rts/adaint.c:3797: undefined reference to `__sched_cpualloc'
/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/libgnat.a(adaint.o): In function `__gnat_cpu_free':
/home/juan/GCC/obj/gcc/ada/rts/adaint.c:3807: undefined reference to `__sched_cpufree'
collect2: error: ld returned 1 exit status
x86_64-alpine-linux-uclibc-gnatlink: error when calling /home/juan/opt/cross/bin/x86_64-alpine-linux-uclibc-gcc
x86_64-alpine-linux-uclibc-gnatmake: *** link failed.
/home/juan/GCC/obj/gcc/ada/rts/adaint.c:http://nopaste.info/ffcb612692.html _ _
/usr/include/sched.h:http://nopaste.info/5332aed42a.html /usr/include/bits/sched.h:http://nopaste.info/46323ab5d8.html _
_ _ _
/opt/alpine/usr/include/sched.h:http://nopaste.info/998896bafe.html /opt/alpine/usr/include/bits/sched.h:http://nopaste.info/e8cfbd2844.html _
_ _ _
有人知道,怎么了?
正在发生的事情的更详细的输出:
juan@debian:~/HelloAda$ x86_64-alpine-linux-uclibc-gcc -c hello.adb
juan@debian:~/HelloAda$ x86_64-alpine-linux-uclibc-gnatbind hello
juan@debian:~/HelloAda$ x86_64-alpine-linux-uclibc-gnatlink -v -v hello
GNATLINK 4.8.1
Copyright (C) 1995-2013, Free Software Foundation, Inc.
x86_64-alpine-linux-uclibc-gcc -c -mtune=generic -march=x86-64 -gnatA -gnatWb -gnatiw -v -gnatws /home/juan/HelloAda/b~hello.adb
Using built-in specs.
COLLECT_GCC=/home/juan/opt/cross/bin/x86_64-alpine-linux-uclibc-gcc
Target: x86_64-alpine-linux-uclibc
Configured with: ../src/configure --prefix=/home/juan/opt/cross --build=x86_64-cross-linux-gnu --host=x86_64-cross-linux-gnu --target=x86_64-alpine-linux-uclibc --disable-altivec --disable-build-with-cxx --disable-checking --disable-fixed-point --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --enable-languages=c,ada --enable-shared --with-dynamic-linker=ld64-uClibc.so.0.9.32 --with-dynamic-linker-prefix=/opt/alpine/lib --with-system-zlib --without-system-libunwindmake --with-sysroot=/opt/alpine
Thread model: posix
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-c' '-mtune=generic' '-march=x86-64' '-gnatA' '-gnatWb' '-gnatiw' '-v' '-gnatws'
/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/4.8.1/gnat1 -quiet -dumpbase b~hello.adb -auxbase b~hello -mtune=generic -march=x86-64 -gnatA -gnatWb -gnatiw -gnatws /home/juan/HelloAda/b~hello.adb -o /tmp/ccG4vv8d.s
COLLECT_GCC_OPTIONS='-c' '-mtune=generic' '-march=x86-64' '-gnatA' '-gnatWb' '-gnatiw' '-v' '-gnatws'
/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/bin/as -v --64 -o b~hello.o /tmp/ccG4vv8d.s
GNU assembler version 2.23.2 (x86_64-alpine-linux-uclibc) using BFD version (GNU Binutils) 2.23.2
COMPILER_PATH=/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/bin/
LIBRARY_PATH=/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/lib/../lib/:/opt/alpine/lib/../lib/:/opt/alpine/usr/lib/../lib/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/lib/:/opt/alpine/lib/:/opt/alpine/usr/lib/
COLLECT_GCC_OPTIONS='-c' '-mtune=generic' '-march=x86-64' '-gnatA' '-gnatWb' '-gnatiw' '-v' '-gnatws'
/home/juan/opt/cross/bin/x86_64-alpine-linux-uclibc-gcc b~hello.o ./hello.o -v -o hello -L./ -L/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/ /home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/libgnat.a -static-libgcc
Using built-in specs.
COLLECT_GCC=/home/juan/opt/cross/bin/x86_64-alpine-linux-uclibc-gcc
COLLECT_LTO_WRAPPER=/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/4.8.1/lto-wrapper
Target: x86_64-alpine-linux-uclibc
Configured with: ../src/configure --prefix=/home/juan/opt/cross --build=x86_64-cross-linux-gnu --host=x86_64-cross-linux-gnu --target=x86_64-alpine-linux-uclibc --disable-altivec --disable-build-with-cxx --disable-checking --disable-fixed-point --disable-libssp --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --enable-languages=c,ada --enable-shared --with-dynamic-linker=ld64-uClibc.so.0.9.32 --with-dynamic-linker-prefix=/opt/alpine/lib --with-system-zlib --without-system-libunwindmake --with-sysroot=/opt/alpine
Thread model: posix
gcc version 4.8.1 (GCC)
COMPILER_PATH=/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/bin/
LIBRARY_PATH=/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/lib/../lib/:/opt/alpine/lib/../lib/:/opt/alpine/usr/lib/../lib/:/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/lib/:/opt/alpine/lib/:/opt/alpine/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'hello' '-L./' '-L/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/' '-static-libgcc' '-mtune=generic' '-march=x86-64'
/home/juan/opt/cross/libexec/gcc/x86_64-alpine-linux-uclibc/4.8.1/collect2 --sysroot=/opt/alpine --eh-frame-hdr -m elf_x86_64 -dynamic-linker /opt/alpine/lib/ld64-uClibc.so.0.9.32 -o hello /opt/alpine/usr/lib/../lib/crt1.o /opt/alpine/usr/lib/../lib/crti.o /home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/crtbegin.o -L./ -L/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/ -L/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1 -L/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/lib/../lib -L/opt/alpine/lib/../lib -L/opt/alpine/usr/lib/../lib -L/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/../../../../x86_64-alpine-linux-uclibc/lib -L/opt/alpine/lib -L/opt/alpine/usr/lib b~hello.o ./hello.o /home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/libgnat.a -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/crtend.o /opt/alpine/usr/lib/../lib/crtn.o
/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/libgnat.a(adaint.o): In function `__gnat_cpu_alloc':
/home/juan/GCC/obj/gcc/ada/rts/adaint.c:3797: undefined reference to `__sched_cpualloc'
/home/juan/opt/cross/lib/gcc/x86_64-alpine-linux-uclibc/4.8.1/adalib/libgnat.a(adaint.o): In function `__gnat_cpu_free':
/home/juan/GCC/obj/gcc/ada/rts/adaint.c:3807: undefined reference to `__sched_cpufree'
collect2: error: ld returned 1 exit status
x86_64-alpine-linux-uclibc-gnatlink: error when calling /home/juan/opt/cross/bin/x86_64-alpine-linux-uclibc-gcc