Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 708722 - net-mail/dbmail-3.2.3-r2 : fails to build with -fno-common or gcc-10
Summary: net-mail/dbmail-3.2.3-r2 : fails to build with -fno-common or gcc-10
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Raschbacher
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks: -fno-common
  Show dependency tree
 
Reported: 2020-02-08 13:17 UTC by Toralf Förster
Modified: 2021-01-05 12:47 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.38 KB, text/plain)
2020-02-08 13:17 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,140.06 KB, text/plain)
2020-02-08 13:17 UTC, Toralf Förster
Details
environment (environment,84.57 KB, text/plain)
2020-02-08 13:17 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.84 KB, application/x-bzip)
2020-02-08 13:17 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,18.51 KB, application/x-bzip)
2020-02-08 13:17 UTC, Toralf Förster
Details
net-mail:dbmail-3.2.3-r2:20200208-103807.log (net-mail:dbmail-3.2.3-r2:20200208-103807.log,98.65 KB, text/plain)
2020-02-08 13:17 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,28.78 KB, application/x-bzip)
2020-02-08 13:17 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-02-08 13:17:38 UTC
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -DSYSCONFDIR=\"/etc/dbmail\" -DLIBDIR=\"/usr/lib64\" -DLOCALSTATEDIR=\"/var/lib\" -O2 -pipe -march=native -fno-common -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/gmime-2.6 -D_LARGEFILE64_SOURCE -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/local/include/zdb -I/usr/include/zdb -I/usr/local/include/jemalloc -I/usr/include/jemalloc -W -Wall -Wpointer-arith -Wstrict-prototypes -c sortmodule.c  -fPIC -DPIC -o .libs/libdbmail_la-sortmodule.o
/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -O2 -pipe -march=native -fno-common -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread  -I/usr/include/gmime-2.6 -D_LARGEFILE64_SOURCE -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -pthread -I/usr/include/libmount -I/usr/include/blkid  -I/usr/local/include/zdb -I/usr/include/zdb -I/usr/local/include/jemalloc -I/usr/include/jemalloc -W -Wall -Wpointer-arith -Wstrict-prototypes -export-dynamic -lcrypt  -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -lgmodule-2.0 -lglib-2.0 -lgthread-2.0 -pthread -lglib-2.0  -lgmime-2.6 -lgio-2.0 -lgobject-2.0 -lglib-2.0  -lm -lmhash -levent_pthreads -levent -lssl -lcrypto  -lzdb -o libdbmail.la -rpath /usr/lib64/dbmail libdbmail_la-dm_user.lo libdbmail_la-dm_message.lo libdbmail_la-dm_mailbox.lo libdbmail_la-dm_mailboxstate.lo libdbmail_la-dm_cram.lo libdbmail_la-dm_capa.lo libdbmail_la-dm_config.lo libdbmail_la-dm_debug.lo libdbmail_la-dm_list.lo libdbmail_la-dm_db.lo libdbmail_la-dm_sievescript.lo libdbmail_la-dm_acl.lo libdbmail_la-dm_misc.lo libdbmail_la-dm_pidfile.lo libdbmail_la-dm_digest.lo libdbmail_la-dm_match.lo libdbmail_la-dm_iconv.lo libdbmail_la-dm_dsn.lo libdbmail_la-dm_sset.lo libdbmail_la-dm_string.lo libdbmail_la-mpool.lo libdbmail_la-dm_mempool.lo  libdbmail_la-server.lo libdbmail_la-clientsession.lo libdbmail_la-clientbase.lo libdbmail_la-dm_tls.lo libdbmail_la-dm_http.lo libdbmail_la-dm_request.lo libdbmail_la-dm_cidr.lo libdbmail_la-authmodule.lo libdbmail_la-sortmodule.lo  
libtool: link: x86_64-pc-linux-gnu-gcc -shared  -fPIC -DPIC  .libs/libdbmail_la-dm_user.o .libs/libdbmail_la-dm_message.o .libs/libdbmail_la-dm_mailbox.o .libs/libdbmail_la-dm_mailboxstate.o .libs/libdbmail_la-dm_cram.o .libs/libdbmail_la-dm_capa.o .libs/libdbmail_la-dm_config.o .libs/libdbmail_la-dm_debug.o .libs/libdbmail_la-dm_list.o .libs/libdbmail_la-dm_db.o .libs/libdbmail_la-dm_sievescript.o .libs/libdbmail_la-dm_acl.o .libs/libdbmail_la-dm_misc.o .libs/libdbmail_la-dm_pidfile.o .libs/libdbmail_la-dm_digest.o .libs/libdbmail_la-dm_match.o .libs/libdbmail_la-dm_iconv.o .libs/libdbmail_la-dm_dsn.o .libs/libdbmail_la-dm_sset.o .libs/libdbmail_la-dm_string.o .libs/libdbmail_la-mpool.o .libs/libdbmail_la-dm_mempool.o .libs/libdbmail_la-server.o .libs/libdbmail_la-clientsession.o .libs/libdbmail_la-clientbase.o .libs/libdbmail_la-dm_tls.o .libs/libdbmail_la-dm_http.o .libs/libdbmail_la-dm_request.o .libs/libdbmail_la-dm_cidr.o .libs/libdbmail_la-authmodule.o .libs/libdbmail_la-sortmodule.o   -lcrypt -lgmodule-2.0 -lgthread-2.0 -lgmime-2.6 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lm -lmhash -levent_pthreads -levent -lssl -lcrypto -lzdb  -O2 -march=native -pthread -pthread -Wl,-O1 -Wl,--as-needed -Wl,--export-dynamic -pthread   -pthread -Wl,-soname -Wl,libdbmail.so.0 -o .libs/libdbmail.so.0.0.0
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: .libs/libdbmail_la-dm_tls.o:(.bss+0x0): multiple definition of `tls_context'; .libs/libdbmail_la-server.o:(.bss+0x40): first defined here
collect2: error: ld returned 1 exit status

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd-20200205-101527

  -------------------------------------------------------------------

  Please see the tracker bug for details.

gcc-config -l:
 [1] x86_64-pc-linux-gnu-9.2.0 *

clang:
clang version 9.0.1 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/9/bin
llvm:
9.0.1
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.6
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)
  [5]   pypy3 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.0 *


ghc:
The Glorious Glasgow Haskell Compilation System, version 8.0.2

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Sat, 08 Feb 2020 09:27:46 +0000

emerge -qpvO net-mail/dbmail
[ebuild  N    ] net-mail/dbmail-3.2.3-r2  USE="ssl -ldap -libressl -sieve -static"
Comment 1 Toralf Förster gentoo-dev 2020-02-08 13:17:41 UTC
Created attachment 612752 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-02-08 13:17:44 UTC
Created attachment 612754 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-02-08 13:17:47 UTC
Created attachment 612756 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-02-08 13:17:50 UTC
Created attachment 612758 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-02-08 13:17:52 UTC
Created attachment 612760 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-02-08 13:17:55 UTC
Created attachment 612762 [details]
net-mail:dbmail-3.2.3-r2:20200208-103807.log
Comment 7 Toralf Förster gentoo-dev 2020-02-08 13:17:58 UTC
Created attachment 612764 [details]
temp.tbz2
Comment 8 Vladimir B. Vinogradov 2020-06-01 11:23:55 UTC
Hi. Simple patch which helped me.


diff -Naur a/src/server.c b/src/server.c
--- a/src/server.c<---->2020-05-27 10:41:39.000000000 +0300
+++ b/src/server.c<---->2020-05-31 12:18:29.743164000 +0300
@@ -57,7 +57,7 @@
 struct event *sig_usr = NULL;
 struct event *heartbeat = NULL;
.
-SSL_CTX *tls_context;
+extern SSL_CTX *tls_context;
.
 FILE *fstdout = NULL;
 extern FILE *fstderr;


May be this is not the exact changes that it should be done. But dbmail-3.2.3-r2 builds with gcc-10.1 and works fine for me.
Comment 9 Chris Mayo 2020-06-06 15:41:29 UTC
No C expert here but I think server.c is the file in which tls_context is initialised and it is referenced in dm_tls.c.

At run time:

.libs/libdbmail_la-dm_tls.o:(.bss+0x0): multiple definition of `tls_context';
.libs/libdbmail_la-server.o:(.bss+0x40): first defined here

