Skip to contentSkip to conversation

New: python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

Buildroot bugzilla at busybox.net 1 participant 10 messages Aug 19, 2020 – Aug 23, 2020

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 13166
Summary: python-rpi-gpio: does not work against aarch64,
unintentional side-effect of gcc-10 patch
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: christian at paral.in
CC: buildroot at uclibc.org
Target Milestone: ---

python-rpi-gpio on aarch64 (pi 4):

ImportError:
/usr/lib/python3.8/site-packages/RPi/_GPIO.cpython-38-aarch64-linux-gnu.so:
undefined symbol: high

There is a patch attached to the package -

fixes the "multiple definition of" errors with gcc10

It changes the "high" variable to be "extern" which might have caused this?

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

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

--- Comment #1 from Christian Stewart <[email protected]> --- According to this, originally the submitter tried to disable the warning, but that patch was rejected by the maintainers:

http://buildroot-busybox.2317881.n4.nabble.com/PATCH-1-1-package-python-rpi-gpio-fix-build-with-gcc-10-x-td261727.html

Then they submitted another with the more deep changes, I wonder, what was so bad about disabling the compiler warning?

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

In reply to bugzilla at busybox.net

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

--- Comment #2 from Christian Stewart <[email protected]> --- Created attachment 8566
--> https://bugs.busybox.net/attachment.cgi?id=8566&action=edit
Removes a faulty patch which caused a "undefined symbol" error at runtime against aarch64 on a Raspberry Pi.

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

In reply to bugzilla at busybox.net

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

--- Comment #3 from Christian Stewart <[email protected]> --- Here's a patch to fix it by going back to the "disable compiler warning and paper over the problem" approach, not sure if the maintainers will like it, but at least it fixed the problem for me in the short term.

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

In reply to bugzilla at busybox.net

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

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |yann.morin.1998 at free.fr

--- Comment #4 from Yann E. MORIN <[email protected]> --- (In reply to Christian Stewart from comment #1)

Quoted 1 line

I wonder, what was so bad about disabling the compiler warning?

Because duplicate symbols are a source for bugs. If we just add the -fcommon option, this indeed hides the warning away, but the problematic code will not get fixed, and we will have to carry that option ad libitum.

Instead, we want patches that fixes those warnings, so those patches are sent to the corresponding upstreams, so the packages get fixed, and so we can drop those patches in a future version bump.

So, I've had a look a deeper look at the patch now, and indeed it is not complete... I'll follow up with a revised fix. Stay tuned to the ML.

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

In reply to bugzilla at busybox.net

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

--- Comment #5 from Christian Stewart <[email protected]> --- Thanks Yann. The patch I attached to this bug actually doesn't work anyway, the module still fails at runtime:

File "usr/lib/python3.8/site-packages/RPi/GPIO/__init__.py", line 23, in
<module>
SystemError: Type does not define the tp_name field.

Feel free to send me any patch for testing.

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

In reply to bugzilla at busybox.net

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

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

   Attachment #8566|0                           |1

is obsolete| |

--- Comment #6 from Yann E. MORIN <[email protected]> --- Created attachment 8571
--> https://bugs.busybox.net/attachment.cgi?id=8571&action=edit
Fix patch, add runtime test

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

In reply to bugzilla at busybox.net

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

--- Comment #7 from Yann E. MORIN <[email protected]> --- Christian, care to test the attached patch, please?

The runtime test demonstrates that it is possible to import the module, but I have no way to test it on real hardware for now...

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

[Buildroot] [Bug 13166] python-rpi-gpio: does not work against aarch64, unintentional side-effect of gcc-10 patch

In reply to bugzilla at busybox.net

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

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Yann E. MORIN <[email protected]> --- Christian, All,

Fixed with commit ae6bd1eb44. Thanks for the report.

Regards,
Yann E. MORIN.

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