Your message dated Sun, 03 Apr 2016 12:22:53 +0000
with message-id <[email protected]>
and subject line Bug#813659: fixed in libcrypto++ 5.6.3-4
has caused the Debian Bug report #813659,
regarding libcrypto++: FTBFS on x32
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
813659: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813659
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libcrypto++
Version: 5.6.1-9
Severity: normal
Tags: patch

Hi!

libcrypto++ currently fails to build on x32.  This is caused by attempts to
use x86 assembly -- the package would build if it used the portable generic
code instead.

Here's a patch.  It's a hybrid between disabling assembly and making it work
-- in most places, it works without changes.  In one place, it tried to
access a 32-bit variable of type size_t as a 64-bit value, so changing the
type to word64 works.  I did disable the assembly in two places -- whirlpool
where it doesn't build (insanely macroized code makes it thoroughly
unobvious) and rijndael which did compile but segfaults in the testsuite.

The patch could be simpler by disabling assembly outright, or more complete
by fixing pieces I disabled, but it's probably ok for a first stab.



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: x32 (x86_64)

Kernel: Linux 4.4.0-x32 (SMP w/6 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
--- libcrypto++-5.6.1.orig/cpu.h
+++ libcrypto++-5.6.1/cpu.h
@@ -96,6 +96,8 @@ _mm_aesdeclast_si128 (__m128i a, __m128i
 
 NAMESPACE_BEGIN(CryptoPP)
 
+#define X32 (defined __ILP32__ && defined __x86_64__)
+
 #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X64
 
 #define CRYPTOPP_CPUID_AVAILABLE
--- libcrypto++-5.6.1.orig/rijndael.cpp
+++ libcrypto++-5.6.1/rijndael.cpp
@@ -348,7 +348,7 @@ void Rijndael::Base::UncheckedSetKey(con
 
 void Rijndael::Enc::ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const
 {
-#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) || CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE
+#if (CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) || CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE) && !X32
 	if (HasSSE2())
 	{
 		Rijndael::Enc::AdvancedProcessBlocks(inBlock, xorBlock, outBlock, 16, 0);
@@ -1179,7 +1179,7 @@ size_t Rijndael::Enc::AdvancedProcessBlo
 		return AESNI_AdvancedProcessBlocks(AESNI_Enc_Block, AESNI_Enc_4_Blocks, (const __m128i *)m_key.begin(), m_rounds, inBlocks, xorBlocks, outBlocks, length, flags);
 #endif
 	
-#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && !X32 || defined(CRYPTOPP_X64_MASM_AVAILABLE)
 	if (HasSSE2())
 	{
 		if (length < BLOCKSIZE)
--- libcrypto++-5.6.1.orig/vmac.cpp
+++ libcrypto++-5.6.1/vmac.cpp
@@ -735,7 +735,7 @@ size_t VMAC_Base::HashMultipleBlocks(con
 	return remaining;
 }
 
-static word64 L3Hash(const word64 *input, const word64 *l3Key, size_t len)
+static word64 L3Hash(const word64 *input, const word64 *l3Key, word64 len)
 {
     word64 rh, rl, t, z=0;
 	word64 p1 = input[0], p2 = input[1];
--- libcrypto++-5.6.1.orig/whrlpool.cpp
+++ libcrypto++-5.6.1/whrlpool.cpp
@@ -391,7 +391,7 @@ static const word64 Whirlpool_C[4*256+R]
 // Whirlpool basic transformation. Transforms state based on block.
 void Whirlpool::Transform(word64 *digest, const word64 *block)
 {
-#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE
+#if CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE && !X32
 	if (HasISSE())
 	{
 		// MMX version has the same structure as C version below

--- End Message ---
--- Begin Message ---
Source: libcrypto++
Source-Version: 5.6.3-4

We believe that the bug you reported is fixed in the latest version of
libcrypto++, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Laszlo Boszormenyi (GCS) <[email protected]> (supplier of updated libcrypto++ 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 03 Apr 2016 11:33:16 +0000
Source: libcrypto++
Binary: libcrypto++6 libcrypto++6-dbg libcrypto++-dev libcrypto++-utils 
libcrypto++-doc
Architecture: source amd64 all
Version: 5.6.3-4
Distribution: unstable
Urgency: low
Maintainer: Laszlo Boszormenyi (GCS) <[email protected]>
Changed-By: Laszlo Boszormenyi (GCS) <[email protected]>
Description:
 libcrypto++-dev - General purpose cryptographic library - C++ development
 libcrypto++-doc - General purpose cryptographic library - documentation
 libcrypto++-utils - General purpose cryptographic library - utilities and data 
files
 libcrypto++6 - General purpose cryptographic library - shared library
 libcrypto++6-dbg - General purpose cryptographic library - debug symbols
Closes: 813659
Changes:
 libcrypto++ (5.6.3-4) unstable; urgency=low
 .
   * Start the transition with upload to Sid.
   * Builds on x32 (closes: #813659).
   * Update Standards-Version to 3.9.7 .
Checksums-Sha1:
 cb3520cfb41c54b452e3c663e2545a170a716d08 2055 libcrypto++_5.6.3-4.dsc
 823cf033002be3bfe423c03e69bba51a61487257 21280 
libcrypto++_5.6.3-4.debian.tar.xz
 fde4719f76041d5a535750373f9c514195bc5511 1620274 
libcrypto++-dev_5.6.3-4_amd64.deb
 a6da1fd490984c2c95a7b4dae0dec398bfd7007f 4284874 
libcrypto++-doc_5.6.3-4_all.deb
 e793c321f57143efd24b19e6a832f20e8acba19a 768944 
libcrypto++-utils_5.6.3-4_amd64.deb
 665202aad592e4d8d5251888e9efaed8c9ab88d3 10768980 
libcrypto++6-dbg_5.6.3-4_amd64.deb
 462b7bc3bfa38b475fb7945883256c677b210265 964204 libcrypto++6_5.6.3-4_amd64.deb
Checksums-Sha256:
 be521eed73828d0045f94ab6167eef0fc27fed62d6267936967555d2f659c013 2055 
libcrypto++_5.6.3-4.dsc
 cea7358fdad2b1e7a70cde149e0207b2c80312597c73cc205a70cbed7f22f6ee 21280 
libcrypto++_5.6.3-4.debian.tar.xz
 ecf18533f00d6fd5bc4dc9c8b3a6e947769234e8318733bc46912fa5819dec87 1620274 
libcrypto++-dev_5.6.3-4_amd64.deb
 c3d0bc60d4fcbfe726db51431a623326fb431f5591193143d53402da7368cb3c 4284874 
libcrypto++-doc_5.6.3-4_all.deb
 5028e8a7c64688b01d07616c7574d0142b1f0bdf7732f4df5097ad107376a32c 768944 
libcrypto++-utils_5.6.3-4_amd64.deb
 b492423cd237e54080b0fec86397247f86633910262fd245059c0c171cd442a2 10768980 
libcrypto++6-dbg_5.6.3-4_amd64.deb
 f9ece1a055171954b5fa16a08d261e4cdad943db4626d2d8e006570423d433d9 964204 
libcrypto++6_5.6.3-4_amd64.deb
Files:
 bd7e88239b84f0524e524e118f0f88b1 2055 libs optional libcrypto++_5.6.3-4.dsc
 df21944237a2640f564b5ec9ae8e1a13 21280 libs optional 
libcrypto++_5.6.3-4.debian.tar.xz
 24da5e2e12312b26adfc454d08aad0a7 1620274 libdevel optional 
libcrypto++-dev_5.6.3-4_amd64.deb
 19720babaa2a98832e405f29e8e34434 4284874 doc optional 
libcrypto++-doc_5.6.3-4_all.deb
 d4be57eaee6df6f62c32908f2e44544e 768944 utils optional 
libcrypto++-utils_5.6.3-4_amd64.deb
 d2d2a7ca7643251f78d6270669da4f24 10768980 debug extra 
libcrypto++6-dbg_5.6.3-4_amd64.deb
 0d393b1684b982d1b8412e73f9809838 964204 libs optional 
libcrypto++6_5.6.3-4_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXAQidAAoJENzjEOeGTMi/CyoQAIWQoj22oNH4p8MzELOpF9a2
U5lCbp0wbXtxOLQvANvdPq8FcASlcCXo/613hIfQDWYE63aknYJNikTNfes1lK9r
RTFLHoc7Gs0v7rb2bROmbJjuwczufnrpyRfpMEpL07IT9tMXwls4T9hsusno3LoX
rnMgvfigK8OFI4x4YLsEHbr+NWEA1933/fCeivszMHEjU0vVCCl3fnVbir8RRIZr
4i9T8Olma3Kux3kfkDh5nQ8CavcKkTIA/UIsVRIzTGFquIE/Z/pPjOK3AUxrR6ga
p0M7hWO+ZkAHtEHsA7cn8ikifAK4ZYLZl8r90vSJj5X2PYNmGEu/Jqe0bBtg2cMa
qteQMhq896tt+ytxeLFWBYGFa9e042R2Y9CoYjLoT1dc+95dvY+bYBzsH0tvIH79
TqEpNcIY8994C189+u41Cac9E6hIhk2zLrzLYAAblS7wCFfFGUpE1021iri3Rakp
ctNuoevene/y0gDWP/8mKiJIsj01+e5uMMQVD2ojp7igA5h1lKrSh1K0nFd2/dbu
mnpyH+tqiQP45Qx9Gy6kV/CIN9T48lGelN5SWTDcfy87OHBJa+JUwAH9ESMrFElT
uWR1xYP2u0ReC3hALJCJ5iG3ncOSZSGeX3+gByY8meJ/g50J1+MzwsCWiTNdnVV9
i8OudCrvYNejScYe+xo1
=TsAi
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to