Skip to content

Static builds broken #10867

@himslm01

Description

@himslm01

Similar to issue #8787, I'm finding static builds are have been failing for the last three days.
I build every night - the last static build that worked was on 13-JAN-2020, so my static builds after 02:00 GMT on 14-JAN-2020 have failed.

My config is simple:

./Configure linux-x86_64 no-shared --prefix=/opt/ffbuild

The make fails here:

/usr/bin/gcc -fPIC -pthread -m64 -Wa,--noexecstack --static -static -I/opt/ffbuild/include -z defs -Wl,-znodelete -shared -Wl,-Bsymbolic  -L/opt/ffbuild/lib -static \
        -o providers/fips.so -Wl,--version-script=providers/fips.ld \
        providers/fips/fips-dso-fipsprov.o \
        providers/fips/fips-dso-self_test.o \
        providers/fips/fips-dso-self_test_event.o \
        providers/fips/fips-dso-self_test_kats.o \
        providers/libimplementations.a providers/libcommon.a providers/libfips.a -ldl -pthread
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginT.o: relocation R_X86_64_32 against `__TMC_END__' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/5/crtbeginT.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:12475: recipe for target 'providers/fips.so' failed
make[1]: *** [providers/fips.so] Error 1
make[1]: Leaving directory '/opt/ffbuild/src/openssl'
Makefile:2176: recipe for target 'build_sw' failed
make: *** [build_sw] Error 2

Possibly not relevant, I build in an Ubuntu 16.04 Docker container (16.04 is still in support, since it's an LTS).

Sorry, I have not had time to bisect to find the actual commit yet.

Configdata output - if you're interested...


Command line (with current working directory = .):

    /usr/bin/perl ./Configure linux-x86_64 no-shared --prefix=/opt/ffbuild

Perl information:

    /usr/bin/perl
    5.22.1 for x86_64-linux-gnu-thread-multi

Enabled features:

    afalgeng
    aria
    asm
    async
    autoalginit
    autoerrinit
    autoload-config
    bf
    blake2
    camellia
    capieng
    cast
    chacha
    cmac
    cmp
    cms
    comp
    ct
    deprecated
    des
    dgram
    dh
    dsa
    dso
    dtls
    ec
    ec2m
    ecdh
    ecdsa
    engine
    err
    filenames
    fips
    gost
    idea
    legacy
    makedepend
    md4
    mdc2
    module
    multiblock
    nextprotoneg
    pinshared
    ocb
    ocsp
    padlockeng
    pic
    poly1305
    posix-io
    psk
    rc2
    rc4
    rdrand
    rfc3779
    rmd160
    scrypt
    seed
    siphash
    siv
    sm2
    sm3
    sm4
    sock
    srp
    srtp
    sse2
    ssl
    static-engine
    stdio
    tests
    threads
    tls
    ts
    ui-console
    whirlpool
    tls1
    tls1-method
    tls1_1
    tls1_1-method
    tls1_2
    tls1_2-method
    tls1_3
    dtls1
    dtls1-method
    dtls1_2
    dtls1_2-method

Disabled features:

    asan                [default]        OPENSSL_NO_ASAN
    buildtest-c++       [default]
    crypto-mdebug       [default]        OPENSSL_NO_CRYPTO_MDEBUG
    devcryptoeng        [default]        OPENSSL_NO_DEVCRYPTOENG
    dynamic-engine      [cascade]
    ec_nistp_64_gcc_128 [default]        OPENSSL_NO_EC_NISTP_64_GCC_128
    egd                 [default]        OPENSSL_NO_EGD
    external-tests      [default]        OPENSSL_NO_EXTERNAL_TESTS
    fuzz-libfuzzer      [default]        OPENSSL_NO_FUZZ_LIBFUZZER
    fuzz-afl            [default]        OPENSSL_NO_FUZZ_AFL
    ktls                [default]        OPENSSL_NO_KTLS
    md2                 [default]        OPENSSL_NO_MD2 (skip crypto/md2)
    msan                [default]        OPENSSL_NO_MSAN
    rc5                 [default]        OPENSSL_NO_RC5 (skip crypto/rc5)
    sctp                [default]        OPENSSL_NO_SCTP
    shared              [option]
    ssl-trace           [default]        OPENSSL_NO_SSL_TRACE
    trace               [default]        OPENSSL_NO_TRACE
    ubsan               [default]        OPENSSL_NO_UBSAN
    unit-test           [default]        OPENSSL_NO_UNIT_TEST
    uplink              [no uplink_arch] OPENSSL_NO_UPLINK
    weak-ssl-ciphers    [default]        OPENSSL_NO_WEAK_SSL_CIPHERS
    zlib                [default]
    zlib-dynamic        [default]
    ssl3                [default]        OPENSSL_NO_SSL3
    ssl3-method         [default]        OPENSSL_NO_SSL3_METHOD

Config target attributes:

    AR => "ar",
    ARFLAGS => "r",
    CC => "gcc",
    CFLAGS => "-Wall -O3",
    CXX => "g++",
    CXXFLAGS => "-Wall -O3",
    HASHBANGPERL => "/usr/bin/env perl",
    RANLIB => "ranlib",
    RC => "windres",
    asm_arch => "x86_64",
    bn_ops => "SIXTY_FOUR_BIT_LONG",
    build_file => "Makefile",
    build_scheme => [ "unified", "unix" ],
    cflags => "-pthread -m64",
    cppflags => "",
    cxxflags => "-std=c++11 -pthread -m64",
    defines => [  ],
    disable => [  ],
    dso_ldflags => "-z defs",
    dso_scheme => "dlfcn",
    enable => [ "afalgeng" ],
    ex_libs => "-ldl -pthread",
    includes => [  ],
    lflags => "",
    lib_cflags => "",
    lib_cppflags => "-DOPENSSL_USE_NODELETE -DL_ENDIAN",
    lib_defines => [ "OPENSSL_BUILDING_OPENSSL" ],
    module_cflags => "-fPIC",
    module_cxxflags => undef,
    module_ldflags => "-Wl,-znodelete -shared -Wl,-Bsymbolic",
    multilib => "64",
    perl_platform => "Unix",
    perlasm_scheme => "elf",
    shared_cflag => "-fPIC",
    shared_defflag => "-Wl,--version-script=",
    shared_defines => [  ],
    shared_ldflag => "-Wl,-znodelete -shared -Wl,-Bsymbolic",
    shared_rcflag => "",
    shared_sonameflag => "-Wl,-soname=",
    shared_target => "linux-shared",
    thread_defines => [  ],
    thread_scheme => "pthreads",
    unistd => "<unistd.h>",

Recorded environment:

    AR = /usr/bin/ar
    ARFLAGS =
    AS = /usr/bin/nasm
    ASFLAGS =
    BUILDFILE =
    CC = /usr/bin/gcc
    CFLAGS = --static -static -I/opt/ffbuild/include
    CPP = /usr/bin/cpp
    CPPDEFINES =
    CPPFLAGS = --static -static -I/opt/ffbuild/include
    CPPINCLUDES =
    CROSS_COMPILE =
    CXX = /usr/bin/g++
    CXXFLAGS = --static -static -I/opt/ffbuild/include
    HASHBANGPERL =
    LD = /usr/bin/ld
    LDFLAGS = -L/opt/ffbuild/lib -static
    LDLIBS =
    MT =
    MTFLAGS =
    OPENSSL_LOCAL_CONFIG_DIR =
    PERL =
    RANLIB = /usr/bin/ranlib
    RC = /usr/bin/windres
    RCFLAGS =
    RM =
    __CNF_CFLAGS =
    __CNF_CPPDEFINES =
    __CNF_CPPFLAGS =
    __CNF_CPPINCLUDES =
    __CNF_CXXFLAGS =
    __CNF_LDFLAGS =
    __CNF_LDLIBS =

Makevars:

    AR              = /usr/bin/ar
    ARFLAGS         = r
    AS              = /usr/bin/nasm
    CC              = /usr/bin/gcc
    CFLAGS          = --static -static -I/opt/ffbuild/include
    CPP             = /usr/bin/cpp
    CPPDEFINES      =
    CPPFLAGS        = --static -static -I/opt/ffbuild/include
    CPPINCLUDES     =
    CXX             = /usr/bin/g++
    CXXFLAGS        = --static -static -I/opt/ffbuild/include
    HASHBANGPERL    = /usr/bin/env perl
    LD              = /usr/bin/ld
    LDFLAGS         = -L/opt/ffbuild/lib -static
    LDLIBS          =
    PERL            = /usr/bin/perl
    RANLIB          = /usr/bin/ranlib
    RC              = /usr/bin/windres
    RCFLAGS         =

NOTE: These variables only represent the configuration view.  The build file
template may have processed these variables further, please have a look at the
build file for more exact data:
    Makefile

build file:

    Makefile

build file templates:

    Configurations/common0.tmpl
    Configurations/unix-Makefile.tmpl
    Configurations/common.tmpl

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolved: answeredThe issue contained a question which has been answeredresolved: not a bugThe issue is not considered a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions