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 for pdb and python wheel compatibility #584

Merged
merged 2 commits into from Jun 6, 2020
Merged

Conversation

pramodk
Copy link
Member

@pramodk pramodk commented Jun 6, 2020

  • internal readline was built with neuron wheel
  • as internal readline is very old, it cause issue
    with readline library present on target machine.
  • now build newer readline 7.0 with ncurses included
    and link that with neuron
  • also update dockerfile used for wheel building
  • update ci scripts and pipeline to publish wheel as
    artifacts for testing

  - internal readline was built with neuron wheel
  - as internal readline is very old, it cause issue
    with readline library present on target machine.
  - now build newer readline 7.0 with ncurses included
    and link that with neuron
  - also update dockerfile used for wheel building
  - update ci scripts and pipeline to publish wheel as
    artifacts for testing
@pramodk pramodk requested a review from nrnhines June 6, 2020 00:50
@pramodk
Copy link
Member Author

pramodk commented Jun 6, 2020

@nrnhines : can you check if the issue of pdb incompatibility also exist on OSX?

@pramodk
Copy link
Member Author

pramodk commented Jun 6, 2020

CI is failing with below error:

(cd .. ; gcc -O2   -I. -I..   -I/home/vsts/work/1/s/nrn_test_venv_38/lib/python3.8/site-packages/neuron/.data/include  -I/opt/openmpi/include -fPIC -c x86_64/gap.c -o x86_64/gap.o)
 => LINKING library x86_64/libnrnmech.so Mod files: gap.mod
(cd .. ; g++ -O2 -DVERSION_INFO='8.0.dev112' -std=c++11 -shared -fPIC  -I /home/vsts/work/1/s/nrn_test_venv_38/lib/python3.8/site-packages/neuron/.data/include -o x86_64/libnrnmech.so -Wl,-soname,libnrnmech.so \
  x86_64/mod_func.o x86_64/gap.o -L/home/vsts/work/1/s/nrn_test_venv_38/lib/python3.8/site-packages/neuron/.data/lib -lnrniv -Wl,-rpath,/home/vsts/work/1/s/nrn_test_venv_38/lib/python3.8/site-packages/neuron/.data/lib    /opt/readline/lib/libreadline.a)
g++: error: /opt/readline/lib/libreadline.a: No such file or directory
/home/vsts/work/1/s/nrn_test_venv_38/lib/python3.8/site-packages/neuron/.data/bin/nrnmech_makefile:76: recipe for target 'x86_64/libnrnmech.so' failed
make: *** [x86_64/libnrnmech.so] Error 1

So when external readline library is used, that library is being added to nrnivmodl command. When wheel is being installed target machine, obviously that readline path doesn't exist. We need to exclude readline from nrnivmodl if it's static.

@pramodk
Copy link
Member Author

pramodk commented Jun 6, 2020

@nrnhines : can you try installing wheel from here and see if you still see segfault with pdb? https://dev.azure.com/neuronsimulator/nrn/_build/results?buildId=532&view=artifacts&type=publishedArtifacts

You have to login to azure and have to click drop folder.

@pramodk pramodk marked this pull request as ready for review June 6, 2020 09:21
@nrnhines
Copy link
Member

nrnhines commented Jun 6, 2020

I installed on my mac and it now works correctly.

@nrnhines
Copy link
Member

nrnhines commented Jun 6, 2020

Reviewing this change, it seems that it will make sense at some point in the future to eliminate nrn/src/readline and use this strategy along with a cmake replacement option for NRN_ENABLE_INTERNAL_READLINE to better reflect the process.

Please ping me if this pull request is ready to squash and merge with the master.

@pramodk
Copy link
Member Author

pramodk commented Jun 6, 2020

I installed on my mac and it now works correctly.

@nrnhines : could you try also on Ubuntu 18 where it was failing with the test case of pdb? if that works then it's ready to merge!

@nrnhines
Copy link
Member

nrnhines commented Jun 6, 2020

python 3.6.10 works for ubuntu 18.4

@nrnhines nrnhines merged commit 80685c0 into master Jun 6, 2020
@nrnhines nrnhines deleted the pramodk/wheel-pdb branch June 6, 2020 13:07
@pramodk
Copy link
Member Author

pramodk commented Jun 6, 2020

Ok, I will build new wheel.

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.

None yet

2 participants