[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GNAT on armhf



Hi again,

On Wed, Apr 18, 2012 at 10:25 PM, Tero Koskinen <tero.koskinen@iki.fi> wrote:
> Hi,
>
> I managed to create some preliminary GNAT binary, which runs on Debian
> armhf and generates Debian armhf binaries from Ada source code.

Actual .deb packages are available at
http://iki.fi/tero.koskinen/debian/armhf/deb-packages/

The are build with following commands:
apt-get source gcc-4-6
cd gcc-...
vi debian/rules.defs # disable everything except c and ada
LANG=C TMPDIR=$HOME/tmp dpkg-buildpackage -us -uc -d

And installed:
dpkg -i --force-all ../*.deb

The compiler seems to work, however there are some issues with shared libraries.
If I build my Ahven package (apt-get source ahven;dpkg-buildpackage -us -uc)
and then link it to my other libraries, I get linking errors. It might be some
shared vs. static library issue.

Example errors:
gnatlink /home/tkoskine/work/hauki/test_objects/tester.ali -shared-libg[84/1805]
 -g -pthread -pthread -lc -L/home/tkoskine/work/hauki/lib/ -lhauki -L/usr/lib/ -
lahven -o /home/tkoskine/work/hauki/tester
/usr/lib//libpthread.a(pthread_create.o): In function `setxid_mark_thread':
/build/buildd-eglibc_2.13-31-armhf-_15hAL/eglibc-2.13/nptl/allocatestack.c:1001:
 undefined reference to `__libc_do_syscall'
/build/buildd-eglibc_2.13-31-armhf-_15hAL/eglibc-2.13/nptl/allocatestack.c:1001:
 undefined reference to `__libc_do_syscall'
/usr/lib//libpthread.a(pthread_create.o): In function `setxid_signal_thread':
/build/buildd-eglibc_2.13-31-armhf-_15hAL/eglibc-2.13/nptl/allocatestack.c:1056:
 undefined reference to `__libc_do_syscall'
/build/buildd-eglibc_2.13-31-armhf-_15hAL/eglibc-2.13/nptl/allocatestack.c:1060:
 undefined reference to `__libc_do_syscall'
/usr/lib//libpthread.a(pthread_create.o): In function `setxid_unmark_thread':
/build/buildd-eglibc_2.13-31-armhf-_15hAL/eglibc-2.13/nptl/allocatestack.c:1037:
 undefined reference to `__libc_do_syscall'
/usr/lib//libpthread.a(pthread_create.o):/build/buildd-eglibc_2.13-31-armhf-_15h
AL/eglibc-2.13/nptl/allocatestack.c:770: more undefined references to `__libc_do
_syscall' follow
/usr/lib//libpthread.a(pthread_create.o): In function `get_cached_stack':
/build/buildd-eglibc_2.13-31-armhf-_15hAL/eglibc-2.13/nptl/allocatestack.c:191:
undefined reference to `_dl_stack_flags'
..

Rebuilding everything from source (hg clone https://.../ahven && cd ahven &&
make && cd ../myanotherlib_with_tests && make) and removing all references to
static libraries helps and produces a working library (with test executables).

I think the next logical step would be to build the armhf gnat packages like
the official ones are done. I don't have any idea how that is done, but I am
sure someone on the list knows?

Yours,
 Tero


Reply to: