Skip to content

xcpp::xdisplay fails with linking error #526

@hoorayphyer

Description

@hoorayphyer

I have the following code

#pragma cling add_library_path("/myhome/mambaforge/envs/cling/lib")
#pragma cling load("libxeus")
#pragma cling load("libxeus-cling")

#include <xcpp/xdisplay.hpp>

int a = 1;

xcpp::display(a)

which throws the following error (basically linker can't find xeus::xinterpreter::display_data.)

IncrementalExecutor::executeFunction: symbol 'ZN4xeus12xinterpreter12display_dataEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESF_SF' unresolved while linking [cling interface function]!
You are probably missing the definition of xeus::xinterpreter::display_data(nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator >, void>, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator >, void>, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator >, void>)
Maybe you need to load the corresponding shared library?
Interpreter Error:

I've created a virtual env cling and installed xeus-cling via mamba install xeus-cling -c conda-forge as instructed and verified that xeus is also installed. I also verified that libxeus.so existed under the lib.

I first tried without the three pragmas, then with, but either way I got the same error. In case it's relevant, I ran jupyter notebook without browser on a remote server, and did an ssh tunnel so as to open it locally where I encountered the above error.

Any help in this is much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions