~alpine/devel

1

[alpine-devel] Problem building gnat for armhf

Leslie P. Polzer | PORT ZERO <polzer@port-zero.com>
Details
Message ID
<5280A831.9010205@port-zero.com>
Sender timestamp
1384163377
DKIM signature
missing
Download raw message
Hi Timo,

have you by any chance encountered this error when crossbuilding gnat
as part of gcc for armhf:

ada/ali.o: In function `ali__scan_ali__fatal_error__wchar.7321':
ali.adb:(.text+0x1c): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__checkc.7267':
ali.adb:(.text+0xac): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__skip_eol.7302':
ali.adb:(.text+0x144): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__skip_line.7304':
ali.adb:(.text+0x27c): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__get_nat.7284':
ali.adb:(.text+0x340): undefined reference to `_gnat_stack_check'
ada/ali.o:ali.adb:(.text+0x444): more undefined references to `_gnat_stack_check' follow
collect2: error: ld returned 1 exit status
make[2]: *** [gnatbind] Error 1
make[2]: *** Waiting for unfinished jobs....
ada/ali.o: In function `ali__scan_ali__fatal_error__wchar.7321':
ali.adb:(.text+0x1c): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__checkc.7267':
ali.adb:(.text+0xac): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__skip_eol.7302':
ali.adb:(.text+0x144): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__skip_line.7304':
ali.adb:(.text+0x27c): undefined reference to `_gnat_stack_check'
ada/ali.o: In function `ali__scan_ali__get_nat.7284':
ali.adb:(.text+0x340): undefined reference to `_gnat_stack_check'
ada/ali.o:ali.adb:(.text+0x444): more undefined references to `_gnat_stack_check' follow

This is with latest aports and an up to date edge system.
I don't get this when crossbuilding for x86-musl.

It looks like this function isn't defined for armhf, or the
file it is defined in is not included.

  Leslie

-- 
Dipl.Ing.(BA) Leslie P. Polzer | CTO - PORT ZERO
UG (haftungsbeschränkt)
Softwareentwicklung & IT Engineering
Adalbertstraße 7/8
10999 Berlin
Tel.: +49 (0)30 - 69 200 907 - 0
Fax: +49 (0)30 - 69 200 907 - 9
http://www.port-zero.com


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Timo Teras <timo.teras@iki.fi>
Details
Message ID
<20131111115559.4c335679@vostro>
In-Reply-To
<5280A831.9010205@port-zero.com> (view parent)
Sender timestamp
1384163759
DKIM signature
missing
Download raw message
On Mon, 11 Nov 2013 10:49:37 +0100
"Leslie P. Polzer | PORT ZERO" <polzer@port-zero.com> wrote:

> have you by any chance encountered this error when crossbuilding gnat
> as part of gcc for armhf:
> 
> ada/ali.o: In function `ali__scan_ali__fatal_error__wchar.7321':
> ali.adb:(.text+0x1c): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__checkc.7267':
> ali.adb:(.text+0xac): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__skip_eol.7302':
> ali.adb:(.text+0x144): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__skip_line.7304':
> ali.adb:(.text+0x27c): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__get_nat.7284':
> ali.adb:(.text+0x340): undefined reference to `_gnat_stack_check'
> ada/ali.o:ali.adb:(.text+0x444): more undefined references to
> `_gnat_stack_check' follow collect2: error: ld returned 1 exit status
> make[2]: *** [gnatbind] Error 1
> make[2]: *** Waiting for unfinished jobs....
> ada/ali.o: In function `ali__scan_ali__fatal_error__wchar.7321':
> ali.adb:(.text+0x1c): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__checkc.7267':
> ali.adb:(.text+0xac): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__skip_eol.7302':
> ali.adb:(.text+0x144): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__skip_line.7304':
> ali.adb:(.text+0x27c): undefined reference to `_gnat_stack_check'
> ada/ali.o: In function `ali__scan_ali__get_nat.7284':
> ali.adb:(.text+0x340): undefined reference to `_gnat_stack_check'
> ada/ali.o:ali.adb:(.text+0x444): more undefined references to
> `_gnat_stack_check' follow
> 
> This is with latest aports and an up to date edge system.
> I don't get this when crossbuilding for x86-musl.
> 
> It looks like this function isn't defined for armhf, or the
> file it is defined in is not included.

I had such issues, but I thought I fixed them all. Namely adding
-fno-stack-check flags to ESP_NOSSP_CFLAGS and stage1_cflags should
have fixed it. Search for "Fix ada bootstrap" in the apkbuild.

Then again when I did my cross compiler things were different. It seems
to be recent addition in piepatches that -fstack-check is enabled by
default. So the issue probably depends how the gcc you use to compile
cross gcc is built. Adding -fno-stack-check should fix it, but where to
add it I'm not fully sure.

- Timo




---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)