compile errors on freebsd 9.1

Jussi Kivilinna jussi.kivilinna at iki.fi
Thu Aug 22 14:23:28 CEST 2013


On 22.08.2013 13:03, Matthias Wachs wrote:
> Hi,
> 
> on one of our buildsystems libgcrypt git (Libgcrypt v1.6.0-beta194)
> fails to build due to serpent and twofish:

Thanks for reporting.

I've attached two patches that should fix problems you are experiencing. First patch fixes obvious error in twofish-amd64 assembly (__twofish_dec_blk3 exported as global symbol instead being marked as function type); second one moves SSE2/XMM register clearing from serpent.c to serpent-sse2-amd64.S.

I will also push these patches to git tree.

-Jussi

> 
> FreeBSD freebsd91 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825
> gcc (GCC) 4.2.1 20070831 patched [FreeBSD]
> 
> serpent:
> 
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src
> -D_THREAD_SAFE -I/usr/local/include -g -O2 -fvisibility=hidden -Wall -MT
> serpent.lo -MD -MP -MF .deps/serpent.Tpo -c serpent.c  -fPIC -DPIC
> -o .libs/serpent.o
> serpent.c: In function '_gcry_serpent_ctr_enc':
> serpent.c:892: error: expected string literal before ')' token
> serpent.c: In function '_gcry_serpent_cbc_dec':
> serpent.c:999: error: expected string literal before ')' token
> serpent.c: In function '_gcry_serpent_cfb_dec':
> serpent.c:1101: error: expected string literal before ')' token
> *** [serpent.lo] Error code 1
> 
> twofish:
> 
> /usr/bin/ld: ../cipher/.libs/libcipher.a(twofish-amd64.o): relocation
> R_X86_64_PC32 against `__twofish_dec_blk3' can not be used when making a
> shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> *** [libgcrypt.la] Error code 1
> 
> 
> When disabling both ciphers it compiles ...
> 
> Cheers,
> 
> Matthias 
> 
> 
> 
> 
> _______________________________________________
> Gcrypt-devel mailing list
> Gcrypt-devel at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-fix-__twofish_dec_blk3.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: </pipermail/attachments/20130822/0f64be0e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-serpent-sse2-move-register-clearing-to-assembly.patch
Type: text/x-patch
Size: 4599 bytes
Desc: not available
URL: </pipermail/attachments/20130822/0f64be0e/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 730 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20130822/0f64be0e/attachment.sig>


More information about the Gcrypt-devel mailing list