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

Libcbor: does not compile: ends with "cannot find -lasan/-lubsan" #25348

Open
pwned-pixel opened this issue Nov 14, 2024 · 0 comments
Open

Libcbor: does not compile: ends with "cannot find -lasan/-lubsan" #25348

pwned-pixel opened this issue Nov 14, 2024 · 0 comments

Comments

@pwned-pixel
Copy link

pwned-pixel commented Nov 14, 2024

PKG_MAINTAINER:= Linos Giannopoulos [email protected]
Maintainer: @linosgian
Environment: OpenWrt SNAPSHOT as of today with commit 0e59eaa / Packages as of today with commit 78ccd86
Host system: ArchLinux (latest)

Libcbor compile ends with:

/home/pwned/nolf/openwrt/tchain14/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-musl/14.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld.bfd: cannot find -lasan: No such file or directory
/home/pwned/nolf/openwrt/tchain14/toolchain/bin/../lib/gcc/aarch64-openwrt-linux-musl/14.2.0/../../../../aarch64-openwrt-linux-musl/bin/ld.bfd: cannot find -lubsan: No such file or directory

Disabling the bug detector is "fixing" it:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,7 +55,7 @@
     add_definitions(-DPRINT_FUZZ)
 endif(PRINT_FUZZ)
 
-option(SANITIZE "Enable ASan & a few compatible sanitizers in Debug mode" ON)
+option(SANITIZE "Enable ASan & a few compatible sanitizers in Debug mode" OFF)
 
 set(CPACK_GENERATOR "DEB" "TGZ" "RPM")
 set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")

I've tested gcc14 only. No clue if it hits on gcc13 as well. Let me know if I have to test.
Came across this by accidentally enabling libfido2 support for openssh-server. It is pulling this lib.
If more output is needed let me know. There are some unrelated warnings (e.g. "Policy CMP0054 is not set" and "-Wreturn-type errors within src/cbor.c and src/cbor/serialization.c and src/cbor/ints.c) also.

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

1 participant