Bug 257672 - mail/vpopmail "ld: error: duplicate symbol: MYSQL_READ_DATABASE" Freebsd 13.0-Release-p3
Summary: mail/vpopmail "ld: error: duplicate symbol: MYSQL_READ_DATABASE" Freebsd 13.0...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-07 15:30 UTC by tobias.niethammer
Modified: 2024-01-10 10:24 UTC (History)
4 users (show)

See Also:


Attachments
patch Vpopmail Makefile (245 bytes, patch)
2021-10-04 23:16 UTC, rob
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tobias.niethammer 2021-08-07 15:30:23 UTC
during Buld with mysql-auth some duplicate symbol errors shown up, which stops the build

cc  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing   -fstack-protector-strong  -o vkill vkill.o libvpopmail.a -L/usr/local/lib/mysql  -lmysqlclient -lz -lm -lcrypt
ld: error: duplicate symbol: MYSQL_READ_DATABASE
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_DATABASE)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x30) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_PASSWD
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_PASSWD)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x28) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_PORT
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_PORT)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x18) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_SERVER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_SERVER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x8) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_SOCKET
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_SOCKET)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x10) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_USER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_USER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x20) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_DATABASE
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_DATABASE)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x58) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_PASSWD
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_PASSWD)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x50) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_PORT
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_PORT)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x40) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_SERVER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_SERVER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x38) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_SOCKET
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_SOCKET)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x60) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_USER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_USER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x48) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_VPORT
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_VPORT)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x2350) in archive libvpopmail.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [Makefile:552: vconvert] Error 1
gmake[4]: *** Waiting for unfinished jobs....
gmake[4]: Leaving directory '/tmp/portbuild/usr/ports/mail/vpopmail/work/vpopmail-5.4.33'
gmake[3]: *** [Makefile:714: all-recursive] Error 1
gmake[3]: Leaving directory '/tmp/portbuild/usr/ports/mail/vpopmail/work/vpopmail-5.4.33'
gmake[2]: *** [Makefile:424: all] Error 2
gmake[2]: Leaving directory '/tmp/portbuild/usr/ports/mail/vpopmail/work/vpopmail-5.4.33'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 tobias.niethammer 2021-08-24 19:29:53 UTC
adding following to the Makefile solves the issue

CFLAGS+=	-fcommon
Comment 2 rob 2021-10-04 23:06:51 UTC
can confirm this works
Comment 3 rob 2021-10-04 23:16:47 UTC
Created attachment 228447 [details]
patch Vpopmail Makefile
Comment 4 Matt Simerson 2021-11-19 06:50:39 UTC
Aye, this does indeed solve the problem on FreeBSD. 

# uname -a
FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:38:07 UTC 2021     root@arm64-builder.daemonology.net:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC  arm64
Comment 5 Joe 2023-01-20 21:11:43 UTC
This patch doesn't work for me. I know it has been a while but does anyone else have any suggestions?

# uname -a
FreeBSD suppressed 13.1-RELEASE FreeBSD 13.1-RELEASE releng/13.1-n250148-fc952ac2212 GENERIC amd64

make  all-recursive
Making all in cdb
cc  -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -fstack-protector-strong -o vconvert vconvert.o libvpopmail.a  -L/usr/local/lib/mysql  -lmysqlclient -lz -lm -lcrypt
ld: error: duplicate symbol: MYSQL_READ_SERVER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_SERVER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x8) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_SOCKET
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_SOCKET)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x10) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_PORT
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_PORT)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x18) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_USER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_USER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x20) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_PASSWD
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_PASSWD)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x28) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_READ_DATABASE
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_READ_DATABASE)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x30) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_SERVER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_SERVER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x38) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_SOCKET
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_SOCKET)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x60) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_PORT
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_PORT)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x40) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_USER
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_USER)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x48) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_PASSWD
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_PASSWD)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x50) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_DATABASE
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_DATABASE)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x58) in archive libvpopmail.a

ld: error: duplicate symbol: MYSQL_UPDATE_VPORT
>>> defined at vconvert.c
>>>            vconvert.o:(MYSQL_UPDATE_VPORT)
>>> defined at vauth.c
>>>            libvpopmail_a-vauth.o:(.bss+0x2224) in archive libvpopmail.a
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/mail/vpopmail/work/vpopmail-5.4.33
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/mail/vpopmail/work/vpopmail-5.4.33
*** Error code 1

Stop.
make: stopped in /usr/ports/mail/vpopmail/work/vpopmail-5.4.33
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-01-10 10:23:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=630c8e5c148438419a80d7e84f516b58a217a64f

commit 630c8e5c148438419a80d7e84f516b58a217a64f
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2024-01-10 09:44:40 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2024-01-10 10:22:45 +0000

    mail/vpopmail: Resurrect MYSQL option

    - Pet portclippy/portfmt
    - For now I have just added MySQL 8.0 in the supported variant. If other
      variant for MySQL works please reopen this ticket.

    This reverts commit e3586087ed3ae4cbb51ff4efb881a7af4fa27791.

    PR:             257672
    Reported by:    tobias.niethammer@projektb.net

 mail/vpopmail/Makefile  | 261 +++++++++++++++++++++++++-----------------------
 mail/vpopmail/pkg-plist |   1 +
 2 files changed, 135 insertions(+), 127 deletions(-)