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

Serialization not working in macOS #69

Closed
harshkasyap opened this issue Oct 9, 2023 · 1 comment · Fixed by #120
Closed

Serialization not working in macOS #69

harshkasyap opened this issue Oct 9, 2023 · 1 comment · Fixed by #120
Labels
bug Something isn't working
Milestone

Comments

@harshkasyap
Copy link

harshkasyap commented Oct 9, 2023

While running openfhe-python/examples/pke/simple-integers-serial.py

RuntimeError: Trying to save an unregistered polymorphic type (lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint>>>).
Make sure your type is registered with CEREAL_REGISTER_TYPE and that the archive you are using was included (and registered with CEREAL_REGISTER_ARCHIVE) prior to calling CEREAL_REGISTER_TYPE.
If your type is already registered and you still see this error, you may need to use CEREAL_REGISTER_DYNAMIC_INIT.

Environment: Prepared a Conda environment on Apple M2 Pro, and able to run other examples.

However, it worked for me, in Linux environment.

@yspolyakov yspolyakov added this to the Release 0.8.2 milestone Oct 27, 2023
@yspolyakov yspolyakov added the bug Something isn't working label Oct 27, 2023
@yspolyakov yspolyakov modified the milestones: Release 0.8.2, Release 0.8.3 Nov 9, 2023
@yspolyakov yspolyakov modified the milestones: Release 0.8.3, Future Releases Dec 1, 2023
@yspolyakov yspolyakov changed the title Serialization error Serialization error in macOS Mar 12, 2024
@yspolyakov yspolyakov changed the title Serialization error in macOS Serialization not working in macOS Mar 12, 2024
@yspolyakov yspolyakov linked a pull request Mar 12, 2024 that will close this issue
yspolyakov added a commit that referenced this issue Mar 13, 2024
Fixes issue with serialization on Apple devices (#69)
@geethasitaraman
Copy link

geethasitaraman commented Apr 21, 2024

@yspolyakov I get the same error when running the c++ version of this app((openfhe-development). I am running it on a Mac M2 pro.

./simple-integers-serial
This program requres the subdirectory `demoData' to exist, otherwise you will get an error writing serializations.

The cryptocontext has been generated.
libc++abi: terminating due to uncaught exception of type cereal::Exception: Trying to save an unregistered polymorphic type (lbcrypto::CryptoParametersBFVRNS).
Make sure your type is registered with CEREAL_REGISTER_TYPE and that the archive you are using was included (and registered with CEREAL_REGISTER_ARCHIVE) prior to calling CEREAL_REGISTER_TYPE.
If your type is already registered and you still see this error, you may need to use CEREAL_REGISTER_DYNAMIC_INIT.
zsh: abort      ./simple-integers-serial

I tried adding the change you made to the cmakelists.txt on the root and rebuild it but no luck


if (APPLE)
    set(CMAKE_CXX_VISIBILITY_PRESET default)
endif()

@jkav77 fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants