Bug 248289

Summary: net/haproxy: Fails to link on i386: undefined reference to `__atomic_*`
Product: Ports & Packages Reporter: Victor Sudakov <vas>
Component: Individual Port(s)Assignee: Dmitry Sivachenko <demon>
Status: Open ---    
Severity: Affects Many People CC: vas
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (demon)
koobs: merge-quarterly?
Hardware: i386   
OS: Any   
Description Flags
Poudriere log none

Description Victor Sudakov 2020-07-27 04:59:21 UTC
Created attachment 216793 [details]
Poudriere log

Build log.

src/backend.o: In function `assign_server':
backend.c:(.text+0xd20): undefined reference to `__atomic_fetch_add_8'
backend.c:(.text+0xd32): undefined reference to `__atomic_fetch_add_8'
src/backend.o: In function `assign_server_and_queue':
backend.c:(.text+0x1520): undefined reference to `__atomic_fetch_add_8'
backend.c:(.text+0x153a): undefined reference to `__atomic_fetch_add_8'
backend.c:(.text+0x160a): undefined reference to `__atomic_fetch_add_8'
src/backend.o:backend.c:(.text+0x1624): more undefined references to `__atomic_fetch_add_8' follow
src/trace.o: In function `cli_parse_trace':
trace.c:(.text+0xd88): undefined reference to `__atomic_compare_exchange_8'
trace.c:(.text+0xe89): undefined reference to `__atomic_compare_exchange_8'
trace.c:(.text+0xf1c): undefined reference to `__atomic_compare_exchange_8'
trace.c:(.text+0x11f8): undefined reference to `__atomic_fetch_and_8'
trace.c:(.text+0x16e8): undefined reference to `__atomic_fetch_or_8'
src/time.o: In function `tv_update_date':
time.c:(.text+0x67f): undefined reference to `__atomic_compare_exchange_8'
time.c:(.text+0x867): undefined reference to `__atomic_compare_exchange_8'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [Makefile:864: haproxy] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/net/haproxy/work/haproxy-2.2.1'
*** Error code 1

make: stopped in /usr/ports/net/haproxy
=>> Cleaning up wrkdir
===>  Cleaning for haproxy-2.2.1
build of net/haproxy | haproxy-2.2.1 ended at Mon Jul 27 11:11:37 +07 2020
build time: 00:00:15
!!! build failure encountered !!!
Comment 1 commit-hook freebsd_committer 2020-07-28 21:14:57 UTC
A commit references this bug:

Author: demon
Date: Tue Jul 28 21:14:16 UTC 2020
New revision: 543634
URL: https://svnweb.freebsd.org/changeset/ports/543634

  Try to fix i386 builds: use GCC and -march=i586
  to fix undefined symbol: __atomic_fetch_add_8.

  PR:		248289
  Reported by:	Victor Sudakov <vas@sibptus.ru>