Skip to content
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

Conda packages (xeus-sql==0.2.1-hf52228f_2 + xeus==3.0.5-hac2b420_0) not working due to a (possible) ABI issue reg. nlohmann-json (Due to coinstallation with xeus-lua) #89

Open
camelusminimus opened this issue Jul 17, 2024 · 0 comments

Comments

@camelusminimus
Copy link

Hi,

Short Version

The issue as such seems to be that the inclusion of xeus-lua leads to a solution in the conda solver that selects xeus build 3.0.5-hac2b420_0 (instead of the slightly newer 3.0.5-hac2b420_1) that is incompatible with xeus-sql build 0.2.1-hf52228f_2.

Would it be possible to update the xeus conda package definition to include this incompatibility?

If I may ask something a bit less-on-topic, but related (i.e. would be a workaround)
Is it possible to install both xeus-sql and xeus-lua in individual conda envs, but have them working in the same jupyter lab? (Provided the kernelspec is provided correctly?)
Or could the two different versions of libxeus generate problems? I must admit my knowledge of the ins-and-outs of dynamic libraries in linux are a bit rusty, but since the two kernels would not be in the same process, it should work, right?

I am sorry but the exact division of labor betweet jupyter-server and the kernels (and stuff like magics...) is still beyond me.

Longer Version

I tried to experiment with xeus-sql (and xeus-lua), and installed it using conda. This results in the following packages being installed

> conda list '^xeus'
# packages in environment at /opt/ai-skills/python/conda/envs/base:
#
# Name                    Version                   Build  Channel
xeus                      3.0.5                hac2b420_0    conda-forge
xeus-lua                  0.7.5           lua54h00ab1b0_0    conda-forge
xeus-sql                  0.2.1                hf52228f_2    conda-forge
xeus-zmq                  1.0.2                h0541b36_1    conda-forge

Sadly it seams the thus installed xeus-sql and xeus version are not ABI compatible, due to the influence of nlohmann-json. On trying to use the kernel, the jupyter lab complains:

/opt/ai-skills/jupyter/conda/bin/xsql: symbol lookup error: /opt/ai-skills/jupyter/conda/bin/../lib/libxeus-sql.so.0: undefined symbol: _ZN4xeus12xinterpreter21internal_request_implERKN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEEE

After Demangling, this symbol ist

> c++filt "_ZN4xeus12xinterpreter21internal_request_implERKN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEEE"
xeus::xinterpreter::internal_request_impl(nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > const&)

Checking for a similarly starting symbol in the installed xeus library, I find:

$ nm /opt/ai-skills/python/conda/envs/base/lib/libxeus.so | grep _ZN4xeus12xinterpreter21internal_request_implERKN8nlohmann
0000000000043d60 T _ZN4xeus12xinterpreter21internal_request_implERKN8nlohmann10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEEE
000000000001a7d2 t _ZN4xeus12xinterpreter21internal_request_implERKN8nlohmann10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEEE.cold

Demangled:

$ c++filt "_ZN4xeus12xinterpreter21internal_request_implERKN8nlohmann10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEEE"
xeus::xinterpreter::internal_request_impl(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > > const&)

Can one specify incompatibilities on the build level in conda?
I think it is less important that xeus-lua and xeus-sql are installed at the same time, but rather that conda will not let me install such a combination in the first place, right?

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

No branches or pull requests

1 participant