Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 720806 - net-misc/dhcp fails to compile
Summary: net-misc/dhcp fails to compile
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://gitlab.isc.org/isc-projects/d...
Whiteboard:
Keywords:
: 729774 (view as bug list)
Depends on:
Blocks: 720694 libatomic-linking
  Show dependency tree
 
Reported: 2020-05-03 12:23 UTC by Agostino Sarubbo
Modified: 2020-12-29 20:09 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,226.95 KB, text/plain)
2020-05-03 12:24 UTC, Agostino Sarubbo
Details
build.log (arm) (file_720806.txt,52.80 KB, text/plain)
2020-05-07 12:50 UTC, Sam James
Details
20201228-dhcp-4.4.2-r3-missing-atomic-lib.patch (20201228-dhcp-4.4.2-r3-missing-atomic-lib.patch,853 bytes, patch)
2020-12-28 19:23 UTC, Robin Johnson
Details | Diff
build log (file_720806.txt,6.64 KB, text/plain)
2020-12-29 20:06 UTC, Chuckery Towers
Details
build failure log (file_720806.txt,936 bytes, text/plain)
2020-12-29 20:08 UTC, Chuckery Towers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-05-03 12:23:54 UTC
This is an auto-filled bug because net-misc/dhcp fails to compile.
The issue was originally discovered on ppc, but it may be reproducible on other arches as well.
If you think that a different summary clarifies the issue better, feel free to change it.
Attached build log and emerge --info.
Comment 1 Agostino Sarubbo gentoo-dev 2020-05-03 12:24:02 UTC
Created attachment 635836 [details]
build.log

build log and emerge --info
Comment 2 Sam James archtester gentoo-dev Security 2020-05-03 12:26:20 UTC
This looks very similar to some other bugs we've seen on ppc. The fix is to link against -latomic.
Comment 3 Thomas Deutschmann gentoo-dev Security 2020-05-03 13:30:59 UTC
Please confirm if you can reproduce with net-misc/dhcp-4.4.1.
Comment 4 Agostino Sarubbo gentoo-dev 2020-05-04 14:28:33 UTC
4.4.1 works for me
Comment 5 Sam James archtester gentoo-dev Security 2020-05-07 12:50:54 UTC
Created attachment 636720 [details]
build.log (arm)

I've just hit the same on arm.
Comment 6 Sam James archtester gentoo-dev Security 2020-05-07 12:51:47 UTC
Comment on attachment 636720 [details]
build.log (arm)

Portage 2.3.89 (python 3.6.10-final-0, default/linux/arm/17.0/armv6j, gcc-9.3.0, glibc-2.30-r8, 4.19.113-v7+ armv7l)
=================================================================
System uname: Linux-4.19.113-v7+-armv7l-ARMv7_Processor_rev_5_-v7l-with-gentoo-2.6
KiB Mem:      948244 total,     19660 free
KiB Swap:    4194300 total,   3943384 free
Timestamp of repository gentoo: Thu, 07 May 2020 10:05:29 +0000
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.3 armv6j-unknown-linux-gnueabihf [enabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.18::gentoo, 3.6.10-r2::gentoo, 3.7.7-r2::gentoo, 3.8.2-r2::gentoo
dev-util/cmake:           3.16.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r2::gentoo, 2.32-r1::gentoo, 2.33.1-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo, 9.3.0::gentoo
sys-devel/gcc-config:     2.2.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r8::gentoo
Repositories:

gentoo
    location: /bound/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="@FREE"
CBUILD="armv6j-unknown-linux-gnueabihf"
CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -fdiagnostics-show-option -frecord-gcc-switches"
CHOST="armv6j-unknown-linux-gnueabihf"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /etc/grs/systems.conf /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
DISTDIR="/bound/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/share/doc/*/*.pdf /usr/share/man/*/*"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en en_GB"
MAKEOPTS="-j10 -l10"
PKGDIR="/usr/portage/packages"
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 arm berkdb bzip2 cli crypt dri fortran gdbm iconv ipv6 ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ADA_TARGET="gnat_2018" 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb v4 v5 v6" 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 en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Sam James archtester gentoo-dev Security 2020-06-26 21:32:26 UTC
*** Bug 729774 has been marked as a duplicate of this bug. ***
Comment 8 Chuckery Towers 2020-12-26 20:16:31 UTC
This is my first ever proposed bug fix, so please be gentle with me if I have made a mistake.

In my circumstances, this appeared to work:-

/etc/portage/patches/net-misc/dhcp-4.4.2-r3/dhcp-4.4.2-r3-missing-library-720806.patch
============

---%<---
# Gentoo Bug 720806 - net-misc/dhcp fails to compile 
# https://bugs.gentoo.org/720806

# Compilation may fail because "-latomic" is not specified where necessary
# Applies to "net-misc/dhcp-4.4.2-r3" and possibly others
# This patch by Graham Bosworth, graham@ChuckeryTowers.plus.com, 2020-12-26

# The necessary clue came from the second comment in the bug history,
# https://bugs.gentoo.org/720806#c2


--- ./omapip/Makefile.in
+++ ./omapip/Makefile.in
274c274
< LIBS = @LIBS@
---
> LIBS =        @LIBS@  -latomic


--- ./client/Makefile.in
+++ ./client/Makefile.in
293c293
< LIBS = @LIBS@
---
> LIBS =        @LIBS@  -latomic


--- ./dhcpctl/Makefile.in
+++ ./dhcpctl/Makefile.in
271c271
< LIBS = @LIBS@
---
> LIBS =        @LIBS@  -latomic


--- ./relay/Makefile.in
+++ ./relay/Makefile.in
285c285
< LIBS = @LIBS@
---
> LIBS =        @LIBS@  -latomic


--- ./server/Makefile.in
+++ ./server/Makefile.in
319c319
< LIBS = @LIBS@
---
> LIBS =        @LIBS@  -latomic


--->%---
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-12-28 19:23:16 UTC
Created attachment 680101 [details, diff]
20201228-dhcp-4.4.2-r3-missing-atomic-lib.patch
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-12-28 19:25:33 UTC
@Chuckery Towers, @Sam:
Can you please test my alternate patch on your systems? Just apply to the ebuild and see if it then builds for you.

Generally with autoconf you don't need to patch Makefiles like you're doing, because it provides build-time means to inject the values.

What I'm not sure about, is this bundles BIND9 and uses parts for building, and the failure was inside BIND9's build, not in the plain dhcp portion.
Comment 11 Chuckery Towers 2020-12-29 20:06:39 UTC
Created attachment 680218 [details]
build log

Build failure with /etc/portage/patches/...
Comment 12 Chuckery Towers 2020-12-29 20:08:23 UTC
Created attachment 680221 [details]
build failure log

Building failed again with the proposed patch in another location.
Comment 13 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2020-12-29 20:09:14 UTC
(In reply to Chuckery Towers from comment #11)
> Created attachment 680218 [details]
> build log
> 
> Build failure with /etc/portage/patches/...

You need to apply my patch to the ebuild directly, not dump it in /etc/portage/patches.

patch -p1 /usr/portage/net-misc/dhcp/dhcp-4.4.2-r3.ebuild <.../20201228-dhcp-4.4.2-r3-missing-atomic-lib.patch