Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 614948 - net-fs/nfs-utils-2.1.1 - fails to build: device-discovery.c:(.text+0x4ae): undefined reference to `major'
Summary: net-fs/nfs-utils-2.1.1 - fails to build: device-discovery.c:(.text+0x4ae): un...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Keywords: PATCH
Depends on:
Blocks: glibc-sysmacros 615396
  Show dependency tree
Reported: 2017-04-07 20:58 UTC by Erik Fjeldstrom
Modified: 2017-12-15 22:17 UTC (History)
2 users (show)

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

Added missing sysmacros.h headers (sysmacros.patch,676 bytes, patch)
2017-04-07 21:01 UTC, Erik Fjeldstrom
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Fjeldstrom 2017-04-07 20:58:49 UTC
nfs-utils-2.1.1 appears to be missing the sysmacros.h header in a couple of files in the utils/blkmapd directory.

Use flags: caps ipv6 libmount nfsdcld nfsidmap nfsv4 nfsv41 tcpd uuid

Build error:
device-discovery.c: In function ‘bl_add_disk’:
device-discovery.c:156:28: warning: implicit declaration of function ‘major’ [-Wimplicit-function-declaration]
  } else if (dm_is_dm_major(major(dev)))
device-discovery.c: In function ‘main’:
device-discovery.c:479:3: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
   ftruncate(pidfd, 0);
device-discovery.c:481:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
   write(pidfd, pidbuf, strlen(pidbuf));
/bin/sh ../../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -Wall -Wextra -Wstrict-prototypes  -pipe -D_LARGEFILE64_SOURCE -O2 -pipe -march=native  -Wl,-O1 -Wl,--as-needed -o blkmapd device-discovery.o device-inq.o device-process.o dm-device.o -ldevmapper ../../support/nfs/libnfs.a
libtool: link: x86_64-pc-linux-gnu-gcc -Wall -Wextra -Wstrict-prototypes -pipe -D_LARGEFILE64_SOURCE -O2 -pipe -march=native -Wl,-O1 -o blkmapd device-discovery.o device-inq.o device-process.o dm-device.o  -Wl,--as-needed -ldevmapper ../../support/nfs/libnfs.a
device-discovery.o: In function `bl_add_disk':
device-discovery.c:(.text+0x4ae): undefined reference to `major'

Reproducible: Always

Steps to Reproduce:
1. emerge =net-fs/nfs-utils-2.1.1 with the use flags above.
Actual Results:  
The build should succeed.

Expected Results:  
The build failed.

Portage 2.3.5 (python 3.4.6-final-0, default/linux/amd64/13.0/systemd, gcc-6.3.0, glibc-2.25, 4.10.8-gentoo x86_64)
System uname: Linux-4.10.8-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.3
KiB Mem:     2028784 total,    234376 free
KiB Swap:    8388604 total,   8386048 free
Timestamp of repository gentoo: Fri, 07 Apr 2017 07:15:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28 p1.0) 2.28
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.7.2-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.24.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.69-r2::gentoo
sys-devel/automake:       1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28::gentoo
sys-devel/gcc:            6.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -march=native"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="X acl amd64 berkdb bzip2 caps cli cracklib crypt cxx dbus dri fortran gdbm gtk gtk3 iconv ipv6 lzma modules multilib ncurses nls nptl openmp pam pcre readline seccomp session ssl systemd tcpd udev unicode xattr zlib" ABI_X86="64" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" LLVM_TARGETS="BPF" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel" 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"
Comment 1 Erik Fjeldstrom 2017-04-07 21:01:18 UTC
Created attachment 469432 [details, diff]
Added missing sysmacros.h headers

Adding the missing headers allowed the build to complete successfully.
Comment 2 Holger Hoffstätte 2017-04-26 08:56:32 UTC
+1 confirmed; my understanding is that this is due to header changes in glibc-2.25.
Comment 3 Holger Hoffstätte 2017-05-04 16:36:03 UTC
FWIW this is fixed (via autoconf) in the upcoming 2.1.2 release; current git no longer requires the patch.
Comment 4 Lars Wendler (Polynomial-C) gentoo-dev 2017-05-11 08:42:05 UTC
I've added nfs-utils-2.1.2_rc2 to the tree (without KEYWORDS). I gonna close this bug once final 2.1.2 release is available.
Comment 5 Perfect Gentleman 2017-08-15 13:41:21 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #4)
> I've added nfs-utils-2.1.2_rc2 to the tree (without KEYWORDS). I gonna close
> this bug once final 2.1.2 release is available.

please, update it to rc5
Comment 6 Andreas K. Hüttel gentoo-dev 2017-10-20 20:28:28 UTC
Ping - this is now blocking glibc-2.25 stabilization.
Comment 7 Pacho Ramos gentoo-dev 2017-12-15 22:17:19 UTC
we finally have 2.2.1 (and even a newer rc) in the tree