8000 support rpath for GNU Fortran compiler. by fdiary · Pull Request #4996 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

support rpath for GNU Fortran compiler. #4996

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

Closed
wants to merge 1 commit into from

Conversation

fdiary
Copy link
Contributor
@fdiary fdiary commented Aug 25, 2014

Hello !

python setup.py build_ext --rpath=... raises a NotImplementedError exception, because runtime_library_dir_option() is not defined in numpy/distutils/fcompiler/*.py.

...
x86_64-linux-gnu-gcc: numpy/linalg/lapack_litemodule.c
x86_64-linux-gnu-gcc: numpy/linalg/lapack_lite/python_xerbla.c
Traceback (most recent call last):
  File "setup.py", line 239, in <module>
    setup_package()
  File "setup.py", line 231, in setup_package
    setup(**metadata)
  File "/tmp/numpy/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/tmp/numpy/numpy/distutils/command/build_ext.py", line 234, in run
    self.build_extensions()
  File "/usr/lib/python2.7/distutils/command/build_ext.py", line 446, in build_extensions
    self.build_extension(ext)
  File "/tmp/numpy/numpy/distutils/command/build_ext.py", line 422, in build_extension
    build_temp=self.build_temp,**kws)
  File "/usr/lib/python2.7/distutils/ccompiler.py", line 691, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/tmp/numpy/numpy/distutils/fcompiler/__init__.py", line 645, in link
    libraries)
  File "/tmp/numpy/numpy/distutils/ccompiler.py", line 573, in gen_lib_options
    runtime_library_dirs, libraries)
  File "/usr/lib/python2.7/distutils/ccompiler.py", line 1071, in gen_lib_options
    opt = compiler.runtime_library_dir_option(dir)
  File "/usr/lib/python2.7/distutils/ccompiler.py", line 718, in runtime_library_dir_option
    raise NotImplementedError
NotImplementedError

Here is the comment in /usr/lib/python2.7/distutils/ccompiler.py ::

    # -- Miscellaneous methods -----------------------------------------
    # These are all used by the 'gen_lib_options() function; there is
    # no appropriate default implementation so subclasses should
    # implement all of these.
    (snip)
    def runtime_library_dir_option(self, dir):
        """Return the compiler option to add 'dir' to the list of
        directories searched for runtime libraries.
        """
        raise NotImplementedError

I implemented the method for GNU Fortran compiler, that I am using. Ideally we need the implementation for other compilers as well.

juliantaylor added a commit that referenced this pull request Aug 25, 2014
support rpath for GNU Fortran compiler.
juliantaylor added a commit that referenced this pull request Aug 25, 2014
support rpath for GNU Fortran compiler.
@juliantaylor
Copy link
Contributor

thanks pushed as 79d3635

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.

2 participants
0