Skip to content

n-dhcp4 fails to build with clang and ASan #49

@evverx

Description

@evverx

It was addressed in n-dhcp4 itself in #38 but it seems the c-siphash submodule hasn't been bumped yet. Is there any chance it can be bumped to something containing c-util/c-siphash@203347c?

CC=clang CFLAGS='-fsanitize=address -g -O1 -fno-omit-frame-pointer' meson -Db_lundef=false build
ninja -C ./build/ -v
...
[15/47] clang  -o subprojects/c-siphash/src/libcsiphash.so.0 subprojects/c-siphash/src/libcsiphash-private.a.p/c-siphash.c.o -Wl,--as-needed -Wl,--allow-shlib
-undefined -shared -fPIC -Wl,-soname,libcsiphash.so.0 -fsanitize=address -g -O1 -fno-omit-frame-pointer -Wl,--no-undefined -Wl,--version-script=/home/vagrant/
n-dhcp4/subprojects/c-siphash/src/libcsiphash.sym                                                                                                             
FAILED: subprojects/c-siphash/src/libcsiphash.so.0                                                                                                            
clang  -o subprojects/c-siphash/src/libcsiphash.so.0 subprojects/c-siphash/src/libcsiphash-private.a.p/c-siphash.c.o -Wl,--as-needed -Wl,--allow-shlib-undefin
ed -shared -fPIC -Wl,-soname,libcsiphash.so.0 -fsanitize=address -g -O1 -fno-omit-frame-pointer -Wl,--no-undefined -Wl,--version-script=/home/vagrant/n-dhcp4/
subprojects/c-siphash/src/libcsiphash.sym                                                                                                                     
/usr/bin/ld: /usr/bin/../lib/clang/20/lib/x86_64-redhat-linux-gnu/libclang_rt.asan_static.a(asan_rtl_static.cpp.o): in function `__asan_report_load1_asm':    
(.text.__asan_report_load1_asm+0x5): undefined reference to `__asan_report_load1'                                                                             
/usr/bin/ld: /usr/bin/../lib/clang/20/lib/x86_64-redhat-linux-gnu/libclang_rt.asan_static.a(asan_rtl_static.cpp.o): in function `__asan_report_load8_asm':    
(.text.__asan_report_load8_asm+0x5): undefined reference to `__asan_report_load8'                                                                             
/usr/bin/ld: /usr/bin/../lib/clang/20/lib/x86_64-redhat-linux-gnu/libclang_rt.asan_static.a(asan_rtl_static.cpp.o): in function `__asan_report_store8_asm':   
(.text.__asan_report_store8_asm+0x5): undefined reference to `__asan_report_store8'                                                                           
/usr/bin/ld: subprojects/c-siphash/src/libcsiphash-private.a.p/c-siphash.c.o: in function `c_siphash_init':                                                   
/home/vagrant/n-dhcp4/build/../subprojects/c-siphash/src/c-siphash.c:76:(.text+0x321): undefined reference to `__asan_memset'                                 
/usr/bin/ld: /home/vagrant/n-dhcp4/build/../subprojects/c-siphash/src/c-siphash.c:20:(.text+0x345): undefined reference to `__asan_report_load1'
...

(I can bump it before building it but it would be better if it was possible to drop that kludge)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions