Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 782643 - app-admin/syslog-ng-3.30.1: fails to compile with net-libs/libesmtp-1.0.6_p20200824
Summary: app-admin/syslog-ng-3.30.1: fails to compile with net-libs/libesmtp-1.0.6_p20...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Tomáš Mózes
URL: https://github.com/syslog-ng/syslog-n...
Whiteboard:
Keywords:
: 800431 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-04-13 09:02 UTC by Klemen Mihevc
Modified: 2021-07-05 23:35 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,16.15 KB, application/octet-stream)
2021-04-13 09:02 UTC, Klemen Mihevc
Details
config.log (config.log,157.72 KB, text/plain)
2021-04-13 09:03 UTC, Klemen Mihevc
Details
build.log (syslog-ng-3.26.1-r1:20210419-055730.log,14.71 KB, text/plain)
2021-04-19 10:59 UTC, Joonas Niilola
Details
syslog-ng-3.32.1-libesmtp-pkg-check-modules-uppercase.patch (syslog-ng-3.32.1-libesmtp-pkg-check-modules-uppercase.patch,476 bytes, patch)
2021-06-26 15:59 UTC, Attila Tóth
Details | Diff
syslog-ng-3.32.1-libesmtp-pkgconfig-upstream.patch (syslog-ng-3.32.1-libesmtp-pkgconfig-upstream.patch,1.06 KB, patch)
2021-06-26 16:20 UTC, Attila Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Klemen Mihevc 2021-04-13 09:02:09 UTC
syslog-ng fails to compile with new libesmtp, it complains that it cant find library during configure:

checking for libESMTP... no
configure: error: libESMTP not found



Reproducible: Always




mih ~ # emerge --info
Portage 3.0.18 (python 3.8.9-final-0, default/linux/amd64/17.1/hardened, gcc-10.3.0, glibc-2.33, 5.11.13-gentoo x86_64)
=================================================================
System uname: Linux-5.11.13-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_X5670_@_2.93GHz-with-glibc2.2.5
KiB Mem:    12268644 total,    160520 free
KiB Swap:   16777684 total,  16354260 free
Timestamp of repository gentoo: Tue, 13 Apr 2021 08:05:17 +0000
Head commit of repository gentoo: 33a868b9e805a8236fd80e09c9afbd75d4ddd87a

sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
app-shells/bash:          5.1_p4::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.8.9::gentoo
dev-util/cmake:           3.20.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/openrc:          0.43.1::gentoo
sys-apps/sandbox:         2.23::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.3.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    sync-git-verify-commit-signature: true

