[Pkg-openssl-devel] Bug#799606: Cannot compile OpenSSL 1.0.2d under X32 (fatal error: sys/cdefs.h: No such file or directory)

Jeffrey Walton noloader at gmail.com
Sun Sep 20 19:52:34 UTC 2015


Package: openssl
Version: 1.0.2d-1
Severity: important

*****

>From within the X32 chroot environment (http://wiki.debian.org/X32Port)...

Download and unpack OpenSSL with:

    curl -k https://www.openssl.org/source/openssl-1.0.2d.tar.gz -o
openssl-1.0.2d.tar.gz
    tar xzfi openssl-1.0.2d.tar.gz
    cd openssl-1.0.2d

Then, configure:

     # See below for the output
    ./config

Finally, make:

# make
making all in crypto...
make[1]: Entering directory '/root/openssl-1.0.2d/crypto'
/usr/bin/perl ../util/mkbuildinf.pl "gcc -I. -I.. -I../include
-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H
-Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2
-DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM
-DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM"
"linux-x86_64" >buildinf.h
gcc -I. -I.. -I../include  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM
-DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
-DECP_NISTZ256_ASM   -c -o cryptlib.o cryptlib.c
In file included from /usr/include/stdlib.h:24:0,
                 from cryptlib.h:62,
                 from cryptlib.c:117:
/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file
or directory
compilation terminated.
<builtin>: recipe for target 'cryptlib.o' failed
make[1]: *** [cryptlib.o] Error 1
make[1]: Leaving directory '/root/openssl-1.0.2d/crypto'
Makefile:283: recipe for target 'build_crypto' failed
make: *** [build_crypto] Error 1

*****

This could be a problem with the include paths for the standard
library. Examining features.h and what's going on around the cdefs.h
include:

# cat /usr/include/features.h | grep -B 3 -A 2 cdefs\.h
/* This is here only because every header file already includes this one.  */
#ifndef __ASSEMBLER__
# ifndef _SYS_CDEFS_H
#  include <sys/cdefs.h>
# endif

And cdefs.h:

# find /usr -name cdefs.h
/usr/include/x86_64-linux-gnux32/sys/cdefs.h

And finally, how GCC was configured:

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnux32/5/lto-wrapper
Target: x86_64-linux-gnux32
Configured with: ../src/configure -v --with-pkgversion='Debian
5.2.1-17' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-5 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-x32/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-x32
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-x32
--with-arch-directory=amd64
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc
--enable-multiarch --with-abi=mx32 --with-multilib-list=mx32,m64,m32
--enable-multilib --enable-checking=release
--build=x86_64-linux-gnux32 --host=x86_64-linux-gnux32
--target=x86_64-linux-gnux32
Thread model: posix
gcc version 5.2.1 20150911 (Debian 5.2.1-17)

*****

Here is the interesting output from Configure:

# ./config
Operating system: x86_64-whatever-linux2
Configuring for linux-x86_64
Configuring for linux-x86_64
    no-ec_nistp_64_gcc_128 [default]  OPENSSL_NO_EC_NISTP_64_GCC_128 (skip dir)
    no-gmp          [default]  OPENSSL_NO_GMP (skip dir)
    no-jpake        [experimental] OPENSSL_NO_JPAKE (skip dir)
    no-krb5         [krb5-flavor not specified] OPENSSL_NO_KRB5
    no-libunbound   [experimental] OPENSSL_NO_LIBUNBOUND (skip dir)
    no-md2          [default]  OPENSSL_NO_MD2 (skip dir)
    no-rc5          [default]  OPENSSL_NO_RC5 (skip dir)
    no-rfc3779      [default]  OPENSSL_NO_RFC3779 (skip dir)
    no-sctp         [default]  OPENSSL_NO_SCTP (skip dir)
    no-shared       [default]
    no-ssl-trace    [default]  OPENSSL_NO_SSL_TRACE (skip dir)
    no-store        [experimental] OPENSSL_NO_STORE (skip dir)
    no-unit-test    [default]  OPENSSL_NO_UNIT_TEST (skip dir)
    no-zlib         [default]
    no-zlib-dynamic [default]
IsMK1MF=0
CC            =gcc
CFLAG         =-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN
-DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5
-DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM
-DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM
-DECP_NISTZ256_ASM
EX_LIBS       =-ldl
CPUID_OBJ     =x86_64cpuid.o
BN_ASM        =x86_64-gcc.o x86_64-mont.o x86_64-mont5.o x86_64-gf2m.o
rsaz_exp.o rsaz-x86_64.o rsaz-avx2.o
EC_ASM        =ecp_nistz256.o ecp_nistz256-x86_64.o
DES_ENC       =des_enc.o fcrypt_b.o
AES_ENC       =aes-x86_64.o vpaes-x86_64.o bsaes-x86_64.o
aesni-x86_64.o aesni-sha1-x86_64.o aesni-sha256-x86_64.o
aesni-mb-x86_64.o
BF_ENC        =bf_enc.o
CAST_ENC      =c_enc.o
RC4_ENC       =rc4-x86_64.o rc4-md5-x86_64.o
RC5_ENC       =rc5_enc.o
MD5_OBJ_ASM   =md5-x86_64.o
SHA1_OBJ_ASM  =sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
sha1-mb-x86_64.o sha256-mb-x86_64.o
RMD160_OBJ_ASM=
CMLL_ENC      =cmll-x86_64.o cmll_misc.o
MODES_OBJ     =ghash-x86_64.o aesni-gcm-x86_64.o
ENGINES_OBJ   =
PROCESSOR     =
RANLIB        =/usr/bin/ranlib
ARFLAGS       =
PERL          =/usr/bin/perl
SIXTY_FOUR_BIT_LONG mode
DES_UNROLL used
DES_INT used
RC4_CHUNK is unsigned long
created directory `include/openssl'
...

*****

# uname -a
Linux debian-8-x64 4.1.0-2-amd64 #1 SMP Debian 4.1.6-1 (2015-08-23)
x86_64 GNU/Linux

# lsb_release
bash: lsb_release: command not found

*****

# apt-cache show openssl
Package: openssl
Priority: optional
Section: utils
Installed-Size: 1118
Maintainer: Debian OpenSSL Team <pkg-openssl-devel at lists.alioth.debian.org>
Architecture: x32
Version: 1.0.2d-1
Depends: libc6 (>= 2.16), libssl1.0.0 (>= 1.0.2~beta3)
Suggests: ca-certificates
Filename: pool-x32/main/o/openssl/openssl_1.0.2d-1_x32.deb
Size: 701018
MD5Sum: e5fb058af84a8e73a5c9bcabc9856a5f
SHA1: 48d9b85fc2af043bfc7dfcfcab540923193d103a
SHA256: 5229523d19ab193fc7a130da7c68fb3be4abb0d5406ed6491f27784be2caabf0
SHA512: 01766108e3cc6572ddee7fb5a606fe99c9375389fb7c7eb1979383abe0d40edeee3792689a6a0c678cf1f8538e24bcc9d8424efdceaaba4bd4a265630129a965
Description: Secure Sockets Layer toolkit - cryptographic utility
 This package is part of the OpenSSL project's implementation of the SSL
 and TLS cryptographic protocols for secure communication over the
 Internet.
 .
 It contains the general-purpose command line binary /usr/bin/openssl,
 useful for cryptographic operations such as:
  * creating RSA, DH, and DSA key parameters;
  * creating X.509 certificates, CSRs, and CRLs;
  * calculating message digests;
  * encrypting and decrypting with ciphers;
  * testing SSL/TLS clients and servers;
  * handling S/MIME signed or encrypted mail.
Description-md5: 9b6de2bb6e1d9016aeb0f00bcf6617bd



More information about the Pkg-openssl-devel mailing list