Noah Watkins <n...@redpanda.com> writes:

> Making it through
> further in the compilation process, though, we start to hit more
> undefined references with the sanitizers turned on with clang16:
>
> ```
> clang -fsanitize=address -fsanitize=leak -g -O2 -ggdb3 -Wall -W
> -Wno-sign-compare   -Wmissing-prototypes -Wmissing-declarations
> -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast
> -Wnested-externs -L.. -fsanitize=address -fsanitize=leak sexp-conv.o
> input.o output.o parse.o misc.o ../getopt.o ../getopt1.o -lnettle
> -lgmp  -o sexp-conv
> /usr/bin/ld: ../libnettle.so: undefined reference to
> `_nettle_aes192_encrypt_aesni'

This, and the other missing symbols, appear to all be for symbols that
are expected to be defined in assembly files. E.g, in my x86_64 build,
this symbol should be defined in the object file produced by these build
rules:

  /usr/bin/m4 /home/nisse/hack/nettle/m4-utils.m4 
/home/nisse/hack/nettle/asm.m4 config.m4 machine.m4 aes192-encrypt-2.asm 
>aes192-encrypt-2.s
  gcc -I.  -DHAVE_CONFIG_H -g -O2 -ggdb3 -Wall -W -Wno-sign-compare 
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith 
-Wbad-function-cast -Wnested-externs -fpic -MT aes192-encrypt-2.o -MD -MP -MF 
aes192-encrypt-2.o.d  -c aes192-encrypt-2.s

As can be verified with 

  $ nm aes192-encrypt-2.o 
  0000000000000000 T _nettle_aes192_encrypt_aesni

So you need to investigate what corresponding steps produce in your build.

(Maybe it would make sense to change the Makefile rules to not use $(CC)
for processing assembly files, but traditionally, unix C compilers do
the right thing in that case).

Also double check that you do a make distclean or use a fresh build
directory when changing configure options, since you can get all sorts
of weird errors if you have inconsstent object files lying around.
 
Regards,
/Niels

-- 
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
_______________________________________________
nettle-bugs mailing list -- nettle-bugs@lists.lysator.liu.se
To unsubscribe send an email to nettle-bugs-le...@lists.lysator.liu.se

Reply via email to