local
    location: /var/db/repos/local
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -pipe -O3 -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php8.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -pipe -O3 -fomit-frame-pointer"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -pipe -O3 -fomit-frame-pointer"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -pipe -O3 -fomit-frame-pointer"
GENTOO_MIRRORS="https://mirror.netcologne.de/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ https://mirror.yandex.ru/gentoo-distfiles/"
LANG="sl_SI.utf8"
LDFLAGS="-Wl,-O3 -Wl,--as-needed -Wl,--sort-common -Wl,--hash-style=gnu"
LINGUAS="en sl"
MAKEOPTS="-j12 -l12"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl acpi amd64 apache2 apng berkdb bittorrent btrfs bzip2 caps cgi cli client corefonts crypt curl dhcp dlz dovecot-sasl eap exif expat experimental extraengine fontconfig ftp gd gdbm glib gmp gssapi gzip hardened http2 iconv icu idn intl iptables ipv6 ithreads jpeg kerberos lcms libglvnd libtirpc lz4 lzma lzo managesieve mp3 multilib mysql mysqli ncurses nls nping nptl openmp openssl pam pci pcntl pcre pcre16 pcre32 pdo perl pie png posix python rar readline rpc rtmp samba seccomp server session sieve slang smtp soap sockets socks5 split-usr sqlite ssh ssl ssp suexec tcpd threads tiff tracepath truetype udev unicode urandom usb vhosts webui x264 x265 xattr xml xmlreader xmlrpc xmlwriter xslt xtpax xvid xz zip zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias authn_dbd authn_socache authz_dbd cache_socache dbd http2 proxy proxy_html proxy_http proxy_http2 proxy_wstunnel xml2enc" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en sl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-0" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="geoip"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Klemen Mihevc 2021-04-13 09:02:47 UTC
Created attachment 699648 [details]
build.log
Comment 2 Klemen Mihevc 2021-04-13 09:03:02 UTC
Created attachment 699651 [details]
config.log
Comment 3 Tomáš Mózes 2021-04-13 16:35:01 UTC
Thanks for the report, confirmed on ~amd64. Will have to report this upstream.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-13 20:45:49 UTC
(In reply to Tomáš Mózes from comment #3)
> Thanks for the report, confirmed on ~amd64. Will have to report this
> upstream.

Working on a quick patch. Need to use pkgconfig.
Comment 5 Larry the Git Cow gentoo-dev 2021-04-13 22:37:55 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28e5e044aa65c4e3c1748716e7f0224fbfd94676

commit 28e5e044aa65c4e3c1748716e7f0224fbfd94676
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-04-13 20:47:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-04-13 22:37:39 +0000

    app-admin/syslog-ng: use pkgconfig to find libesmtp
    
    The newer version of libesmtp (snapshot) drops autotools and dropped
    its homebrew libesmtp-config utility too. We now have to use pkgconfig
    to find it.
    
    Bug: https://bugs.gentoo.org/782643
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/syslog-ng-3.30.1-esmtp-pkgconfig.patch   |  26 ++++
 app-admin/syslog-ng/syslog-ng-3.30.1-r1.ebuild     | 173 +++++++++++++++++++++
 2 files changed, 199 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf2731095af25105762bb007d4d0f60956f4bbef

commit bf2731095af25105762bb007d4d0f60956f4bbef
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-04-13 20:57:35 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-04-13 22:37:36 +0000

    net-libs/libesmtp: add subslot
    
    1.0.6 breaks ABI compatibility (severely).
    
    Bug: https://bugs.gentoo.org/782643
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/libesmtp/libesmtp-1.0.6_p20200824.ebuild | 2 +-
 net-libs/libesmtp/libesmtp-9999.ebuild            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Comment 6 Tomáš Mózes 2021-04-14 06:11:58 UTC
Huge thanks Sam!
Comment 7 Klemen Mihevc 2021-04-14 06:13:13 UTC
Works for me as well, thanks!
Comment 8 Joonas Niilola gentoo-dev 2021-04-19 10:59:15 UTC
Created attachment 700740 [details]
build.log

FYI I hit this today on syslog-ng-3.26.1-r1
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-19 11:29:39 UTC
(In reply to Joonas Niilola from comment #8)
> Created attachment 700740 [details]
> build.log
> 
> FYI I hit this today on syslog-ng-3.26.1-r1

Right, that’s the stable version, but the new libesmtp is still in ~arch
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-04-19 11:29:53 UTC
(In reply to Tomáš Mózes from comment #6)
> Huge thanks Sam!

No problem! We may want to add a fallback to checking -config
Comment 11 Jaak Ristioja 2021-06-22 15:53:54 UTC
(In reply to Larry the Git Cow from comment #5)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=28e5e044aa65c4e3c1748716e7f0224fbfd94676

I think this might have broken syslog-ng for me. It fails to start due to some "destination plugin smtp not found" error. It seems that libafsmtp.so is not properly linked to libesmtp, because when trying to run syslog-ng with --debug, I get something this:

[2021-06-22T16:28:09.259455] Reading shared object for a candidate module; path='/usr/lib64/syslog-ng', fname='libafsmtp.so', module='afsmtp'
[2021-06-22T16:28:09.259800] Error opening plugin module; module='afsmtp', error='/usr/lib64/syslog-ng/libafsmtp.so: undefined symbol: _smtp_message_str_cb'
Comment 12 Tomáš Mózes 2021-06-23 09:59:48 UTC
(In reply to Jaak Ristioja from comment #11)
> (In reply to Larry the Git Cow from comment #5)
> > The bug has been referenced in the following commit(s):
> > 
> > https://gitweb.gentoo.org/repo/gentoo.git/commit/
> > ?id=28e5e044aa65c4e3c1748716e7f0224fbfd94676
> 
> I think this might have broken syslog-ng for me. It fails to start due to
> some "destination plugin smtp not found" error. It seems that libafsmtp.so
> is not properly linked to libesmtp, because when trying to run syslog-ng
> with --debug, I get something this:
> 
> [2021-06-22T16:28:09.259455] Reading shared object for a candidate module;
> path='/usr/lib64/syslog-ng', fname='libafsmtp.so', module='afsmtp'
> [2021-06-22T16:28:09.259800] Error opening plugin module; module='afsmtp',
> error='/usr/lib64/syslog-ng/libafsmtp.so: undefined symbol:
> _smtp_message_str_cb'

The change has just been merged to syslog-ng upstream (https://github.com/syslog-ng/syslog-ng/pull/3669).

Jaak, please post your $(emerge --info app-admin/syslog-ng).
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-23 10:11:33 UTC
You may need to rebuild both libesmtp and syslog?
Comment 14 Jaak Ristioja 2021-06-24 11:13:10 UTC
I'm no autotools expert, but I think the incorrect linking is caused by the PKG_CHECK_MODULES line in syslog-ng-3.30.1-esmtp-pkgconfig.patch which is slightly incorrect: I suspect that the first argument to PKG_CHECK_MODULES() should be written in uppercase, as it currently seems to define libesmtp_LIBS instead of LIBESMTP_LIBS, and that seems to make a difference for the makefiles.
Comment 15 Attila Tóth 2021-06-26 15:59:27 UTC
Created attachment 719469 [details, diff]
syslog-ng-3.32.1-libesmtp-pkg-check-modules-uppercase.patch

You mean like this?
Comment 16 Attila Tóth 2021-06-26 16:00:08 UTC
(In reply to Jaak Ristioja from comment #14)
> I'm no autotools expert, but I think the incorrect linking is caused by the
> PKG_CHECK_MODULES line in syslog-ng-3.30.1-esmtp-pkgconfig.patch which is
> slightly incorrect: I suspect that the first argument to PKG_CHECK_MODULES()
> should be written in uppercase, as it currently seems to define
> libesmtp_LIBS instead of LIBESMTP_LIBS, and that seems to make a difference
> for the makefiles.

I attached a quick patch.
Upstream merge also makes it uppercase:
https://github.com/syslog-ng/syslog-ng/pull/3669/commits/b8284f8ecac588f6a321c779cce06cbe182611a5
Comment 17 Attila Tóth 2021-06-26 16:20:28 UTC
Created attachment 719472 [details, diff]
syslog-ng-3.32.1-libesmtp-pkgconfig-upstream.patch

Quickpatch according to upstream commit.
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-06-26 17:42:20 UTC
Oh, of course. Will fix shortly, thanks.
Comment 19 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-07-05 23:19:55 UTC
*** Bug 800431 has been marked as a duplicate of this bug. ***
Comment 20 Larry the Git Cow gentoo-dev 2021-07-05 23:35:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=998792c5836911dfcc891ec12bb250cf2a9c5550

commit 998792c5836911dfcc891ec12bb250cf2a9c5550
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-07-05 23:34:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-07-05 23:35:38 +0000

    app-admin/syslog-ng: fix libesmtp pkg-config patch
    
    Closes: https://bugs.gentoo.org/782643
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/syslog-ng-3.30.1-esmtp-pkgconfig.patch   | 44 +++++++++++++++++-----
 ...3.30.1-r1.ebuild => syslog-ng-3.30.1-r2.ebuild} |  2 +-
 app-admin/syslog-ng/syslog-ng-3.30.1.ebuild        |  2 +-
 ...ng-3.31.2.ebuild => syslog-ng-3.31.2-r1.ebuild} |  2 +-
 ...ng-3.32.1.ebuild => syslog-ng-3.32.1-r1.ebuild} |  2 +-
 5 files changed, 38 insertions(+), 14 deletions(-)