Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 545086

Summary: mail-client/alpine-2.00-r5: /usr/lib64/libc-client.so: undefined reference to `crypt'
Product: Gentoo Linux Reporter: deference
Component: Current packagesAssignee: Net-Mail Packages <net-mail+disabled>
Status: RESOLVED NEEDINFO    
Severity: normal CC: gentoo.org, mjo
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=456928
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log
emerge --info
emerge -pqv
Diff that fixes existing files/2.00-c-client.patch

Description deference 2015-03-30 19:12:55 UTC
Created attachment 400194 [details]
Build log

When topal use flag is enabled then this bug shows up.
Comment 1 deference 2015-03-30 19:14:43 UTC
Created attachment 400196 [details]
emerge --info
Comment 2 deference 2015-03-30 19:15:35 UTC
Created attachment 400198 [details]
emerge -pqv
Comment 3 Terra 2015-08-04 16:09:24 UTC
Created attachment 408282 [details, diff]
Diff that fixes existing files/2.00-c-client.patch

I hit the same problem with: undefined reference to 'crypt'...

'topal' use flag is a red herring and isn't relevant:
[ebuild  N    ] mail-client/alpine-2.00-r5  USE="ipv6 nls ssl -chappa -doc -kerberos -ldap -onlyalpine -passfile -smime -spell -threads -topal"

The 'hammer' fix ended up having to modify files/2.00-c-client.patch as the position of -lcrypt is important when linking against -lc-client...

I have attached the patch, and even though it allows for a successful emerge, take it as a POC fix...

--
FutureQuest, Inc.
Terra
Comment 4 Michael Orlitzky gentoo-dev 2015-09-22 22:44:35 UTC
The last two comments on bug #456928 suggest that this is due to net-libs/c-client being underlinked.
Comment 5 Michael Orlitzky gentoo-dev 2017-02-04 16:22:16 UTC
I just dug into this over on the PHP bug. I think c-client should always pass -lcrypt on Linux... here's my comment from over there:

When building net-libs/c-client, there are a number of different "targets" listed in its Makefile. The one we wind up using is "lnx":

  if use kernel_linux ; then
    use pam && target=lnp passwdtype=pam || target=lnx passwdtype=std

However, "lnx" is...

  lnx:	# Linux non-shadow passwords

and that's clearly not us. In the "lnx" target, "-lcrypt" does not get appended to LDFLAGS. This looks a lot more promising:

  slx:	# Secure Linux
  ...
  BASELDFLAGS="-lcrypt"

I would suggest that net-mail@ change "lnx" to "slx" in the c-client ebuild. That should add "-lcrypt" to LDFLAGS and fix the issue.
Comment 6 Michael Orlitzky gentoo-dev 2017-02-26 22:39:47 UTC
I thought this was the same problem I had in PHP over in bug #456928. However, I was unable to reproduce the failure with the current version of alpine, and the old versions no longer build (I've since removed them). I did ultimately commit a new revision of c-client to fix the PHP thing.

Can one of the reporters please test the latest net-libs/c-client-2007f-r6 to see if you still experience this build failure? If the problem persists for you, I'll dig into it. Otherwise, it may have been fixed in one of those intermediate revisions.
Comment 7 Michael Orlitzky gentoo-dev 2017-03-24 15:12:05 UTC
(In reply to Michael Orlitzky from comment #6)
> 
> Can one of the reporters please test the latest net-libs/c-client-2007f-r6
> to see if you still experience this build failure? If the problem persists
> for you, I'll dig into it. Otherwise, it may have been fixed in one of those
> intermediate revisions.

Ping.. if we don't hear a failure report after a few months, I think it makes sense to close this as NEEDINFO or similar.
Comment 8 deference 2017-03-30 02:06:31 UTC
The problem was caused when the topal USE flag was set on the alpine package, that USE flag no longer exists on the package.
I have successfully built the latest stable alpine and c-client packages.
USE ==
c-client  chappa doc ipv6 kerberos ssl static-libs topal
alpine    chappa doc ipv6 kerberos smime spell ssl threads

If this is indeed the configuration needed that would ordinarily cause the failure then this bug can be closed.
Thanks
Comment 9 Michael Orlitzky gentoo-dev 2017-03-31 14:08:20 UTC
Thanks for the update. The comment #3 suggested that maybe USE=topal wasn't necessary, but I wasn't able to reproduce the failure without USE=topal, and none of the versions with the USE flag would compile any longer.

I'll leave this open for a few more days and then close it if I don't hear any bad news. Worst case, someone will file a new bug if there's another underlinking issue lurking in c-client.
Comment 10 Michael Orlitzky gentoo-dev 2017-04-07 00:02:32 UTC
I'm not sure if this is FIXED or OBSOLETE.. I guess you could say I... NEEDINFO?