Giter Club home page Giter Club logo

bug-cmake's Introduction

Reproducer for CMake bug

This issue occurs only with the CMake version available via module, i.e. CMake/3.14.5 via /apps/daint/UES/jenkins/7.0.UP02/gpu/easybuild/modules/all. If I use the system-wide version /usr/bin/cmake there is no problem.

To reproduce the issue with this repo, clone and compile with the following commands on Piz Daint:

# load modules
module load daint-gpu CMake cray-python

# get the reproducer
git clone https://github.com/bcumming/bug-cmake.git --recursive

cd bug-cmake
mkdir build
cd build
cmake ..

This produces a CMake warning:

CMake Warning (dev) at pybind11/tools/pybind11Tools.cmake:147 (add_library):
  ADD_LIBRARY called with MODULE option but the target platform does not
  support dynamic linking.  Building a STATIC library instead.  This may lead
  to problems.
Call Stack (most recent call first):
  CMakeLists.txt:14 (pybind11_add_module)

There is an error when trying to use the generated module:

# first run make
make

# then try to load the module
python -c 'import tmod; print(tmod.add(20,22))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: /users/bcumming/pytest/build/tmod.cpython-38-x86_64-linux-gnu.so: invalid ELF header

Note the error occurs on the import statement, not the print.

I need a higher version of cmake for my project, which also breaks with the same warning.

bug-cmake's People

Contributors

bcumming avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.