Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 731262 - net-mail/fdm-2.0-r1 fails to compile: ld.lld: error: undefined symbol: strlcpy
Summary: net-mail/fdm-2.0-r1 fails to compile: ld.lld: error: undefined symbol: strlcpy
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: LD-is-lld, systemwide-lld
  Show dependency tree
 
Reported: 2020-07-07 10:27 UTC by Agostino Sarubbo
Modified: 2023-03-20 10:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,80.96 KB, text/plain)
2020-07-07 10:28 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-07-07 10:27:58 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-mail/fdm fails to compile.
Discovered on: amd64

NOTE:
This machine uses a clang/LLVM toolchain.
If you think that this issue is strictly related to clang/LLVM please block bug 408963. If you think that this issue isstrictly related to the LLD linker, please block bug 731004.
Comment 1 Agostino Sarubbo gentoo-dev 2020-07-07 10:28:03 UTC
Created attachment 648228 [details]
build.log

build log and emerge --info
Comment 2 Markus Peloquin 2021-01-09 04:50:25 UTC
Simple fix. I think AC_CHECK_DECL is just always wrong. I read through OpenSSH and it was using AC_CHECK_FUNCS for these.

diff -ru fdm-2.0.orig/configure.ac fdm-2.0/configure.ac
--- fdm-2.0.orig/configure.ac   2021-01-08 20:43:47.007041684 -0800
+++ fdm-2.0/configure.ac        2021-01-08 20:43:57.385042347 -0800
@@ -107,13 +107,13 @@
        AC_MSG_ERROR("libssl not found")
 fi
 
-AC_CHECK_DECL(strlcpy, found_strlcpy=yes, found_strlcpy=no)
+AC_CHECK_FUNC(strlcpy, found_strlcpy=yes, found_strlcpy=no)
 if test "x$found_strlcpy" = xyes; then
        AC_DEFINE(HAVE_STRLCPY)
 fi
 AM_CONDITIONAL(NO_STRLCPY, [test "x$found_strlcpy" = xno])
 
-AC_CHECK_DECL(strlcat, found_strlcat=yes, found_strlcat=no)
+AC_CHECK_FUNC(strlcat, found_strlcat=yes, found_strlcat=no)
 if test "x$found_strlcat" = xyes; then
        AC_DEFINE(HAVE_STRLCAT)
 fi
Comment 3 Agostino Sarubbo gentoo-dev 2022-01-17 08:25:37 UTC
tinderbox has reproduced this issue with version 2.0-r1 - Updating summary.
Comment 4 Markus Peloquin 2023-03-18 06:17:07 UTC
This is still an issue in 2.2. My fix from 26 months ago still works.

I don't know how I'm supposed to feel about running into this problem after all this time and finding my own bug report.
Comment 5 Markus Peloquin 2023-03-18 06:19:41 UTC
Also, I don't think it's accurate to say this is related to lld at all (bug 731004). The conftest doesn't link with AC_CHECK_DECL, it just compiles; it prints warnings, but it compiles.
Comment 6 Larry the Git Cow gentoo-dev 2023-03-18 21:54:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c56bfb9f4f4b728f0d9e47f1aac0be355ad5e1b3

commit c56bfb9f4f4b728f0d9e47f1aac0be355ad5e1b3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-03-18 21:54:02 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-03-18 21:54:38 +0000

    net-mail/fdm: fix configure w/ clang 16, fix strlcpy check
    
    Closes: https://bugs.gentoo.org/731262
    Thanks-to: Markus Peloquin <markus@cs.wisc.edu>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-mail/fdm/{fdm-2.2.ebuild => fdm-2.2-r1.ebuild} |  8 ++++++++
 net-mail/fdm/files/fdm-2.2-configure-strlcpy.patch | 20 ++++++++++++++++++++
 2 files changed, 28 insertions(+)
Comment 7 Markus Peloquin 2023-03-19 10:42:56 UTC
Thanks, Sam!
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-03-20 10:42:29 UTC
(In reply to Markus Peloquin from comment #7)
> Thanks, Sam!

No worries & I'm sorry for the silly wait. Cheers!