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

Bug fix for library name extensions #687

Merged
merged 1 commit into from
Jul 30, 2020
Merged

Bug fix for library name extensions #687

merged 1 commit into from
Jul 30, 2020

Conversation

pramodk
Copy link
Member

@pramodk pramodk commented Jul 29, 2020

  • python libraries like /usr/lib64/libpython2.7.so was detected
    as libpython2 (instead of libpython2.7)
  • this was becuase NAME_WE returns file name without entire longest
    extension
  • while extracting library name we want to remove last extension only
    i.e. .so or .a. And hence we have to use NAME_WLE

This fixes issue while building NEURON on Marconi100 on Cineca.
See https://cmake.org/cmake/help/latest/command/get_filename_component.html

Examples before this patch: note the libpython2 vs libpython2.7 which causes issue with link time when we use nrnivmodl:

# extracted library and full path
 libcurses /usr/lib64/libcurses.so
 libform /usr/lib64/libform.so
 libpython2 /usr/lib64/libpython2.7.so

With this PR

 libcurses /usr/lib64/libcurses.so
 libform /usr/lib64/libform.so
 libpython2.7 /usr/lib64/libpython2.7.so

fyi: @ferdonline

  - python libraries like  /usr/lib64/libpython2.7.so was detected
    as libpython2 (instead of libpython2.7)
  - this was becuase NAME_WE returns file name without entire longest
    extension
  - while extracting library name we want to remove last extension only
    i.e. `.so` or `.a`. And hence we have to use NAME_WLE

This fixes issue while building NEURON on Marconi100 on Cineca.
See https://cmake.org/cmake/help/latest/command/get_filename_component.html
@nrnhines nrnhines merged commit f698710 into master Jul 30, 2020
@nrnhines nrnhines deleted the pramodk/lib-ext branch July 30, 2020 10:18
pramodk added a commit that referenced this pull request Nov 14, 2020
 - #687 introduced use of NAME_WLE but it's only available in
   CMake v 3.14
 - use NAME with regex pattern to do the same

fixes #700
pramodk added a commit that referenced this pull request Nov 14, 2020
 - #687 introduced use of NAME_WLE but it's only available in
   CMake v 3.14
 - use NAME with regex pattern to do the same

fixes #700
nrnhines added a commit that referenced this pull request Nov 14, 2020
* Use cmake 3.8.2 for CI.

* exit travis if actual cmake not desired cmake version

* Remove use of NAME_WLE with get_filename_component (CMake < 3.14)
 - #687 introduced use of NAME_WLE but it's only available in
   CMake v 3.14
 - use NAME with regex pattern to do the same

fixes #700

Co-authored-by: Pramod Kumbhar <pramod.kumbhar@epfl.ch>
nrnhines pushed a commit that referenced this pull request Dec 8, 2020
- python libraries like  /usr/lib64/libpython2.7.so was detected
    as libpython2 (instead of libpython2.7)
  - this was becuase NAME_WE returns file name without entire longest
    extension
  - while extracting library name we want to remove last extension only
    i.e. `.so` or `.a`. And hence we have to use NAME_WLE

This fixes issue while building NEURON on Marconi100 on Cineca.
See https://cmake.org/cmake/help/latest/command/get_filename_component.html
alexsavulescu pushed a commit that referenced this pull request Dec 9, 2020
* Use cmake 3.8.2 for CI.

* exit travis if actual cmake not desired cmake version

* Remove use of NAME_WLE with get_filename_component (CMake < 3.14)
 - #687 introduced use of NAME_WLE but it's only available in
   CMake v 3.14
 - use NAME with regex pattern to do the same

fixes #700

Co-authored-by: Pramod Kumbhar <pramod.kumbhar@epfl.ch>
nrnhines pushed a commit that referenced this pull request Dec 10, 2020
- python libraries like  /usr/lib64/libpython2.7.so was detected
    as libpython2 (instead of libpython2.7)
  - this was becuase NAME_WE returns file name without entire longest
    extension
  - while extracting library name we want to remove last extension only
    i.e. `.so` or `.a`. And hence we have to use NAME_WLE

This fixes issue while building NEURON on Marconi100 on Cineca.
See https://cmake.org/cmake/help/latest/command/get_filename_component.html
nrnhines added a commit that referenced this pull request Dec 10, 2020
* Use cmake 3.8.2 for CI.

* exit travis if actual cmake not desired cmake version

* Remove use of NAME_WLE with get_filename_component (CMake < 3.14)
 - #687 introduced use of NAME_WLE but it's only available in
   CMake v 3.14
 - use NAME with regex pattern to do the same

fixes #700

Co-authored-by: Pramod Kumbhar <pramod.kumbhar@epfl.ch>
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.

3 participants