pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/47829: mail/dkim-milter: missing RPATH when linking agains OpenSSL from pkgsrc
>Number: 47829
>Category: pkg
>Synopsis: mail/dkim-milter: missing RPATH when linking agains OpenSSL
>from pkgsrc
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 17 21:50:00 +0000 2013
>Originator: Jukka Salmi
>Release: pkgsrc HEAD and 2013Q1
>Environment:
System: NetBSD rho.salmi.ch 5.2_STABLE NetBSD 5.2_STABLE (XEN3_DOMU) #0: Sun
May 12 18:47:35 CEST 2013
root%pi.salmi.ch@localhost:/b/build/nbsd/5/amd64/sys/arch/amd64/compile/XEN3_DOMU
amd64
Architecture: x86_64
Machine: amd64
>Description:
When using OpenSSL from pkgsrc, mail/dkim-milter builds fine but fails
to start due to OpenSSL libraries which can't be found:
$ ldd /usr/pkg/libexec/dkim-filter
/usr/pkg/libexec/dkim-filter:
-lresolv.1 => /usr/lib/libresolv.so.1
-lc.12 => /usr/lib/libc.so.12
-lutil.7 => /usr/lib/libutil.so.7
-lssl.1.0.0 => not found
-lcrypto.1.0.0 => not found
-lpthread.0 => /usr/lib/libpthread.so.0
And indeed there's no RPATH set:
$ readelf -d libexec/dkim-filter
Dynamic section at offset 0x2f1a8 contains 22 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libresolv.so.1]
0x0000000000000001 (NEEDED) Shared library: [libutil.so.7]
0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.0.0]
0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.0.0]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.12]
0x000000000000000c (INIT) 0x403120
[...]
>How-To-Repeat:
Set PREFER.openssl=pkgsrc in mk.conf(5), build mail/dkim-milter and try
to start it. It will fail, printing
Shared object "libssl.so.1.0.0" not found
>Fix:
As a workaround, set
dkimfilter_env='LD_LIBRARY_PATH=/usr/pkg/lib'
in rc.conf(5).
I'm not sure how to fix it correctly, but the following patch seems to
do the trick on a NetBSD/amd64 5.2_STABLE system when building
mail/dkim-milter from pkgsrc-2013Q1:
--- devtools/Site/site.config.m4.orig 2013-05-17 23:12:17.000000000 +0200
+++ devtools/Site/site.config.m4 2013-05-17 23:12:52.000000000 +0200
@@ -187,6 +187,7 @@ dnl APPENDDEF(`conf_dkim_filter_ENVDEF',
dnl path fixes for pkgsrc
dnl
define(`confINCLUDEDIR', `@PREFIX@/include')
+define(`confLDOPTS', `-Wl,-rpath @PREFIX@/lib')
define(`confLIBDIR', `@PREFIX@/lib')
define(`confSBINDIR', `@PREFIX@/sbin')
define(`confUBINDIR', `@PREFIX@/bin')
Home |
Main Index |
Thread Index |
Old Index