Comments (5)
In modern cmake, target_link_libraries
is also used for header-only libraries. If it cannot find it, it will assume that you are trying to link with a runtime called nlohmann_json whichbis whatbis happening here.
nlohmann_json and other dependencies should be installed with cmake in the same prefix (-D CMAKE_INSTALL_PREFIX).
Is this how you installed nlohmann_json?
from xeus.
I install nlohmann_json as follows, without specifying a prefix, as I did with the other dependencies:
git clone https://github.com/nlohmann/json && \
cd json && \
cmake . && \
make && \
make install
This installs into /usr/local:
-- Installing: /usr/local/include/nlohmann
-- Installing: /usr/local/include/nlohmann/json.hpp
-- Installing: /usr/local/lib/cmake/nlohmann_json/nlohmann_jsonConfig.cmake
-- Installing: /usr/local/lib/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
from xeus.
Ok, then /usr/local is your prefix!
(This should work with master, but we generally recommend to not use the tip of master for any software, but at least the latest released tag).
When building xeus, could you do
cmake -D CMAKE_INSTALL_PREFIX=/usr/local
and report the outcome?
from xeus.
I get the same:
/usr/bin/x86_64-linux-gnu-ld: cannot find -lnlohmann_json
collect2: error: ld returned 1 exit status
CMakeFiles/xeus.dir/build.make:435: recipe for target 'libxeus.so.1.0.1' failed
make[2]: *** [libxeus.so.1.0.1] Error 1
make[1]: *** [CMakeFiles/xeus.dir/all] Error 2
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/xeus.dir/all' failed
Makefile:129: recipe for target 'all' failed
You can see the full list within a Dockerfile I'm working on:
https://github.com/sdwfrost/polyglot-playground/blob/master/Dockerfile
from xeus.
@sdwfrost I figured it out. The latest release of nlohmann_json
made a backward incompatible change by adding a namespace to its cmake target names.
Cf. issue nlohmann/json#1243 and commit nlohmann/json@33a2154.
I am updating xeus to use the latest nlohmann_json
and these target names.
from xeus.
Related Issues (20)
- Provide a template function to instantiate a kernel HOT 2
- [Emscripten] generate NPM package content HOT 1
- RTTI is required HOT 2
- Provide a main helper function HOT 2
- Update documentation
- Misleading name print_starting_message HOT 3
- Linking with libuuid should be private HOT 1
- Build of xwidgets doesn't find libUUID HOT 2
- Releasing ressources on comm close triggered by frontend
- Hide the symbols by default on Linux and OSX
- Fix overloaded-virtual warning HOT 1
- Remove deprecated APIs
- `xin_memory_history_manager::get_range_impl()` sets `ename` twice
- `xkernel_core::execute_request` not setting `execution_count` from `p_interpreter->execute_request`
- xeus-lite kernel compilation error HOT 12
- Error in install: mamba: error: unrecognized arguments: -c conda-forge HOT 1
- ABI break with minor version bump in nlohmann::json HOT 2
- Parent header PR: update documentation
- How to append to the output of a cell? HOT 3
- Hide the implementation of comm_manager getters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xeus.