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

On macos, depqbf gives a Dl error #4

Closed
wants to merge 5 commits into from
Closed

Conversation

maelvls
Copy link
Collaborator

@maelvls maelvls commented Sep 8, 2017

Dear Simon,

Yesterday, I tried to use DepQBF because Quantor is unable to give a value for some outer-scope existential variables.

I installed depqbf using opam install depqbf (macos). But when running make test:

Fatal error: exception Dl.DL_error("dlsym(RTLD_DEFAULT, qdpll_delete): symbol not found")

After some (extensive) search, I found the issue yallop/ocaml-ctypes#41 talking about this specific problem. Apparently, even though the static libqdpll.a is the one selected (I double checked by removing the dynamic library), the symbol is not imported in the final binary (same error for byte or native).

To work around this problem, I have changed in _oasis (in the qbf-depqbf section)

CCLib: -L/usr/local/lib/ -lqdpll

to

CCLib: "-force_load /usr/local/lib/libqdpll.a"

This solves the problem and make test works on both ubuntu and macos (provided that libffi-dev is installed on ubuntu and libffi installed on macos using brew).


Side note: I also added some comments in the README in order to debug the most common issues.

@maelvls maelvls force-pushed the fix/mac-depqbf branch 2 times, most recently from 3b818dc to 637a560 Compare September 8, 2017 15:01
@c-cube
Copy link
Owner

c-cube commented Sep 9, 2017

Is it specific to clang? gcc seems to fail (see travis build).

edit: ah, I see that some commits address this. I'll wait for CI, thanks for the contribution anyway!

@maelvls
Copy link
Collaborator Author

maelvls commented Sep 9, 2017

The -force_load seems to be clang-specific; so I changed _oasis to

if system(macosx)
    CCLib:              -force_load /usr/local/lib/libqdpll.a
  else
    CCLib:              -L/usr/local/lib -lqdpll

I am still struggling with the installation of qdpll.a on linux (on macos, brew install depqbf is enough; apt install depqbf only installs the binary).
I'll fix the

@c-cube
Copy link
Owner

c-cube commented Sep 17, 2017

Do you think this is ready to merge? The failures on travis seem to be due to problems with installing depqbf…

@maelvls
Copy link
Collaborator Author

maelvls commented Sep 17, 2017 via email

@c-cube
Copy link
Owner

c-cube commented Jan 10, 2021

would this still make sense?

@maelvls
Copy link
Collaborator Author

maelvls commented Jan 10, 2021

It doesn’t make sense anymore since the new dune config does not allow us to build with depqbf 😅

I’ll close it for now

@maelvls maelvls closed this Jan 10, 2021
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