Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337730 - mail-mta/ssmtp fails to link with gold linker
Summary: mail-mta/ssmtp fails to link with gold linker
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 00:08 UTC by Raymes Khoury
Modified: 2011-01-19 13:19 UTC (History)
0 users

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


Attachments
patch to make ssmtp link with gold (ssmtp-gold.patch,693 bytes, text/plain)
2010-09-17 00:14 UTC, Raymes Khoury
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raymes Khoury 2010-09-17 00:08:26 UTC
ssmtp fails to link with the gold linker because it requires that all libraries that are used be explicitly passed to the linker with the -l flag. In particular, the following error occurs during linking:

i686-pc-linux-gnu-gcc -L/build/x86-generic/lib -L/build/x86-generic/usr/lib -o ssmtp ssmtp.o arpadate.o base64.o xgethostname.o  -lssl -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_UNISTD_H=1 -DRETSIGTYPE=void -DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRNDUP=1 -DHAVE_STRSTR=1 -DREWRITE_DOMAIN=1 -DHAVE_SSL=1 -DSSMTPCONFDIR=\"/etc/ssmtp\" -DCONFIGURATION_FILE=\"/etc/ssmtp/ssmtp.conf\" -DREVALIASES_FILE=\"/etc/ssmtp/revaliases\"  -O2 -pipe -march=core2 -mtune=generic -mfpmath=sse -I/build/x86-generic/usr/include/ -I/build/x86-generic/include/ -gstabs
/usr/libexec/gcc/i686-pc-linux-gnu/ld: ssmtp.o: in function smtp_open:ssmtp.c(.text+0x1cf9): error: undefined reference to 'X509_free'

This can be fixed by passing the crypto library explicitly when the ssl library is used. See patch attached.

Reproducible: Always
Comment 1 Raymes Khoury 2010-09-17 00:14:09 UTC
Created attachment 247668 [details]
patch to make ssmtp link with gold
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-01-19 13:19:29 UTC
Sorry forgot to close this as it's fixed with -r8.