Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openblas build fails on archlinux-latest-minimal, fedora-38-minimal #34899

Closed
mkoeppe opened this issue Jan 7, 2023 · 9 comments · Fixed by #36722
Closed

openblas build fails on archlinux-latest-minimal, fedora-38-minimal #34899

mkoeppe opened this issue Jan 7, 2023 · 9 comments · Fixed by #36722

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 7, 2023

https://github.com/mkoeppe/sage/actions/runs/3853109922/jobs/6583067996

2023-01-07T17:31:18.8289483Z gcc -g -O2 -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DUSE_TLS -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.21\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I. -O2 -DSMALL_MATRIX_OPT -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DUSE_TLS -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.21\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.. -Wl,-rpath-link,/sage/local/lib -L/sage/local/lib -Wl,-rpath,/sage/local/lib -Wl,-rpath-link,/sage/local/lib -L/sage/local/lib -Wl,-rpath,/sage/local/lib  -w -o linktest linktest.c ../libopenblasp-r0.3.21.so -L/sage/local/lib/../lib -L/sage/local/lib/../lib -L/sage/local/lib/gcc/x86_64-pc-linux-gnu/12.2.0 -L/sage/local/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/sage/local/lib -L/sage/local/lib -L/sage/local/lib/gcc/x86_64-pc-linux-gnu/12.2.0/../../..  -lgfortran -lm -lquadmath -lm -lc  && echo OK.
2023-01-07T17:31:18.8289656Z /usr/sbin/ld: /tmp/cc0ihrCo.o: in function `main':
2023-01-07T17:31:18.8289973Z /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:191: undefined reference to `iparam2stage_'
2023-01-07T17:31:18.8290308Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:192: undefined reference to `ilaenv2stage_'
2023-01-07T17:31:18.8290629Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:204: undefined reference to `spotri_'
2023-01-07T17:31:18.8290927Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:216: undefined reference to `dpotri_'
2023-01-07T17:31:18.8291237Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:228: undefined reference to `cpotri_'
2023-01-07T17:31:18.8291543Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:240: undefined reference to `zpotri_'
2023-01-07T17:31:18.8291843Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:241: undefined reference to `ilaenv_'
2023-01-07T17:31:18.8292197Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:242: undefined reference to `ieeeck_'
2023-01-07T17:31:18.8292494Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:243: undefined reference to `lsamen_'
2023-01-07T17:31:18.8292792Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:244: undefined reference to `iparmq_'
2023-01-07T17:31:18.8293104Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:245: undefined reference to `ilaprec_'
2023-01-07T17:31:18.8293414Z /usr/sbin/ld: /sage/local/var/tmp/sage/build/openblas-0.3.21/src/exports/linktest.c:246: undefined reference to `ilatrans_'
...

CC: @antonio-rojas

Component: packages: standard

Issue created by migration from https://trac.sagemath.org/ticket/34899

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 9, 2023

@antonio-rojas
WIth the upgrade #35371, still a build error. Not sure if it's the same one because I have only looked at a part of the log.

  [openblas-0.3.23]   gcc -g -O2 -O2 -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DUSE_TLS -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.23\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I. -O2 -DSMALL_MATRIX_OPT -DMAX_STACK_ALLOC=2048 -Wall -m64 -DF_INTERFACE_GFORT -fPIC -DDYNAMIC_ARCH -DSMP_SERVER -DNO_WARMUP -DMAX_CPU_NUMBER=2 -DMAX_PARALLEL_NUMBER=1 -DUSE_TLS -DBUILD_SINGLE=1 -DBUILD_DOUBLE=1 -DBUILD_COMPLEX=1 -DBUILD_COMPLEX16=1 -DVERSION=\"0.3.23\" -UASMNAME -UASMFNAME -UNAME -UCNAME -UCHAR_NAME -UCHAR_CNAME -DASMNAME= -DASMFNAME=_ -DNAME=_ -DCNAME= -DCHAR_NAME=\"_\" -DCHAR_CNAME=\"\" -DNO_AFFINITY -I.. -Wl,-rpath-link,/sage/local/lib -L/sage/local/lib -Wl,-rpath,/sage/local/lib -Wl,-rpath-link,/sage/local/lib -L/sage/local/lib -Wl,-rpath,/sage/local/lib  -shared -o ../libopenblasp-r0.3.23.so \
  [openblas-0.3.23]   -Wl,--whole-archive ../libopenblasp-r0.3.23.a -Wl,--no-whole-archive \
  [openblas-0.3.23]   -Wl,-soname,libopenblas.so.0 -lm -lpthread -lgfortran -lm -lpthread -lgfortran
  [openblas-0.3.23]   /usr/sbin/ld: ../libopenblasp-r0.3.23.a: member ../libopenblasp-r0.3.23.a(saxpy.o) in archive is not an object
  [openblas-0.3.23]   collect2: error: ld returned 1 exit status

@mkoeppe
Copy link
Contributor Author

mkoeppe commented May 9, 2023

On opensuse-tumbleweed-minimal, I see a similarly mysterious error:

  [openblas-0.3.23]   bfd plugin: ../libopenblasp-r0.3.23.a: file too short
  [openblas-0.3.23]   ar: ../libopenblasp-r0.3.23.a(lapacke_dsptri_work.o):2: unexpected character `\364' in S-record file
  [openblas-0.3.23]   ar: ../libopenblasp-r0.3.23.a(lapacke_dsptri_work.o):2: unexpected character `\364' in S-record file
  [openblas-0.3.23]   make[3]: Target 'shared' not remade because of errors.

vbraun pushed a commit that referenced this issue May 22, 2023
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

<!-- Describe your changes here in detail. -->
https://github.com/xianyi/OpenBLAS/releases/tag/v0.3.23
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
- fixes the build on `fedora-38-minimal`
- the known build errors on `archlinux-latest-minimal` (#34899) and
`opensuse-tumbleweed-minimal` persist after this update

<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35371
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 6, 2023

Also the openblas build appears to be responsible for the unexplained timeouts in these builds:

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 6, 2023

Reproduced the ubuntu-trusty hang with DOCKER_TARGETS="with-system-packages configured with-targets-pre" tox -e docker-ubuntu-trusty-toolchain-gcc_9-standard -- all-sage-local, then used docker exec $CONTAINER pkill make on the running container.
The log has a lot of this:

make[4]: warning: -jN forced in submake: disabling jobserver mode.
make[5]: warning: -jN forced in submake: disabling jobserver mode.
ar  -ru ../../libopenblas_haswellp-r0.3.23.a sgetrf_single.o sgetrf_parallel.o dgetrf_single.o dgetrf_parallel.o cgetrf_single.o cgetrf_parallel.o zgetrf_single.o zgetrf_parallel.o
ar: `u' modifier ignored since `D' is the default (see `U')
make[5]: warning: -jN forced in submake: disabling jobserver mode.
ar  -ru ../../libopenblas_haswellp-r0.3.23.a sgetf2_k.o dgetf2_k.o cgetf2_k.o zgetf2_k.o
ar: `u' modifier ignored since `D' is the default (see `U')
make[5]: warning: -jN forced in submake: disabling jobserver mode.
cd x86_64 && make -j 8 -j 8 -j 8 ../slaswp_plus.o
cd x86_64 && make -j 8 -j 8 -j 8 ../slaswp_minus.o
cd x86_64 && make -j 8 -j 8 -j 8 ../dlaswp_plus.o
cd x86_64 && make -j 8 -j 8 -j 8 ../dlaswp_minus.o
cd x86_64 && make -j 8 -j 8 -j 8 ../claswp_plus.o
cd x86_64 && make -j 8 -j 8 -j 8 ../claswp_minus.o
cd x86_64 && make -j 8 -j 8 -j 8 ../zlaswp_plus.o
cd x86_64 && make -j 8 -j 8 -j 8 ../zlaswp_minus.o
make[6]: warning: -jN forced in submake: disabling jobserver mode.
make[6]: `../slaswp_minus.o' is up to date.
make[6]: warning: -jN forced in submake: disabling jobserver mode.
make[6]: `../zlaswp_plus.o' is up to date.

@mkoeppe mkoeppe added this to the sage-10.2 milestone Nov 6, 2023
@dimpase
Copy link
Member

dimpase commented Nov 8, 2023

ubuntu trusty is well past its normal EOL, and will lose even paid support in 5 months. Why do we bother about it at all?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 8, 2023

I've already solved the problem in #36671; it's not helpful to suggest I should not have bothered

@dimpase
Copy link
Member

dimpase commented Nov 8, 2023

there one finds a workaround which won't be needed as soon as we stop catering for distros with such an old make, and this is very soon.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 8, 2023

Look closer. It also fixes the makefile parallelization bugs that affect the newest distros.

vbraun pushed a commit to vbraun/sage that referenced this issue Nov 11, 2023
…cit `make -j N`; but use `make -j 1` on `ubuntu-trusty`

<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
OpenMathLib/OpenBLAS#828

<!-- Why is this change required? What problem does it solve? -->
Fixes part of
sagemath#34899 (comment)

Tests at https://github.com/mkoeppe/sage/actions/runs/6779033300:
openblas finishes successfully in https://github.com/mkoeppe/sage/action
s/runs/6779033300/job/18425453802#step:11:3863
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

URL: sagemath#36671
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri, Matthias Köppe
vbraun pushed a commit to vbraun/sage that referenced this issue Nov 12, 2023
…cit `make -j N`; but use `make -j 1` on `ubuntu-trusty`

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
OpenMathLib/OpenBLAS#828

<!-- Why is this change required? What problem does it solve? -->
Fixes part of
sagemath#34899 (comment)

Tests at https://github.com/mkoeppe/sage/actions/runs/6779033300:
openblas finishes successfully in https://github.com/mkoeppe/sage/action
s/runs/6779033300/job/18425453802#step:11:3863
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36671
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri, Matthias Köppe
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Nov 13, 2023

It also fixes the makefile parallelization bugs that affect the newest distros.

I should have said "attempts to fix"....

Still broken in 10.2.rc2 after #36671:

@mkoeppe mkoeppe changed the title openblas build fails on archlinux-latest-minimal openblas build fails on archlinux-latest-minimal, fedora-38-minimal Nov 13, 2023
vbraun pushed a commit to vbraun/sage that referenced this issue Nov 16, 2023
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
Another attempt to fix sagemath#34899
<!-- If your change requires a documentation PR, please link it
appropriately. -->

Full portability run for Linux:
https://github.com/mkoeppe/sage/actions/runs/6874334523 (inspected
`ubuntu-trusty-standard` ... `almalinux-9-standard` and likewise
`-minimal`, no sign of regressions)

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

URL: sagemath#36722
Reported by: Matthias Köppe
Reviewer(s):
@vbraun vbraun closed this as completed in 95ed1d0 Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants