GNAT
#1
Sat, 2013-08-17 20:17
shafire
-
- Offline
- 2 years 7 months ago
- 2013-08-06
Hello,
I am trying to get GNAT running since 3 days! :-( Here is my actual problem:
alpine:~/HelloAda$ gnatmake hello.adb gcc-4.6 -c hello.adb gnatbind -x hello.ali gnatlink hello.ali /opt/gnat-debian/usr/bin/ld: warning: libc.so.6, needed by /opt/gnat-debian/usr/bin/../lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libgnat-4.6.so, may conflict with libc.so.0.9.32 alpine:~/HelloAda$ ./hello Segmentation fault alpine:~/HelloAda$ gnatclean hello "./hello.ali" has been deleted "./hello.o" has been deleted "hello" has been deleted
But there no libraries linked against libc.so.0.9.32 as you can see at the bottom.
I installed following packages in /opt/gnat-debian
wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/gnat-4.6_4.6.3-8_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/gnat-4.6_4.6.3-8_amd64.deb ar</a> vx gnat-4.6_4.6.3-8_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/libgnat-4.6_4.6.3-8_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/libgnat-4.6_4.6.3-8_amd64.deb ar</a> vx libgnat-4.6_4.6.3-8_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/libgnatvsn4.6_4.6.3-8_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/libgnatvsn4.6_4.6.3-8_amd64.deb ar</a> vx libgnatvsn4.6_4.6.3-8_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/libgnatprj4.6_4.6.3-8_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gnat-4.6/libgnatprj4.6_4.6.3-8_amd64.deb ar</a> vx libgnatprj4.6_4.6.3-8_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gcc-4.7/libgcc1_4.7.2-5_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gcc-4.7/libgcc1_4.7.2-5_amd64.deb ar</a> vx libgcc1_4.7.2-5_amd64.deb tar -xzvf data.tar.gz ### maybe not needed # wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gcc-4.7/lib32gcc1_4.7.2-5_amd64.deb #" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gcc-4.7/lib32gcc1_4.7.2-5_amd64.deb #</a> ar vx lib32gcc1_4.7.2-5_amd64.deb # tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/e/eglibc/libc6_2.13-38_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/e/eglibc/libc6_2.13-38_amd64.deb ar</a> vx libc6_2.13-38_amd64.deb tar -xzvf data.tar.gz ### maybe not needed # wget <a href="http://ftp.us.debian.org/debian/pool/main/e/eglibc/libc6-i386_2.13-38_amd64.deb #" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/e/eglibc/libc6-i386_2.13-38_amd64.deb #</a> ar vx libc6-i386_2.13-38_amd64.deb # tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gcc-4.6/gcc-4.6_4.6.3-14_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gcc-4.6/gcc-4.6_4.6.3-14_amd64.deb ar</a> vx gcc-4.6_4.6.3-14_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/m/mpclib/libmpc2_0.9-4_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/m/mpclib/libmpc2_0.9-4_amd64.deb ar</a> vx libmpc2_0.9-4_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gcc-4.6/cpp-4.6_4.6.3-14_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gcc-4.6/cpp-4.6_4.6.3-14_amd64.deb ar</a> vx cpp-4.6_4.6.3-14_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/b/binutils/binutils_2.22-8_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/b/binutils/binutils_2.22-8_amd64.deb ar</a> vx binutils_2.22-8_amd64.deb tar -xzvf data.tar.gz ### maybe not needed # wget <a href="http://ftp.us.debian.org/debian/pool/main/e/eglibc/libc-bin_2.13-38_amd64.deb #" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/e/eglibc/libc-bin_2.13-38_amd64.deb #</a> ar vx libc-bin_2.13-38_amd64.deb # tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/z/zlib/zlib1g_1.2.7.dfsg-13_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/z/zlib/zlib1g_1.2.7.dfsg-13_amd64.deb ar</a> vx zlib1g_1.2.7.dfsg-13_amd64.deb tar -xzvf data.tar.gz wget <a href="http://ftp.us.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb ar" rel="nofollow">http://ftp.us.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6_4.7.2-5_amd64.deb ar</a> vx libstdc++6_4.7.2-5_amd64.deb tar -xzvf data.tar.gz .profile: export PATH=/opt/gnat-debian/sbin:/opt/gnat-debian/usr/bin:/opt/gnat/bin:$PATH export LD_LIBRARY_PATH=/opt/gnat-debian/usr/lib/x86_64-linux-gnu:/opt/gnat-debian/lib/x86_64-linux-gnu:/opt/gnat-debian/lib64:/opt/gnat-debian/usr/lib symlinks: lrwxrwxrwx 1 root root 22 Aug 17 14:42 /lib64 -> /opt/gnat-debian/lib64 lrwxrwxrwx 1 root root 37 Aug 17 14:52 /lib/x86_64-linux-gnu -> /opt/gnat-debian/lib/x86_64-linux-gnu maybe I forgot some symlinks
alpine:~$ LD_TRACE_LOADED_OBJECTS=1 /lib64/ld-linux-x86-64.so.2 /opt/gnat-debian/usr/bin/ld linux-vdso.so.1 => (0x000074566fc8a000) libbfd-2.22-system.so => /opt/gnat-debian/usr/lib/libbfd-2.22-system.so (0x000074566fb80000) libz.so.1 => /opt/gnat-debian/lib/x86_64-linux-gnu/libz.so.1 (0x000074566f968000) libdl.so.2 => /opt/gnat-debian/lib/x86_64-linux-gnu/libdl.so.2 (0x000074566f764000) libc.so.6 => /opt/gnat-debian/lib/x86_64-linux-gnu/libc.so.6 (0x000074566f3da000) /lib64/ld-linux-x86-64.so.2 (0x000074566fc8c000)
Could we get gnat work on alpine, please? :-)
Hi,
my next try was to compile gnat with the flag static on Debian and copy the binaries to alpine:
gnat-static2.tar.gz (165.1 MB)
https://mega.co.nz/#!fJc22RKI!PulfohhdlzNqaPaVvHhzYiO16MYG_NaVRd4PZq-2ky0
This did not work out. :-( The binary gnatclean works, but not gnatmake for some (unknown) reason.
Okay, I tried to compile a Cross-Compiler. It's working for C, but not for Ada.
adaint.c => http://nopaste.info/ffcb612692.html
At line 3797 and 3807 in file adaint.c, I found following comment:
/* glibc versions earlier than 2.7 do not define the routines to handle dynamically allocated CPU sets. For these targets, we use the static versions. */
EDIT: I will check http://comments.gmane.org/gmane.comp.lib.uclibc.general/22736