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

Use libcxxwrap-julia directly #29

Merged

Conversation

SylvainCorlay
Copy link
Member

No description provided.

@SylvainCorlay
Copy link
Member Author

SylvainCorlay commented Dec 23, 2021

@SylvainCorlay SylvainCorlay force-pushed the use-libcxxwrap-julia branch 9 times, most recently from a59619b to 95ddca4 Compare December 24, 2021 11:39
@SylvainCorlay
Copy link
Member Author

Hey @barche (happy holidays!) I am working on updating the julia bindings stack here, and just released xtensor-julia 0.10.0.

In this PR, I am trying to test with conda's build of libcxxwrap, by

  • linking directly with it in the test of xtensor-julia
  • specifying the proper entry in Overrides toml when installing CxxWrap.

I have two questions:

  • why do I need CxxWrap.jl at all?
  • there seems to be some issue on OSX when doing this. C++ exception while wrapping module StdLib: Symbol for type CppBasicString was not found. Do you have any hints about what is going on?

@SylvainCorlay
Copy link
Member Author

Symbol for type CppBasicString was not found

It may be that the override is not properly handled on OS X, and two different libcxxwrap versions are used.

@SylvainCorlay SylvainCorlay force-pushed the use-libcxxwrap-julia branch 5 times, most recently from c2fab0e to 6d2b84d Compare December 26, 2021 16:09
@SylvainCorlay
Copy link
Member Author

Symbol for type CppBasicString was not found

It may be that the override is not properly handled on OS X, and two different libcxxwrap versions are used.

OK, using a symlink instead of an overrides yields the same result. So there is something about the way libcxxwrap is built on conda-forge for OSX that does not work for CxxWrap.jl.

@barche
Copy link

barche commented Dec 27, 2021

Hi Sylvain, happy holidays too :)

  • CxxWrap.jl is needed because some of the type mapping code is in Julia. This is no problem when compiling a wrapper, but when you want to use libcxxwrap-julia at runtime you also need the Julia part installed.
  • For the error my guess would be a version mismatch too, although the lates release of CxxWrap and libcxxwrap should match...

@SylvainCorlay
Copy link
Member Author

Thanks for responding.

Tag 0.8.3 is pointing to 15d30a1d5952ebacc6bb16a297a236b8be63b763.
libcxxwrap_julia_jll.j is pointing to 37743e11cda7363a17840fe2353ff78a7e964a2c.

Could the mismatch be due to the "bigobj" flag that was added between the two?

@barche
Copy link

barche commented Dec 28, 2021

It's not clear to me which libcxxwrap-julia is found, in the config output nothing is placed, because JlCxx_INCLUDE_DIRS is no longer defined, the location can now be obtained using e.g. get_target_property(JlCxx_location JlCxx::cxxwrap_julia LOCATION).

Still, it's probably picking up the right one from conda. I do think the symlink command has the wrong order here:

ln -s $CXXWRAP_PREFIX $CONDA_PREFIX

Although using the Overrides.toml should be cleaner, where is that set up?

@SylvainCorlay SylvainCorlay force-pushed the use-libcxxwrap-julia branch 2 times, most recently from 940956e to 9b2da09 Compare December 28, 2021 17:44
@SylvainCorlay
Copy link
Member Author

Thank you for your reply. I eventually got things to pass with the symlink. Now I have to find the right incantations of Overrides.toml to not have to do this.

@SylvainCorlay
Copy link
Member Author

Eventually I will try to make a conda package for CxxWrap.jl that depends on the conda package for libcxxwrap-julia. That will be a really good test case for the conda packaging of julia package. Really, the outstanding question is the one asked in JuliaInterop/CxxWrap.jl#309.

@SylvainCorlay SylvainCorlay merged commit e128859 into xtensor-stack:master Dec 28, 2021
@SylvainCorlay SylvainCorlay deleted the use-libcxxwrap-julia branch December 28, 2021 19:44
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.

2 participants