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

Include prims.o in libcamlrun_shared.so #13132

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

yallop
Copy link
Member

@yallop yallop commented Apr 27, 2024

I'd like to use libcamlrun_shared.so from other languages, but it has an undefined symbol caml_names_of_builtin_cprim:

$ python3 -c "import ctypes; ctypes.CDLL('runtime/libcamlrun_shared.so')"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: runtime/libcamlrun_shared.so: undefined symbol: caml_names_of_builtin_cprim

This PR includes prims.o in the shared object so that the symbol is no longer undefined:

$ python3 -c "import ctypes; ctypes.CDLL('runtime/libcamlrun_shared.so')"
$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants