Closed shastah closed 6 years ago
agreed, thanks for the issue
Can you perhaps send me the relevant snippet from config.log around the OPENSSL_add_all_algorithms_noconf check? I'd like to see what the actual problem/error is.
Hi, I have the same problem. Here is the relevant snippet from config.log.
configure:5246: checking for OPENSSL_add_all_algorithms_noconf in -lcrypto
configure:5271: gcc -o conftest -g -O2 -fdebug-prefix-map=/build/carbon-c-relay-Ik8vNO/carbon-c-relay-3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro conftest.c -lcrypto -lm -pthread >&5
/tmp/ccz7ASkm.o: In function `main':
./conftest.c:85: undefined reference to `OPENSSL_add_all_algorithms_noconf'
collect2: error: ld returned 1 exit status
configure:5271: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "carbon-c-relay"
| #define PACKAGE_TARNAME "carbon-c-relay"
| #define PACKAGE_VERSION "3.3"
| #define PACKAGE_STRING "carbon-c-relay 3.3"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "carbon-c-relay"
| #define VERSION "3.3"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_ASSERT_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_GLOB_H 1
| #define HAVE_MATH_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_NETINET_TCP_H 1
| #define HAVE_POLL_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_REGEX_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_TIME_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_FORK 1
| #define HAVE_VFORK 1
| #define HAVE_WORKING_VFORK 1
| #define HAVE_WORKING_FORK 1
| #define HAVE_STDLIB_H 1
| #define HAVE_MALLOC 1
| #define HAVE_STDLIB_H 1
| #define HAVE_REALLOC 1
| #define HAVE_GETHOSTNAME 1
| #define HAVE_GETTIMEOFDAY 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_MEMMOVE 1
| #define HAVE_MEMSET 1
| #define HAVE_POW 1
| #define HAVE_REGCOMP 1
| #define HAVE_SOCKET 1
| #define HAVE_SQRT 1
| #define HAVE_STRCHR 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_STRSTR 1
| #define HAVE_STRTOL 1
| #define HAVE_LZ4_H 1
| #define HAVE_LZ4 1
| #define HAVE_OPENSSL_ERR_H 1
| #define HAVE_OPENSSL_SSL_H 1
| #define HAVE_SSL 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char OPENSSL_add_all_algorithms_noconf ();
| int
| main ()
| {
| return OPENSSL_add_all_algorithms_noconf ();
| ;
| return 0;
| }
configure:5280: result: no
I tweaked conftest.c
as below:
/* confdefs.h */
#define PACKAGE_NAME "carbon-c-relay"
#define PACKAGE_TARNAME "carbon-c-relay"
#define PACKAGE_VERSION "3.3"
#define PACKAGE_STRING "carbon-c-relay 3.3"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "carbon-c-relay"
#define VERSION "3.3"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_ARPA_INET_H 1
#define HAVE_ASSERT_H 1
#define HAVE_ERRNO_H 1
#define HAVE_FCNTL_H 1
#define HAVE_GLOB_H 1
#define HAVE_MATH_H 1
#define HAVE_NETDB_H 1
#define HAVE_NETINET_IN_H 1
#define HAVE_NETINET_TCP_H 1
#define HAVE_POLL_H 1
#define HAVE_PTHREAD_H 1
#define HAVE_REGEX_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_SYS_RESOURCE_H 1
#define HAVE_SYS_SOCKET_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_UIO_H 1
#define HAVE_SYS_UN_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_FORK 1
#define HAVE_VFORK 1
#define HAVE_WORKING_VFORK 1
#define HAVE_WORKING_FORK 1
#define HAVE_STDLIB_H 1
#define HAVE_MALLOC 1
#define HAVE_STDLIB_H 1
#define HAVE_REALLOC 1
#define HAVE_GETHOSTNAME 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_LOCALTIME_R 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMSET 1
#define HAVE_POW 1
#define HAVE_REGCOMP 1
#define HAVE_SOCKET 1
#define HAVE_SQRT 1
#define HAVE_STRCHR 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOL 1
#define HAVE_LZ4_H 1
#define HAVE_LZ4 1
#define HAVE_OPENSSL_ERR_H 1
#define HAVE_OPENSSL_SSL_H 1
#define HAVE_SSL 1
/* end confdefs.h. */
#include <openssl/crypto.h>
#include <openssl/evp.h>
int
main ()
{
return OPENSSL_add_all_algorithms_noconf ();
;
return 0;
}
With the above modification, it compiles successfully.
# gcc -o conftest -g -O2 -fdebug-prefix-map=/build/carbon-c-relay-Ik8vNO/carbon-c-relay-3.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-Bsymbolic-functions -Wl,-z,relro conftest.c -lcrypto
# echo $?
0
By the way, I created a PPA deb package of carbon-c-relay for Ubuntu 18.04 LTS. https://launchpad.net/~hnakamur/+archive/ubuntu/carbon-c-relay
ok, thanks, so we should check another symbol :)
Trying to compile with OpenSSL 1.1 leads to:
Adding
-lcrypto
toLIBSSL
inMakefile
resolves the issue (butconfigure
should handle that for me).