#29091 closed defect (fixed)

tox.ini: Add raspbian-buster

Reported by: jsp Owned by:
Priority: minor Milestone: sage-9.2
Component: build Keywords: raspberry
Cc: malb, slelievre, chapoton, gh-kliem Merged in:
Authors: Matthias Koeppe Reviewers: Jaap Spies
Report Upstream: Completely fixed; Fix reported upstream Work issues:
Branch: 1b4c497 (Commits, GitHub, GitLab) Commit: 1b4c49715cd408788edda6f394034f220d48c6bc
Dependencies: #30021 Stopgaps:

Status badges

Description (last modified by mkoeppe)

On Raspberry Pi 4 4GB on Raspbian Buster build failed with fplll:

libtool: link: g++ -std=gnu++11 -std=c++11 -fPIC -I/home/pi/sagemath/sage-9.1.be
ta1/local/include/ -O3 -Wl,-rpath -Wl,/home/pi/sagemath/sage-9.1.beta1/local/lib
 -o .libs/fplll main.o  -L/home/pi/sagemath/sage-9.1.beta1/local/lib -L/lib ./.l
ibs/libfplll.so -lmpfr -lgmp -pthread -Wl,-rpath -Wl,/home/pi/sagemath/sage-9.1.
beta1/local/lib
/usr/bin/ld: ./.libs/libfplll.so: undefined reference to `__atomic_store_8'
/usr/bin/ld: ./.libs/libfplll.so: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status

This is fixed by upgrading FPLLL in #30021.

In this ticket, we add Docker-based testing for the platform raspbian-buster-armhf so that it can be verified that FPLLL now builds on this platform by the following:

  tox -e docker-raspbian-buster-armhf-standard -- fplll

Attachments (1)

fplll-5.3.2.log (7.5 MB) - added by jsp 22 months ago.

Change History (33)

Changed 22 months ago by jsp

comment:1 Changed 22 months ago by mkoeppe

I have added raspbian-jessie and raspbian-stretch to #29143. There appears to be no Docker image for raspbian-buster.

comment:2 Changed 19 months ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

comment:3 Changed 19 months ago by chapoton

  • Keywords raspberry added

comment:4 follow-up: Changed 17 months ago by malb

This *might* be fixed upstream, can you try again? See https://github.com/fplll/fplll/issues/418

comment:5 in reply to: ↑ 4 Changed 17 months ago by jsp

Replying to malb:

This *might* be fixed upstream, can you try again? See https://github.com/fplll/fplll/issues/418

Building sage-9.1 I get still the same ailure:

/bin/bash ../libtool  --tag=CXX   --mode=link g++ -std=gnu++11 -std=c++11  -fPIC -I/home/pi/sagemath/sage-9.1/local/include/ -L/home/pi/sagemath/sage-9.1/local/lib -O3  -Wl,-rpath-link,/home/pi/sagemath/sage-9.1/local/lib -L/home/pi/sagemath/sage-9.1/local/lib -Wl,-rpath,/home/pi/sagemath/sage-9.1/local/lib  -L/lib -o fplll main.o libfplll.la -lmpfr -lmpfr -lgmp -lgmp 
libtool: link: g++ -std=gnu++11 -std=c++11 -fPIC -I/home/pi/sagemath/sage-9.1/local/include/ -O3 -Wl,-rpath-link -Wl,/home/pi/sagemath/sage-9.1/local/lib -Wl,-rpath -Wl,/home/pi/sagemath/sage-9.1/local/lib -o .libs/fplll main.o  -L/home/pi/sagemath/sage-9.1/local/lib -L/lib ./.libs/libfplll.so -lmpfr -lgmp -pthread -Wl,-rpath -Wl,/home/pi/sagemath/sage-9.1/local/lib
/usr/bin/ld: ./.libs/libfplll.so: undefined reference to `__atomic_store_8'
/usr/bin/ld: ./.libs/libfplll.so: undefined reference to `__atomic_load_8'
collect2: error: ld returned 1 exit status
make[7]: *** [Makefile:1165: fplll] Error 1
make[7]: Leaving directory '/home/pi/sagemath/sage-9.1/local/var/tmp/sage/build/fplll-5.3.2/src/fplll'
make[6]: *** [Makefile:739: all] Error 2
make[6]: Leaving directory '/home/pi/sagemath/sage-9.1/local/var/tmp/sage/build/fplll-5.3.2/src/fplll'
make[5]: *** [Makefile:483: all-recursive] Error 1
make[5]: Leaving directory '/home/pi/sagemath/sage-9.1/local/var/tmp/sage/build/fplll-5.3.2/src'
make[4]: *** [Makefile:370: all] Error 2
make[4]: Leaving directory '/home/pi/sagemath/sage-9.1/local/var/tmp/sage/build/fplll-5.3.2/src'
********************************************************************************
Error building fplll-5.3.2
********************************************************************************

real	51m45.333s
user	67m10.859s
sys	1m31.680s
************************************************************************
Error installing package fplll-5.3.2
************************************************************************
Please email sage-devel (http://groups.google.com/group/sage-devel)
explaining the problem and including the log file
  /home/pi/sagemath/sage-9.1/logs/pkgs/fplll-5.3.2.log
Describe your computer, operating system, etc.
If you want to try to fix the problem yourself, *don't* just cd to
/home/pi/sagemath/sage-9.1/local/var/tmp/sage/build/fplll-5.3.2 and type 'make' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
  (cd '/home/pi/sagemath/sage-9.1/local/var/tmp/sage/build/fplll-5.3.2' && '/home/pi/sagemath/sage-9.1/sage' --buildsh)
When you are done debugging, you can type "exit" to leave the subshell.
************************************************************************
Last edited 17 months ago by mkoeppe (previous) (diff)

comment:6 Changed 17 months ago by malb

Sorry that fix isn't in Sage (or an upstream release yet). I meant trying upstream master. I should cut a new release, though.

comment:7 Changed 17 months ago by slelievre

  • Cc slelievre added
  • Description modified (diff)
  • Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.

I opened this issue in the fplll issue tracker

  • Fix ARM-specific problem with new multicore code in fplll 5.3.x

https://github.com/fplll/fplll/issues/432

but apparently this issue might have been relevant

  • add -latomic when needed

https://github.com/fplll/fplll/issues/418

and it was fixed in Apr 2020 by this pull request

  • check for -latomic

https://github.com/fplll/fplll/pull/419

The current latest release, fplll 5.3.2, is from Jan 2020. Thus the fix should be tried by using the master branch. I hope it fixes things and the next release works on ARM. Sorry for the extra noise.

comment:8 Changed 17 months ago by mkoeppe

  • Branch set to u/mkoeppe/raspian-buster

comment:9 follow-up: Changed 17 months ago by mkoeppe

  • Commit set to 714bdcefc02e22ba0c0174a5cab78d13e5f92264

I have just added a test environment for raspbian-buster. You can try

tox -e docker-raspbian-buster-standard -- fplll

New commits:

e5e2244tox.ini, build/bin/write-dockerfile.sh: Add raspbian-buster
714bdce.github/workflows/tox*.yml: Add raspbian-stretch, raspbian-buster

comment:11 Changed 17 months ago by mkoeppe

Running this on my Mac, I was able to reproduce the error:

  [fplll-5.3.2] error installing, exit status 1. End of log file:
  [fplll-5.3.2]   make[5]: *** [Makefile:1175: latsieve] Error 1
  [fplll-5.3.2]   /usr/bin/ld: ./.libs/libfplll.so: undefined reference to `__atomic_store_8'
  [fplll-5.3.2]   /usr/bin/ld: ./.libs/libfplll.so: undefined reference to `__atomic_load_8'
  [fplll-5.3.2]   collect2: error: ld returned 1 exit status
  [fplll-5.3.2]   make[5]: *** [Makefile:1165: fplll] Error 1
  [fplll-5.3.2]   make[5]: Target 'all-am' not remade because of errors.
  [fplll-5.3.2]   make[5]: Leaving directory '/sage/local/var/tmp/sage/build/fplll-5.3.2/src/fplll'
  [fplll-5.3.2]   make[4]: *** [Makefile:739: all] Error 2

comment:12 Changed 17 months ago by mkoeppe

  • Authors changed from jsp to Matthias Koeppe

comment:13 in reply to: ↑ 9 ; follow-up: Changed 17 months ago by mkoeppe

Replying to mkoeppe:

I have just added a test environment for raspbian-buster. You can try

tox -e docker-raspbian-buster-standard -- fplll

Actually, it is

  tox -e docker-raspbian-buster-armhf-standard -- fplll

which will also work on Linux Docker.

Tests with fplll@master run at https://github.com/mkoeppe/fplll/actions/runs/146958161

comment:14 in reply to: ↑ 13 Changed 17 months ago by slelievre

Replying to mkoeppe:

Tests with fplll@master run at https://github.com/mkoeppe/fplll/actions/runs/146958161

It says:

The job running on runner GitHub Actions 36 has exceeded the maximum execution time of 360.

Could a tox environment install most dependencies using Conda via miniforge?

Miniforge provides Conda on ARM:

comment:15 Changed 17 months ago by mkoeppe

fplll@master on raspbian-buster-armhf-standard succeeded in 5h 7m 1s at

https://github.com/mkoeppe/fplll/runs/805921434

This confirms that master contains the correct fix.

comment:17 Changed 17 months ago by mkoeppe

  • Report Upstream changed from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.

comment:18 Changed 17 months ago by git

  • Commit changed from 714bdcefc02e22ba0c0174a5cab78d13e5f92264 to e5e2244b7ba11b48a661da9b1a0d7abbaf8baa8d

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

comment:19 Changed 17 months ago by mkoeppe

Removed 714bdce from the branch - the build is so slow because of the emulation that it does not make sense to test the sage distribution on this platform on GH Actions.

comment:21 Changed 17 months ago by mkoeppe

  • Dependencies set to #30021

comment:22 Changed 17 months ago by git

  • Commit changed from e5e2244b7ba11b48a661da9b1a0d7abbaf8baa8d to 1b4c49715cd408788edda6f394034f220d48c6bc

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

242c552update FPLLL to 5.3.3
53acc59add upstream_url for fplll
1b4c497tox.ini, build/bin/write-dockerfile.sh: Add raspbian-buster

comment:23 Changed 17 months ago by mkoeppe

  • Description modified (diff)
  • Report Upstream changed from Fixed upstream, but not in a stable release. to Completely fixed; Fix reported upstream
  • Status changed from new to needs_review

comment:24 Changed 17 months ago by mkoeppe

  • Cc chapoton gh-kliem added

comment:25 Changed 17 months ago by mkoeppe

  • Priority changed from major to minor

comment:26 Changed 17 months ago by mkoeppe

  • Summary changed from Build failure of fplll-5.3.2 on Raspbian Buster (ARM) to tox.ini: Add raspbian-buster

comment:27 Changed 17 months ago by jsp

  • Status changed from needs_review to positive_review

Works for me on a Raspberry Pi 4 4GB, Raspbian Buster

comment:28 Changed 17 months ago by mkoeppe

Here you can read more about how we address portability testing. One does not need an actual Raspberry Pi. https://doc.sagemath.org/html/en/developer/portability_testing.html#testing-sage-on-a-different-platform-using-docker

comment:29 Changed 17 months ago by dimpase

I noted on some other ticket that GitHub Actions offer an ARM platform.

comment:30 Changed 17 months ago by vbraun

  • Status changed from positive_review to needs_work

Reviewer name is missing

comment:31 Changed 17 months ago by slelievre

  • Reviewers set to Jaap Spies
  • Status changed from needs_work to positive_review

comment:32 Changed 17 months ago by vbraun

  • Branch changed from u/mkoeppe/raspian-buster to 1b4c49715cd408788edda6f394034f220d48c6bc
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.