Skip to contentSkip to conversation

New: [numpy] segfault when compiling for RPi3 64bits

Buildroot bugzilla at busybox.net 1 participant 7 messages Jun 26, 2019 – Jul 15, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=11991

Bug ID: 11991
Summary: [numpy] segfault when compiling for RPi3 64bits
Product: buildroot
Version: 2019.05
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: xonqnoppp at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---

Created attachment 8126
--> https://bugs.busybox.net/attachment.cgi?id=8126&action=edit
log of numpy compilation

When building for RaspberryPi 3 with 64bits from buildroot-2019.05 I get the attached error. It did not happen with 32bits.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 11991] [numpy] segfault when compiling for RPi3 64bits

https://bugs.busybox.net/show_bug.cgi?id=11991

--- Comment #1 from Peter Seiderer <[email protected]> --- Which GCC version? Mind to share your config/defconfig?

There is one more reference of the same compile failure on the web, see [1].

numpy/core/src/npymath/npy_math_internal.h.src:482:12: internal compiler error:
Segmentation fault

     return @kind@@c@(x, y);
            ^~~~~~~~~~~~~~~

Stating 'Bug does not occur when using -O0 on GCC 8.2.0 and does not occur at all with GCC 9.1.0', mind to try a different compiler and/or optimization setting?

Regards,
Peter

[1] https://github.com/numpy/numpy/issues/13622

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 11991] [numpy] segfault when compiling for RPi3 64bits

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11991

--- Comment #2 from XonqNopp <[email protected]> --- Created attachment 8136
--> https://bugs.busybox.net/attachment.cgi?id=8136&action=edit
Config used when encountering numpy segfault

Attached my .config (compressed because too large for bugzilla).

I started from configs/raspberry3_64_defconfig and added the stuff I need.

About GCC version I am not sure which one you want... So I have these:

$ /home/buildroot/buildroot201907numpySegFault/output/host/bin/aarch64-buildroot-linux-uclibc-gcc --version
aarch64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2019.05) 7.4.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc --version
gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Let me know if you want to know about another one...

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 11991] [numpy] segfault when compiling for RPi3 64bits

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11991

--- Comment #3 from Peter Seiderer <[email protected]> --- Thanks for the info/config...

With make menuconfig under Toolchain-->GCC compiler Version you can select different versions, e.g.

- gcc 4.9.x (works)
- gcc 5.x (untested)
- gcc 6.x (untested)
- gcc 7.x (your/default selection, numpy segfault)
- gcc 8.x (numpy segfault)

Or in case you use buildroot master from git

- gcc 9.x (works)

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 11991] [numpy] segfault when compiling for RPi3 64bits

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11991

--- Comment #4 from XonqNopp <[email protected]> ---
OK for the workaround. So you mean it is intrinsic to the gcc compiler and will be fixed in the next major buildroot release (2019.08)? If so it is fine for me. Thanks for the help.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 11991] [numpy] segfault when compiling for RPi3 64bits

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=11991

--- Comment #5 from Peter Seiderer <[email protected]> --- Update:

- gcc 5.x (works)
- gcc 6.x (numpy segfault)

Yes, gcc-9.1 support was added already on git master (see [1]) and will land in the next buildroot release...

[1]
https://git.buildroot.net/buildroot/commit/?id=089000eccf584d611ad1a8e5400436952450e883

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.