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

Testing on Linux fails with 'undefined symbol: lua_getmetatable' #3

Open
drauschenbach opened this issue Jan 22, 2024 · 2 comments
Open

Comments

@drauschenbach
Copy link

On a Raspberry Pi 4 with Debian 12:

$ cargo build --features lua51
(success)

$ cd testcrate
$ cargo test --features lua51

running 2 tests
test test_encode_error ... FAILED
test test_encode_decode ... FAILED

failures:

---- test_encode_error stdout ----
Error: RuntimeError("error loading module 'ryaml' from file '/home/davidr/workspaces/lua-ryaml/target/debug/deps/libryaml.so':\n\t/home/davidr/workspaces/lua-ryaml/target/debug/deps/libryaml.so: undefined symbol: lua_getmetatable\nstack traceback:\n\t[C]: in ?\n\t[C]: in ?\n\t[C]: in function 'require'\n\t[string \"testcrate/tests/tests.rs:41:9\"]:2: in main chunk")
...
$ rustc -vV | sed -n 's|host: ||p'
aarch64-unknown-linux-gnu
@khvzak
Copy link
Owner

khvzak commented Jan 22, 2024

This is becase my testcrate does not has config for aarch64 to export symbols (from FAQ)
I'll fix it

@drauschenbach
Copy link
Author

drauschenbach commented Jan 25, 2024

This seems to work:

rustflags = ["-C", "link-args=-rdynamic"]

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

2 participants