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

Fix incompatibility issues with manylinux1 platform #320

Merged
merged 2 commits into from
May 6, 2020

Conversation

pramodk
Copy link
Contributor

@pramodk pramodk commented May 5, 2020

Motivation

We would like to ship nmodl with NEURON manylinux1 wheel during upcoming release 8.0

Changes

  • manylinux1 platform provides gcc 4.8.2 for wider compatibility
  • gcc 4.8.2 is first gnu compiler supporting almost all C++11
    except that it lacks const_iterator overload for std::vector::erase
    and std::vector::insert
  • in this PR we introduce const_iter_cast thar turns const iterator
    into non-const-iterator to have minimal changes to the code base
  • change the compatibility to gcc 4.8.2 for cmake as well as json library
  • change pybind11::literals::operator""_a to namespace pybind11::literals
    as documented in https://pybind11.readthedocs.io/en/stable/basics.html#keyword-arguments

fixes #319

Considerations

  • This PR is not an attempt to bind to the oldest compiler
  • We have started investigation to upgrade to new gcc (e.g. v7 or v8) under manylinux platfor. This should happen soon after 8.0 release.
  • For this 8.0 relate, NEURON wheel infrastructure is setup with manylinux1 and would be good to have current nmodl ship with NEURON
  • As the changes are minimal here, it won't be a big deal to get this in.

- manylinux1 platform provides gcc 4.8.1 for wider compatibility
- gcc 4.8.1 is first gnu compiler supporting `almost all` C++11
  except that it lacks const_iterator overload for std::vector::erase
  and std::vector::insert
- in this PR we introduce const_iter_cast thar turns const iterator
  into non-const-iterator with minimal changes to the code base
- change the compatibility to gcc 4.8.2 for cmake as well as json library
- change pybind11::literals::operator""_a to namespace pybind11::literals
  as documented in https://pybind11.readthedocs.io/en/stable/basics.html#keyword-arguments

fixes #319
@pramodk pramodk requested review from alkino, ohm314 and cattabiani May 5, 2020 00:03
src/utils/common_utils.hpp Outdated Show resolved Hide resolved
Co-authored-by: Omar Awile <omar.awile@epfl.ch>
Copy link
Contributor

@cattabiani cattabiani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfektus for me

@pramodk pramodk requested a review from ohm314 May 6, 2020 11:07
@cattabiani
Copy link
Contributor

checking jenkins looks like there is some code left for debugging that prints the pythonpath for every test...

Copy link
Contributor

@ohm314 ohm314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pramodk
Copy link
Contributor Author

pramodk commented May 6, 2020

checking jenkins looks like there is some code left for debugging that prints the pythonpath for every test...

that might be just some old builds. I dont see any debug code into latest commits.

@pramodk pramodk merged commit eb57b10 into master May 6, 2020
@pramodk pramodk deleted the pramodk/manylinux-compatibility branch May 6, 2020 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix portability issues with wheel on manylinux1 platform
3 participants