trusteddomainproject / OpenDMARC

This is the Trusted Domain Project's impementation of the DMARC protocol libary and mail filter, called OpenDMARC. A "milter" connects to unix-based mailers (originally, sendmail, but now many) and provides a standard filtering API.
Other
100 stars 53 forks source link

configure.ac change for res_ndestroy breaks build #76

Closed gene-git closed 3 years ago

gene-git commented 3 years ago

The change to use res_ndestroy() fails on my system which does not have the function - it uses res_nclose(). This changes replaces res_nclose() with res_ndestroy() which is non-existent. glibc 2.32 on linux

Somehow the configure incorrectly finds res_ndestoy() which causes the ld to fail with missing function.

This is in develop branch thanks.

martinbogo commented 3 years ago

This is a high priority fix, will do ASAP by testing in configure.ac during the autoconf process.

gene-git commented 3 years ago

great thanks.

foxxx0 commented 3 years ago

I've just tried to build the 1.4.0 release on Arch Linux and ran into the exact same issue. So while it was deemed high priority, it has somehow not made it into the 1.4.0 release.

libtool: link: gcc -I /usr/include/spf2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/opendmarc-check opendmarc_check-opendmarc-check.o  -L/usr/lib/ ../libopendmarc/.libs/libopendmarc.so -lresolv -lm -lspf2 -lbsd -lrt -lidn
/usr/bin/ld: ../libopendmarc/.libs/libopendmarc.so: undefined reference to `res_ndestroy'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:532: opendmarc-check] Error 1

full build log: https://paste.foxxx0.de/3x5pXZ/

gene-git commented 3 years ago

you likely did this - but you can use this patch in your build script (PKGBUILD)

--- configure.ac.orig   2020-10-21 15:11:43.763378497 -0400
+++ configure.ac        2020-10-21 15:12:00.516786462 -0400
@@ -139,15 +139,9 @@
 AC_SEARCH_LIBS(res_ninit, resolv,
        AC_DEFINE(HAVE_RES_NINIT, 1,
        [Define to 1 if you have the `res_ninit()' function.]))
