[OpenSSL-1.0.2] undefined reference to `OPENSSL_cpuid_setup'

Issue #183 resolved
Takehiko NOZAKI repo owner created an issue
dependall ===> tests/crypto/libcrypto/rc4
#      link  rc4/h_rc4test
/usr/tooldir/bin/i486--netbsdelf-gcc    --sysroot=/usr/src/obj.i386/destdir.i386     -o h_rc4test  rc4test.o -lcrypto -lcrypt       -Wl,-rpath-link,/usr/src/obj.i386/destdir.i386/lib  -L=/lib
rc4test.o: In function `main':
/usr/src/crypto/external/bsd/openssl/dist/crypto/rc4/rc4test.c:127: undefined reference to `OPENSSL_cpuid_setup'
collect2: ld returned 1 exit status

*** Failed target:  h_rc4test
*** Failed command: /usr/tooldir/bin/i486--netbsdelf-gcc --sysroot=/usr/src/obj.i386/destdir.i386 -o h_rc4test rc4test.o -lcrypto -lcrypt -Wl,-rpath-link,/usr/src/obj.i386/destdir.i386/lib -L=/lib
*** Error code 1

Stop.
nbmake: stopped in /usr/src/tests/crypto/libcrypto/rc4

Comments (15)

  1. Takehiko NOZAKI reporter

    OPENSSL_cpuid_setup marked as hidden, and called from only .ini section execution.

    this code intend to try call OPENSSL_cpuid_setup when libcrypto is static linked and no reference to it.

    but this is completely wrong, use -Wl,--whole-archive libcrypto.a to link.

  2. Log in to comment