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

linuxmint-17, ubuntu-trusty: scipy build error with pybind11 #32515

Closed
mkoeppe opened this issue Sep 14, 2021 · 25 comments
Closed

linuxmint-17, ubuntu-trusty: scipy build error with pybind11 #32515

mkoeppe opened this issue Sep 14, 2021 · 25 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Sep 14, 2021

On linuxmint-17-minimal (https://github.com/sagemath/sage/runs/3593003595)

  gcc -pthread -shared -Wl,-rpath-link,/sage/local/lib -L/sage/local/lib -Wl,-rpath,/sage/local/lib -L. -Wl,-rpath-link,/sage/local/lib -L/sage/local/lib -Wl,-rpath,/sage/local/lib -shared -Wl,-rpath-link,/sage/local/lib -L/sage/local/lib -Wl,-rpath,/sage/local/lib build/temp.linux-x86_64-3.9/scipy/cluster/_optimal_leaf_ordering.o -L/sage/local/lib -Lbuild/temp.linux-x86_64-3.9 -o build/lib.linux-x86_64-3.9/scipy/cluster/_optimal_leaf_ordering.cpython-39-x86_64-linux-gnu.so -Wl,--version-script=build/temp.linux-x86_64-3.9/link-version-scipy.cluster._optimal_leaf_ordering.map
  C compiler: g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O2 -g -fPIC

  creating /tmp/tmpif5aglmi/tmp
  creating /tmp/tmpif5aglmi/tmp/tmpif5aglmi
  compile options: '-I/sage/local/include/python3.9 -c'
  extra options: '-std=c++14'
  g++: /tmp/tmpif5aglmi/main.cpp
  g++: error: unrecognized command line option '-std=c++14'
  C compiler: g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O2 -g -fPIC

  creating /tmp/tmpjrgp9vmy/tmp
  creating /tmp/tmpjrgp9vmy/tmp/tmpjrgp9vmy
  compile options: '-I/sage/local/include/python3.9 -c'
  extra options: '-std=c++11'
  g++: /tmp/tmpjrgp9vmy/main.cpp
  C compiler: g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O2 -g -fPIC

  creating /tmp/tmpik_q_vbd/tmp
  creating /tmp/tmpik_q_vbd/tmp/tmpik_q_vbd
  compile options: '-I/sage/local/include/python3.9 -c'
  g++: /tmp/tmpik_q_vbd/main.c
  C compiler: g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O2 -g -fPIC

  creating /tmp/tmpv4ojh26z/tmp
  creating /tmp/tmpv4ojh26z/tmp/tmpv4ojh26z
  compile options: '-I/sage/local/include/python3.9 -c'
  extra options: '-pthread'
  g++: /tmp/tmpv4ojh26z/main.c
  C compiler: g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O2 -g -fPIC

   creating build/temp.linux-x86_64-3.9/scipy/fft
  creating build/temp.linux-x86_64-3.9/scipy/fft/_pocketfft
  compile options: '-DPOCKETFFT_PTHREADS -I/sage/local/lib/python3.9/site-packages/pybind11/include -I/sage/local/lib/python3.9/site-packages/pybind11/include -I/sage/local/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/sage/local/include/python3.9 -c'
  extra options: '-std=c++11 -pthread -fvisibility=hidden -msse -msse2 -msse3'
  g++: scipy/fft/_pocketfft/pypocketfft.cxx
  In file included from scipy/fft/_pocketfft/pypocketfft.cxx:16:0:
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:328:5: error: 'is_trivially_copyable' is not a member of 'std'
       std::is_trivially_copyable<T>,
       ^
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:328:5: error: 'is_trivially_copyable' is not a member of 'std'
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:328:33: error: template argument 2 is invalid
       std::is_trivially_copyable<T>,
                                   ^
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:968:49: error: 'is_pod_struct' is not a member of 'pybind11::detail'
   struct format_descriptor<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> {
                                                   ^
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:968:49: error: 'is_pod_struct' is not a member of 'pybind11::detail'
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:968:72: error: template argument 1 is invalid
   struct format_descriptor<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> {
                                                                          ^
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:968:75: error: template argument 2 is invalid
   struct format_descriptor<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> {
                                                                             ^
  /sage/local/lib/python3.9/site-packages/pybind11/include/pybind11/numpy.h:968:80: error: expected unqualified-id before '>' token
   struct format_descriptor<T, detail::enable_if_t<detail::is_pod_struct<T>::value>> {


error: Command "g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -O2 -g -fPIC -DPOCKETFFT_PTHREADS -I/sage/local/lib/python3.9/site-packages/pybind11/include -I/sage/local/lib/python3.9/site-packages/pybind11/include -I/sage/local/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/sage/local/include/python3.9 -c scipy/fft/_pocketfft/pypocketfft.cxx -o build/temp.linux-x86_64-3.9/scipy/fft/_pocketfft/pypocketfft.o -MMD -MF build/temp.linux-x86_64-3.9/scipy/fft/_pocketfft/pypocketfft.o.d -std=c++11 -pthread -fvisibility=hidden -msse -msse2 -msse3" failed with exit status 1

Likely caused by the pybind11 update (from 2.6.0 to 2.7.1; https://pybind11.readthedocs.io/en/stable/changelog.html) done as part of the Jupyter upgrade in #31280.

Broken:

  • linuxmint-17 (gcc 4.8.4-2ubuntu1~14.04.3, __GLIBCXX__ = 20150426),
  • ubuntu-trusty (4.8.4-2ubuntu1~14.04.4, __GLIBCXX__ = 20150426)

OK:

  • centos-7 4.8.5 20150623 (Red Hat 4.8.5-44, __GLIBCXX__ = 20150623)
  • debian-jessie (gcc 4.9.2-10+deb8u2),
  • linuxmint-18 (gcc 5.4.0-6ubuntu1~16.04.6),
  • fedora-26 (7.3.1 20180130 (Red Hat 7.3.1-2))

Opened pybind11 upstream issue: pybind/pybind11#3269, PR pybind/pybind11#3270 (merged in the 2.7 maintenance branch)

CC: @dimpase @orlitzky @jhpalmieri @kliem

Component: packages: standard

Author: Matthias Koeppe

Branch/Commit: d0e1e95

Reviewer: Jonathan Kliem

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

@mkoeppe mkoeppe added this to the sage-9.5 milestone Sep 14, 2021
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

comment:4

I don't see anything in the pybind11 changelog nor in https://pybind11.readthedocs.io/en/stable/upgrade.html that indicates that C++14 would now be needed

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

comment:6

OK, C++14 is irrelevant. Looks like the failing compilers do not implement C++11 completely.
https://stackoverflow.com/questions/25123458/is-trivially-copyable-is-not-a-member-of-std

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

New commits:

d7a2ef3build/pkgs/pybind11/patches: Add fix for linuxmint-17, ubuntu-trusty

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

Commit: d7a2ef3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 15, 2021

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

dc418ddbuild/pkgs/pybind11/patches: Add fix for linuxmint-17, ubuntu-trusty
d0e1e95build/pkgs/pybind11/package-version.txt: Adjust patch for layout of the sdist

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Sep 15, 2021

Changed commit from d7a2ef3 to d0e1e95

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 15, 2021

comment:15

Tested successfully using tox -e docker-ubuntu-trusty-standard -- scipy

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 23, 2021

comment:18

Let's get this in please

@kliem
Copy link
Contributor

kliem commented Sep 23, 2021

Reviewer: Jonathan Kliem

@kliem
Copy link
Contributor

kliem commented Sep 23, 2021

comment:19

LGTM.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Sep 23, 2021

comment:20

Thank you!

@vbraun
Copy link
Member

vbraun commented Oct 9, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants