Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488418 - dev-libs/openssl - Add gx86-multilib support
Summary: dev-libs/openssl - Add gx86-multilib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
: 504206 (view as bug list)
Depends on:
Blocks: gx86-multilib 385513 490156 493172 498010 499380 499382 499384 504134 505004
  Show dependency tree
 
Reported: 2013-10-17 20:03 UTC by Reinis Danne
Modified: 2014-05-14 11:33 UTC (History)
5 users (show)

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


Attachments
emul-linux-x86-baselibs-20131008-r5.ebuild.patch (emul-linux-x86-baselibs-20131008-r5.ebuild.patch,527 bytes, patch)
2013-10-17 20:03 UTC, Reinis Danne
Details | Diff
emul-linux-x86-baselibs_files_remove-native4.patch (emul-linux-x86-baselibs_files_remove-native4.patch,515 bytes, patch)
2013-10-17 20:04 UTC, Reinis Danne
Details | Diff
openssl-1.0.1e-r1.ebuild.patch (openssl-1.0.1e-r1.ebuild.patch,3.09 KB, patch)
2013-10-17 20:06 UTC, Reinis Danne
Details | Diff
openssl-1.0.1e-r3.ebuild.patch (patch,3.09 KB, patch)
2014-01-05 12:22 UTC, Kent Fredric (IRC: kent\n) (RETIRED)
Details | Diff
openssl-1.0.1e-r3.ebuild.patch (openssl-1.0.1e-r3.ebuild.patch,3.57 KB, patch)
2014-01-05 15:17 UTC, Michael Mair-Keimberger (iamnr3)
Details | Diff
openssl-1.0.1g.ebuild.patch (openssl-1.0.1g.ebuild.patch,3.42 KB, patch)
2014-05-04 10:17 UTC, Michael Mair-Keimberger (iamnr3)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Reinis Danne 2013-10-17 20:03:10 UTC
Part of emul-linux-x86-baselibs.

Reproducible: Always
Comment 1 Reinis Danne 2013-10-17 20:03:38 UTC
Created attachment 361152 [details, diff]
emul-linux-x86-baselibs-20131008-r5.ebuild.patch
Comment 2 Reinis Danne 2013-10-17 20:04:08 UTC
Created attachment 361154 [details, diff]
emul-linux-x86-baselibs_files_remove-native4.patch
Comment 3 Reinis Danne 2013-10-17 20:06:10 UTC
Created attachment 361156 [details, diff]
openssl-1.0.1e-r1.ebuild.patch
Comment 4 Fabio Erculiani (RETIRED) gentoo-dev 2013-12-29 18:32:54 UTC
Can we get this merged please?
Comment 5 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-01-05 12:00:51 UTC
Doesn't quite work as-is, needs gmp built with abi_x86_32, but doesn't depend as such, resulting in: 



+ x86_64-pc-linux-gnu-gcc -m32 -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_
ENDIAN -DTERMIO -Wall -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m -DSHA1
_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -O2 -pipe -fno-s
trict-aliasing -Wa,--noexecstack -Wl,-O1 -Wl,--as-needed -shared -Wl,-Bsymbolic -Wl,-soname=libcrypto.so.1.0.0 -o libcry
pto.so.1.0.0 -Wl,--whole-archive libcrypto.a -Wl,--no-whole-archive -L. -lgmp -ldl -lz
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64
-pc-linux-gnu/4.7.3/../../../libgmp.so when searching for -lgmp
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libgmp.so 
when searching for -lgmp
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status

Probably needs to depend on a few other 32bit things.
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2014-01-05 12:22:08 UTC
Created attachment 367068 [details, diff]
openssl-1.0.1e-r3.ebuild.patch

Here's the patch updated to apply vs -r3 in portage, and includes the USE dependencies to get GMP in abi_x86_32

Works for me.

Note; Needed a bit of munging because the existing code had a string replace that removed the string "[static-libs(+)]" from the LIB_DEPS string, and this of course failed when the source string became [static-libs(+), ] in 2 places.

So I did what seemed logical and just split it into 2 variables.
Comment 7 Michael Mair-Keimberger (iamnr3) 2014-01-05 15:17:25 UTC
Created attachment 367086 [details, diff]
openssl-1.0.1e-r3.ebuild.patch

(In reply to Kent Fredric from comment #6)
> Created attachment 367068 [details, diff] [details, diff]
> openssl-1.0.1e-r3.ebuild.patch
> 
> Here's the patch updated to apply vs -r3 in portage, and includes the USE
> dependencies to get GMP in abi_x86_32
> 
> Works for me.

Actually your were looking (and it was missing in the ebuild) for ${MULTILIB_USEDEP} :)

> 
> Note; Needed a bit of munging because the existing code had a string replace
> that removed the string "[static-libs(+)]" from the LIB_DEPS string, and
> this of course failed when the source string became [static-libs(+), ] in 2
> places.
> 
> So I did what seemed logical and just split it into 2 variables.

I don't know why this dependencies where set in this way, but maybe it's just old cruft.. I've changed it to use static-libs? in zlib and gmp. This turns on static-libs in zlib and gmp if openssl is build with "static-libs"

Furthermore i've also added a DOCS variable instead of dodoc. I've also moved the sed commend from src_unpack() to src_prepare() and killed src_unpack. I don't know why it was there and there might be a reason for it - if it was wrong feel free to update my patch again - however openssl builds fine :)

BTW, i've add the MULTILIB_USEDEP to mit-krb5 too, however this one isn't ported yet. Unless it doesn't need 32bit mit-krb5 for multilib it's actually broken for multilib and needs to be ported first. Another way would be disabling kerberos for multilib.

After all, this is quite a big ebuild and i'm pretty sure it needs more work..
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2014-03-11 13:47:05 UTC
*** Bug 504206 has been marked as a duplicate of this bug. ***
Comment 9 Michael Mair-Keimberger (iamnr3) 2014-05-04 10:17:38 UTC
Created attachment 376318 [details, diff]
openssl-1.0.1g.ebuild.patch

Updated patch for the latest openssl version.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-12 21:29:04 UTC
To get things moving a little faster, I've decided to commit openssl first and leave mit-krb5 support pending till it is converted as well.

+*openssl-1.0.2_beta1-r3 (12 May 2014)
+
+  12 May 2014; Michał Górny <mgorny@gentoo.org> +openssl-1.0.2_beta1-r3.ebuild:
+  Introduce multilib support, bug #488418.

Since this is keyword-free beta, I leave up to maintainers to decide how to move that into mainline. I can backport the patch if desired, or we can supposedly unmask it along with 1.0.2.

@iamnr3: could you explain all those headers you put in MULTILIB_WRAPPED_HEADERS? It seems to me that only openssl/opensslconf.h is necessary.
Comment 11 Michael Mair-Keimberger (iamnr3) 2014-05-13 18:02:12 UTC
> @iamnr3: could you explain all those headers you put in
> MULTILIB_WRAPPED_HEADERS? It seems to me that only openssl/opensslconf.h is
> necessary.

Hmm, i can't even remember looking at the Header files for openssl. I'm pretty sure i've just used the patches from Reinis Danne or Kent Fredric and updated those for newer versions + added the changes which i mentioned in the comments.