Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604882 - app-admin/syslog-ng-3.7.3 with dev-libs/openssl-1.1.0c - lib/crypto.c:44:14: error: 'CRYPTO_LOCK' undeclared (first use in this function)
Summary: app-admin/syslog-ng-3.7.3 with dev-libs/openssl-1.1.0c - lib/crypto.c:44:14: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: https://github.com/balabit/syslog-ng/...
Whiteboard:
Keywords: PATCH
Depends on: 592920
Blocks: openssl-1.1
  Show dependency tree
 
Reported: 2017-01-06 21:27 UTC by eroen
Modified: 2018-02-03 05:48 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
app-admin/syslog-ng-3.7.3:20170106-212228.log (syslog-ng-3.7.3:20170106-212228.log,112.49 KB, text/plain)
2017-01-06 21:27 UTC, eroen
Details
openssl-support-1.1.patch (openssl-support-1.1.patch,16.45 KB, patch)
2017-01-07 16:25 UTC, eroen
Details | Diff
Avoid-openssl-1.1.0-deprecated-APIs.patch (Avoid-openssl-1.1.0-deprecated-APIs.patch,4.12 KB, patch)
2017-01-07 16:28 UTC, eroen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2017-01-06 21:27:04 UTC
Created attachment 459000 [details]
app-admin/syslog-ng-3.7.3:20170106-212228.log

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./lib -I./modules -I./lib -I./modules -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/eventlog -I./lib/ivykis/src/include -I./lib/ivykis/src/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/uuid -O2 -Wall -pthread -c lib/crypto.c  -fPIC -DPIC -o lib/.libs/lib_libsyslog_ng_la-crypto.o
lib/crypto.c: In function 'ssl_locking_callback':
lib/crypto.c:44:14: error: 'CRYPTO_LOCK' undeclared (first use in this function)
   if (mode & CRYPTO_LOCK)
              ^~~~~~~~~~~
lib/crypto.c:44:14: note: each undeclared identifier is reported only once for each function it appears in
lib/crypto.c: In function 'crypto_init_threading':
lib/crypto.c:65:20: warning: implicit declaration of function 'CRYPTO_num_locks' [-Wimplicit-function-declaration]
   ssl_lock_count = CRYPTO_num_locks();
                    ^~~~~~~~~~~~~~~~
lib/crypto.c:71:3: warning: implicit declaration of function 'CRYPTO_set_id_callback' [-Wimplicit-function-declaration]
   CRYPTO_set_id_callback(ssl_thread_id);
   ^~~~~~~~~~~~~~~~~~~~~~
lib/crypto.c:72:3: warning: implicit declaration of function 'CRYPTO_set_locking_callback' [-Wimplicit-function-declaration]
   CRYPTO_set_locking_callback(ssl_locking_callback);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/crypto.c: In function 'crypto_init':
lib/crypto.c:104:3: warning: implicit declaration of function 'SSL_library_init' [-Wimplicit-function-declaration]
   SSL_library_init();
   ^~~~~~~~~~~~~~~~
lib/crypto.c:105:3: warning: implicit declaration of function 'SSL_load_error_strings' [-Wimplicit-function-declaration]
   SSL_load_error_strings();
   ^~~~~~~~~~~~~~~~~~~~~~
lib/crypto.c:106:3: warning: implicit declaration of function 'OpenSSL_add_all_algorithms' [-Wimplicit-function-declaration]
   OpenSSL_add_all_algorithms();
   ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:8149: lib/lib_libsyslog_ng_la-crypto.lo] Error 1
make[1]: *** [Makefile:11313: all-recursive] Error 1
make: *** [Makefile:4318: all] Error 2
 * ERROR: app-admin/syslog-ng-3.7.3::gentoo failed (compile phase):
 *   emake failed
Comment 1 eroen 2017-01-07 16:25:09 UTC
Created attachment 459070 [details, diff]
openssl-support-1.1.patch

Upstream has fixed[0] building against openssl-1.1.0 *with* compatibility modes enabled[1,2,3]. syslog-ng-3.9.1 was released with these fixes.

I have attached those patches back-ported to 3.7.3 for use with the current ebuild.

0: https://github.com/balabit/syslog-ng/issues/1234
1: https://github.com/balabit/syslog-ng/commit/cd74e63784
2: https://github.com/balabit/syslog-ng/commit/a47a44aa3d
3: https://github.com/balabit/syslog-ng/commit/55f1b97fd6
Comment 2 eroen 2017-01-07 16:28:46 UTC
Created attachment 459072 [details, diff]
Avoid-openssl-1.1.0-deprecated-APIs.patch

I have submitted a patch upstream[4] to build against openssl-1.1.0 *without* compat modes enabled. The attached patch is backported to apply to syslog-ng-3.7.3 after the patch series from upstream.

Note that both the patch series from upstream and this patch require running eautoreconf after patching.

4: https://github.com/balabit/syslog-ng/pull/1313
Comment 3 Tomáš Mózes 2017-11-27 07:19:42 UTC
Can you please test if it works out of the box with https://github.com/gentoo/gentoo/pull/6275? Thank you.
Comment 4 Pacho Ramos gentoo-dev 2017-12-03 19:17:25 UTC
it should be fixed in latest version just comitted in the tree
Comment 5 Quentin Minster 2018-02-02 22:02:58 UTC
Building syslog-ng-3.13.2 still fails here (with openssl-1.1.0g-r2), with some errors in the compat layer (lib/compat/openssl_support.c) and not-previously-seen errors in the base code (lib/tlscontext.c).

I've got a patch handy, should I just attach it here? Or open a new bug?
Comment 6 Tomáš Mózes 2018-02-03 05:48:27 UTC
(In reply to Quentin Minster from comment #5)
> Building syslog-ng-3.13.2 still fails here (with openssl-1.1.0g-r2), with
> some errors in the compat layer (lib/compat/openssl_support.c) and
> not-previously-seen errors in the base code (lib/tlscontext.c).
> 
> I've got a patch handy, should I just attach it here? Or open a new bug?

Please open a new bug report, attach the full build log and the output of $(emege --info). You can attach the patch there too.