-AC_SEARCH_LIBS(res_ndestroy, resolv,
-        AC_DEFINE(HAVE_RES_NDESTROY, 1,
-        [Define to 1 if you have the `res_ndestroy()' function.]))
 AC_SEARCH_LIBS(__res_ninit, resolv,
         AC_DEFINE(HAVE_RES_NINIT, 1,
         [Define to 1 if you have the `__res_ninit()' function.]))
-AC_SEARCH_LIBS(__res_ndestroy, resolv,
-        AC_DEFINE(HAVE_RES_NDESTROY, 1,
-        [Define to 1 if you have the `__res_ndestroy()' function.]))

 m4_rename_force([saved_AC_LANG_CALL], [AC_LANG_CALL])
 AC_CHECK_LIB(idn, idn_free)
foxxx0 commented 3 years ago

With that patch it compiles and passes the fairly small test suite. Removing these two lib searches will cause the binary not being linked to that and thus not contain the problematic references, which are not available in glibc >=2.32 anymore, correct?

Would be great to have at least a quick response from one of the authors/maintainers of opendmarc whether this is an acceptable workaround for downstreams right now and if they plan to incorporate a proper fix upstream for the next release.

gene-git commented 3 years ago

Correct It just removes the references in build system from trying to use now non-existent functions.

This project along with opendkim and openarc are basically dead - we should be migrating to alternatives for the arc stack (dkim/dmarc/arc). If you find good alternative let me know please. I'm aware of rspamd but it has a lot of stuff and I am not familiar enough with it to understand if the arc stack it has is solid or not - but at least it is an active project.

I prefer a tool to do one thing and do it well rather than a swiss army knife with many tools, but often not all tools are strong.

Bit sad these openXarc projects are not alive but is what it is.

Be great if someone knowledgeable would fork them and carry things forward - I have not found anyone or a fork either. Don't hold your breath for any developer to respond or do anything unfortunately.

foxxx0 commented 3 years ago

Sadly enough I'm all too aware of the state that opendkim/opendmarc are in. Same for me with respect to rspamd, my amavisd setup is just working too good and took quite some time and effort to get it tweaked into it current state, that it just seems unfeasable to replace all of it with rspamd in another huge effort. Mail sucks :disappointed:

I've pushed a patched opendmarc-1.4.0-1 to the archlinux testing repository, for now it seems to work as expected.

thegushi commented 3 years ago

Hey there. I'm the FreeBSD port maintainer for opendmarc. I've been in touch with MSK out of band, and it would be way easier if these were made into pull requests. Could that be done? If not, I can go in and create my own repo with a corresponding pull request. Just let me know how to proceed.

thegushi commented 3 years ago

Pull request #96 seems to have an alternate way of addressing this. that said, it also has yet another copy of the fixing the doc entry in the makefile.ac, so I'm going to need to split that out.

In the meantime, I'm going to spin up a copy of a test VM running arch Linux to try and QA that's because we've had several bugs logged against it.

hdatma commented 3 years ago

This project along with opendkim and openarc are basically dead

I cast my vote for a unified source: SPF, DKIM, DMARC, ARC, with a single milter. Leaner, faster, better.

martinbogo commented 3 years ago

This project along with opendkim and openarc are basically dead

... except that Google just made it a mandatory requirement, followed by Apple, Microsoft and a host of other companies. With the increased activity, and interest, we're getting the band back together. It's just a lot of hard, often thankless work to do it.

-Martin ( patch guru )

On Tue, Mar 9, 2021 at 7:04 AM Rupert notifications@github.com wrote:

This project along with opendkim and openarc are basically dead

I cast my vote for a unified source: SPF, DKIM, DMARC, ARC, with a single milter. Leaner, faster, better.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/trusteddomainproject/OpenDMARC/issues/76#issuecomment-793871098, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB5KKPABHMLLQOVDOK3RFDTCYMEXANCNFSM4S2HGAIA .

gene-git commented 3 years ago

Hey martin - thats really great to hear. Understand not enough recognition, but thank you from me as a start :)

thegushi commented 3 years ago

Hey there Gene and others. In my recent autoconf fixes I also committed a fix for this issue. You know, because messing with automake files and m4 macros is the best way to have a soothing friday.

If you're seeing clean builds with this one, please also comment here as well. (testing branch, currently at f3d304d)

gene-git commented 3 years ago

Confirmed - removed all local patches and did a clean build of testing branch (commit f3d304dd86da80 ) - all good.

thank you

(autoconf 2.71 on arch linux)

gene-git commented 3 years ago

Should we close this one now?

martinbogo commented 3 years ago

If the PR and merge look clean, I can do it. hopefully Dan will have commit access ?soon?

-Martin

On Fri, Mar 12, 2021 at 6:56 PM Gene @.***> wrote:

Should we close this one now?

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/trusteddomainproject/OpenDMARC/issues/76#issuecomment-797836170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB5KKJKBFQI3JP55HOHRI3TDKSZRANCNFSM4S2HGAIA .

thegushi commented 3 years ago

Dan has it now. How do you think this got onto the official testing branch.

But any actual code changes, especially while I’m new to the project, I appreciate second pair of eyes.

-Dan

On Mar 12, 2021, at 7:37 PM, Martin Bogomolni @.***> wrote:

If the PR and merge look clean, I can do it. hopefully Dan will have commit access ?soon?

-Martin

On Fri, Mar 12, 2021 at 6:56 PM Gene @.***> wrote:

Should we close this one now?

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/trusteddomainproject/OpenDMARC/issues/76#issuecomment-797836170, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB5KKJKBFQI3JP55HOHRI3TDKSZRANCNFSM4S2HGAIA .

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/trusteddomainproject/OpenDMARC/issues/76#issuecomment-797859372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIWKKHT5RAP33XPII7WH63TDLMXVANCNFSM4S2HGAIA.

thegushi commented 3 years ago

Confirmed this all works well. Closing it out.