Skip to content

Conversation

blink1073
Copy link
Contributor

No description provided.

@blink1073
Copy link
Contributor Author

@JohanMabille I'm out of my depth on this one. 😅

@JohanMabille
Copy link
Member

@blink1073 thanks for opening this, I totally forgot to update the wheel. I think you need to keep all the previous dependencies (including cppzmq and libzmq), and simply add the xeus-zmq package (between xeus and xeus-python); and of course bump the release versions of the xeus packages like you did.

@blink1073
Copy link
Contributor Author

It seems like there's some more cmake magic to do. I tried mucking around locally with include_directories and link_directories but couldn't figure it out.

   CMake Error at _skbuild/macosx-10.16-x86_64-3.7/cmake-build/_deps/xeus_zmq-src/CMakeLists.txt:88 (find_package):
    By not providing "Findxeus.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "xeus", but
    CMake did not find one.

    Could not find a package configuration file provided by "xeus" (requested
    version 3.0.0) with any of the following names:

      xeusConfig.cmake
      xeus-config.cmake

    Add the installation prefix of "xeus" to CMAKE_PREFIX_PATH or set
    "xeus_DIR" to a directory containing one of the above files.  If "xeus"
    provides a separate development package or SDK, be sure it has been
    installed.
  Building wheel for xeus-python (pyproject.toml): finished with status 'error'

@JohanMabille
Copy link
Member

That's weird, the cmake install files of xeus should be available, I will investigate over the week end

@JohanMabille
Copy link
Member

OK got it, a check is missing in xeus-zmq CMakeLists.txt. Sorry for that, fixing it now.

@blink1073
Copy link
Contributor Author

I added libuuid on Linux but it is still complaining about a missing -fPIC somewhere:

 FAILED: _deps/xeus-python-build/xpython_extension.cpython-37m-x86_64-linux-gnu.so
  : && /usr/bin/c++ -fPIC -Wunused-parameter -Wextra -Wreorder -std=c++14 -O3 -DNDEBUG  -flto -shared  -o _deps/xeus-python-build/xpython_extension.cpython-37m-x86_64-linux-gnu.so _deps/xeus-python-build/CMakeFiles/xpython_extension.dir/src/xpython_extension.cpp.o  _deps/xeus-python-build/libxeus-python.a  -lpthread  _deps/xeus_zmq-build/libxeus-zmq.a  _deps/libzmq-build/lib/libzmq.a  -lrt  /__w/xeus-python-wheel/xeus-python-wheel/_skbuild/linux-x86_64-3.7/cmake-install/lib/libcrypto.a  -lpthread  _deps/xeus-build/libxeus.a  /usr/lib/x86_64-linux-gnu/libuuid.a  /__w/xeus-python-wheel/xeus-python-wheel/_skbuild/linux-x86_64-3.7/cmake-install/lib/libsodium.a  -ldl  -lutil  -lrt && cd /__w/xeus-python-wheel/xeus-python-wheel/_skbuild/linux-x86_64-3.7/cmake-build/_deps/xeus-python-build && /usr/bin/strip /__w/xeus-python-wheel/xeus-python-wheel/_skbuild/linux-x86_64-3.7/cmake-build/_deps/xeus-python-build/xpython_extension.cpython-37m-x86_64-linux-gnu.so
  /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libuuid.a(libuuid_la-gen_uuid.o): relocation R_X86_64_TPOFF32 against `state_fd.6311' can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libuuid.a(libuuid_la-randutils.o): relocation R_X86_64_TPOFF32 against `ul_jrand_seed' can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: final link failed: Nonrepresentable section on output
  collect2: error: ld returned 1 exit status

@JohanMabille
Copy link
Member

JohanMabille commented Dec 5, 2022

Theoretically we're supposed to dowload the source, build it and link xeus with the static lib of libuuid; that is what this part of the cmake is supposed to do. And I can see it installed in the logs, what I don't understand is why it does not find it when building xeus, this part has not changed since last release (or at least not in a visible way).

@JohanMabille
Copy link
Member

I cannot reproduce locally, I need to setup a branch and instrument the cmake.

@SylvainCorlay
Copy link
Member

It seems that the build is linking against a system-install libuuid instead of the one we build statically.

@blink1073
Copy link
Contributor Author

It seems that the build is linking against a system-install libuuid instead of the one we build statically.

I added an apt-get install in e3f4e86 (#104) because prior to that the error was:

  /__w/xeus-python-wheel/xeus-python-wheel/_skbuild/linux-x86_64-3.7/cmake-build/_deps/xeus-src/src/xguid.cpp:20:23: fatal error: uuid/uuid.h: No such file or directory
   #include <uuid/uuid.h>
                         ^
  compilation terminated.

@JohanMabille
Copy link
Member

JohanMabille commented Dec 6, 2022

To summarize:

  • libuuid is correctly downloaded, built and installed in the building prefix, i.e. <something>/cmake-install/include.
  • the path where cmake searches the headers contains <something>/cmake-install/include/uuid but not <something>/cmake-install/include
  • xeus includes <uuid/uuid.h>

The correct fix is to have <something>/cmake-install/include in the search path for headers.

EDIT: in the previous versions of xeus, this path was added by cppzmq, which is not a dependency of xeus anymore. The way to add it again is to search for uuid/uuid.h and not uuid.h when calling find_path in the CMakeLists.txt of xeus.

@JohanMabille
Copy link
Member

Sooooo we need a release of xeus ;)

@blink1073
Copy link
Contributor Author

Nice work @JohanMabille!

@JohanMabille
Copy link
Member

@blink1073 thanks! And thank you for upgrading the wheel and initiating the investigations!

@JohanMabille JohanMabille merged commit d922bfc into jupyter-xeus:master Dec 6, 2022
@blink1073 blink1073 deleted the update-0.15 branch December 6, 2022 20:39
@blink1073
Copy link
Contributor Author

https://pypi.org/project/xeus-python/0.15.0/

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