cyrusimap / cyrus-sasl

Other
128 stars 146 forks source link

No rule to make target 'kdf_hkdf_sha512.', needed by 'libsasl2.a'. Stop #841

Open olegrok opened 1 month ago

olegrok commented 1 month ago

I build library as external static project. So I get following error:

[  9%] Performing build step for 'bundled-sasl-project'
Making all in include
Making all in sasldb
Making all in common
Making all in lib
ln: failed to create symbolic link './db_none.c': File exists
ln: failed to create symbolic link './opaque.c': File exists
ln: failed to create symbolic link './opaque_impl.c': File exists
make[9]: *** No rule to make target 'kdf_hkdf_sha512.', needed by 'libsasl2.a'.  Stop.
make[8]: *** [Makefile:511: all] Error 2
make[7]: *** [Makefile:684: all-recursive] Error 1
make[6]: *** [Makefile:552: all] Error 2
make[5]: *** [CMakeFiles/bundled-sasl-project.dir/build.make:86: ../../../cyrus-sasl-prefix/src/cyrus-sasl-stamp/bundled-sasl-project-build] Error 2
make[4]: *** [CMakeFiles/Makefile2:2567: CMakeFiles/bundled-sasl-project.dir/all] Error 2
make[3]: *** [Makefile:156: all] Error 2
make[2]: *** [CMakeFiles/project.dir/build.make:86: project-prefix/src/project-stamp/project-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/project.dir/all] Error 2

Probably here it should be `kdf_hkdf_sha512.o' but changing this line didn't help.

https://github.com/cyrusimap/cyrus-sasl/blob/bd9146c25e3a6de45112b06b9f6ba8c81d0f9bd9/configure.ac#L636

But after I changed src as well it helped me (but started to fail with undefined symbols):

    if test "$enable_static" = yes; then
        SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/opaque.c \$(top_srcdir)/plugins/opaque_impl.c \$(top_srcdir)/plugins/kdf_hkdf_sha512.c"
        SASL_STATIC_OBJS="$SASL_STATIC_OBJS opaque.o opaque_impl.o kdf_hkdf_sha512.o"
        AC_DEFINE(STATIC_OPAQUE, [], [Link OPAQUE Statically])
    fi