Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370105 - net-analyzer/sslsniff fails because of underlinking
Summary: net-analyzer/sslsniff fails because of underlinking
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: underlinking
  Show dependency tree
 
Reported: 2011-06-05 11:59 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2012-12-07 16:01 UTC (History)
2 users (show)

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


Attachments
Build log (sslsniff-0.6:20110605-031354.log,17.41 KB, text/plain)
2011-06-05 11:59 UTC, Diego Elio Pettenò (RETIRED)
Details
sslsniff-0.8-underlinking.patch (sslsniff-0.8-underlinking.patch,1.62 KB, patch)
2011-11-18 17:52 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-05 11:59:34 UTC
Created attachment 275889 [details]
Build log

Hello there!

You're getting this bug because the package in Summary failed to build in my tinderbox using the gold link editor from binutils. Before closing the bug as INVALID let me explain why this is still important!

The gold link editor does not support underlinking of shared objects, which is something I have described in my blog post:

http://blog.flameeyes.eu/2010/11/26/it-s-not-all-gold-that-shines-why-underlinking-is-a-bad-thing

Even the basic link editor (ld.bfd) has an option to support this but it is a heck to enable and get passed, so linking with gold is simply quicker.

Fixing underlinking provides optimized --as-needed builds (because the "softer" version no longer need to recover libraries that are underlinked), so it is a Good Thing To Do.

Thank you very much for the attention!
Comment 1 Kevin Pyle 2011-06-11 03:37:47 UTC
Output file "sslsniff" needs libboost_system.so and libcrypto.so, but does not request them.  Adding "-lboost_system -lcrypto" to the link line should fix it.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-18 17:52:34 UTC
Created attachment 292999 [details, diff]
sslsniff-0.8-underlinking.patch

Use pkgconfig to get openssl libraries (configure.ac) and add -lboost_system to LDFLAGS.

Also needs these changes to the ebuild:

Index: sslsniff-0.8.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/sslsniff/sslsniff-0.8.ebuild,v
retrieving revision 1.1
diff -u -B -r1.1 sslsniff-0.8.ebuild
--- sslsniff-0.8.ebuild 2 Oct 2011 01:27:31 -0000       1.1
+++ sslsniff-0.8.ebuild 18 Nov 2011 17:50:32 -0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/sslsniff/sslsniff-0.8.ebuild,v 1.1 2011/10/02 01:27:31 robbat2 Exp $
 
-EAPI=2
+EAPI=4
 inherit autotools eutils
 
 DESCRIPTION="MITM all SSL connections on a LAN and dynamically generates certs"
@@ -14,12 +14,14 @@
 KEYWORDS="~amd64 ~x86"
 IUSE=""
 
-DEPEND="dev-libs/boost
+DEPEND="dev-util/pkgconfig"
+CDEPEND="dev-libs/boost
        dev-libs/log4cpp
        dev-libs/openssl"
+RDEPEND="${CDEPEND}"
 
 src_prepare() {
-       epatch "${FILESDIR}"/${PN}-0.6-asneeded.patch
+       epatch "${FILESDIR}"/${P}-underlinking.patch
        eautoreconf
 }
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-18 17:56:11 UTC
(In reply to comment #2)
> Created attachment 292999 [details, diff] [details, diff]
> sslsniff-0.8-underlinking.patch
> 
> Use pkgconfig to get openssl libraries (configure.ac) and add -lboost_system > to LDFLAGS.

Maybe AC_SUBST(openssl_LIBS) isn't even needed. I haven't checked.
Comment 4 Rick Farina (Zero_Chaos) gentoo-dev 2012-12-07 15:31:25 UTC
Can I get a bump on this from someone that know how to test if "AC_SUBST(openssl_LIBS)" is needed?

Feel free to fix it however you see fit, as long as you sanely tested.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-07 16:01:28 UTC
Fixed in 0.8-r1.