https://github.com/dbmail/dbmail/pull/64
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-31 06:40:21 UTC
ping
Comment 11 Larry the Git Cow gentoo-dev 2020-11-30 21:40:14 UTC
The bug has been closed via the following commit(s):

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

commit 0a25d8b33a20fd9fc4ad2a5e3080f55911ea54db
Author:     Jakov Smolic <jakov.smolic@sartura.hr>
AuthorDate: 2020-11-30 21:39:48 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2020-11-30 21:39:48 +0000

    net-mail/dbmail: port to EAPI 7 and GLEP 81
    
    * Fix build with gcc-10
    
    Closes: https://bugs.gentoo.org/708722
    Package-Manager: Portage-3.0.9, Repoman-3.0.1
    Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
    Signed-off-by: David Seifert <soap@gentoo.org>

 net-mail/dbmail/dbmail-3.2.3-r2.ebuild             | 138 ---------------------
 net-mail/dbmail/dbmail-3.2.3-r3.ebuild             | 133 ++++++++++++++++++++
 .../dbmail/files/dbmail-3.2.3-fno-common.patch     |  14 +++
 net-mail/dbmail/files/dbmail-imapd.initd           |   2 +-
 net-mail/dbmail/files/dbmail-lmtpd.initd           |   2 +-
 net-mail/dbmail/files/dbmail-pop3d.initd           |   2 +-
 net-mail/dbmail/files/dbmail-timsieved.initd       |   2 +-
 7 files changed, 151 insertions(+), 142 deletions(-)