Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 698422 - sys-fs/multipath-tools fails to compile any version: mpath_persist.c:175:10: error: called object 'major' is not a function or function pointer
Summary: sys-fs/multipath-tools fails to compile any version: mpath_persist.c:175:10: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-23 22:03 UTC by Robin Johnson
Modified: 2019-11-27 20:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2019-10-23 22:03:41 UTC
No version of multipath-tools presently in the tree compiles successfully on infra boxes. The same failure occurs in:
0.6.4-r1
0.7.9
0.8.1
0.8.2
0.8.3

make[1]: Entering directory '/var/tmp/portage/sys-fs/multipath-tools-0.6.4-r1/work/multipath-tools-0.6.4/libmpathpersist'
x86_64-pc-linux-gnu-gcc -c -O2 -g -pipe -Wall -Wextra -Wformat=2 -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmultipath -I../libmpathpersist -I../libmpathcmd *.c
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
mpath_persist.c: In function 'mpath_persistent_reserve_in':
mpath_persist.c:175:10: error: called object 'major' is not a function or function pointer
  major = major(info.st_rdev);
          ^~~~~
mpath_persist.c:161:6: note: declared here
  int major, minor;
      ^~~~~
mpath_persist.c:176:10: error: called object 'minor' is not a function or function pointer
  minor = minor(info.st_rdev);
          ^~~~~
mpath_persist.c:161:13: note: declared here
  int major, minor;
             ^~~~~
mpath_persist.c: In function 'mpath_persistent_reserve_out':
mpath_persist.c:269:10: error: called object 'major' is not a function or function pointer
  major = major(info.st_rdev);
          ^~~~~
mpath_persist.c:251:6: note: declared here
  int major, minor;
      ^~~~~
mpath_persist.c:270:10: error: called object 'minor' is not a function or function pointer
  minor = minor(info.st_rdev);
          ^~~~~
mpath_persist.c:251:13: note: declared here
  int major, minor;
             ^~~~~
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition
make[1]: *** [Makefile:17: libmpathpersist.so.0] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-fs/multipath-tools-0.6.4-r1/work/multipath-tools-0.6.4/libmpathpersist'
make: *** [Makefile:41: recurse] Error 2
 * ERROR: sys-fs/multipath-tools-0.6.4-r1::gentoo failed (compile phase):
 *   emake failed

# emerge --info
Portage 2.3.77 (python 3.6.5-final-0, default/linux/amd64/17.0/hardened, gcc-7.3.0, glibc-2.28-r6, 4.14.80-gentoo-infra38 x86_64)
=================================================================
System uname: Linux-4.14.80-gentoo-infra38-x86_64-Intel-R-_Xeon-R-_CPU_E5-2620_v4_@_2.10GHz-with-gentoo-2.4.1
KiB Mem:   131978480 total,  68302852 free
KiB Swap:    4194300 total,   4194300 free
Timestamp of repository gentoo: Wed, 23 Oct 2019 17:15:01 +0000
Head commit of repository gentoo: beae54aa090caf6f225fac2e0f692a9f6fe809c5
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-lang/perl:            5.28.2-r1::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo, 7.3.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r6::gentoo
Repositories:

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

infra-overlay
    location: /usr/local/infra-overlay
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dev.d /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/scsi_id.config /etc/terminfo /etc/udev"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/portage/distfiles/"
EMERGE_DEFAULT_OPTS="-q --color=n --newuse --selective=n --jobs 8 --load-average 32"
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"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms split-elog split-log splitdebug strict unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/ http://distfiles.gentoo.org rsync://dipper.gentoo.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j 32 -l 32"
PKGDIR="/var/cache/portage/packages/"
PORTAGE_BINHOST="https://binpkg.infra.gentoo.org/packages/amd64/All"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--ipv4"
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 amd64 bash-completion berkdb bzip2 crypt cxx gdbm hardened iconv ipv6 jpeg libtirpc libwww maildir mmx multilib ncurses nptl nptlonly openmp pam pcre perl pie png ptpax python readline seccomp split-usr ssl ssp tcpd unicode urandom vim-syntax xattr xml xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" 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 keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-1" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="account chaos checksum condition delude dhcpmac dnetmap echo fuzzy geoip gradm iface ipmark ipp2p ipset ipv4options length2 logmark lscan pknock psd quota2 rawnat steal sysrq tarpit tee"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 1 Mike Gilbert gentoo-dev 2019-10-24 03:03:49 UTC
I cannot reproduce this.

major() and minor() are macros defined in sys/sysmacros.h.

mpath_persist.c does not include sys/sysmacros.h directly, but it should get pulled in implicitly via libudev.h.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-11-27 20:52:07 UTC
Maybe too old libudev.h?

https://github.com/systemd/systemd/commit/27d13af71c3af6b2f9b60556d2c046dbb6e36e23 >=systemd/udev-230

https://github.com/gentoo/eudev/commit/d3aab3bde9ce72ed27405e0f6c9a2fe67d45b43a >=eudev-3.2.1
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2019-11-27 20:52:45 UTC
whissi@woodpecker ~ $ udevadm --version
216
Comment 4 Larry the Git Cow gentoo-dev 2019-11-27 20:58:37 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fff7e7bd17fb3b933a3845e69099c70e037d142

commit 9fff7e7bd17fb3b933a3845e69099c70e037d142
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-11-27 20:55:53 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-11-27 20:57:40 +0000

    sys-fs/multipath-tools: rev bump
    
    - Fix pkgconfig file install location
    
    - Set run dir to /run
    
    - Update multipathd runscript
    
    - Require >=libudev-232 for sys/sysmacros.h.
    
    Closes: https://bugs.gentoo.org/685314
    Closes: https://bugs.gentoo.org/698422
    Package-Manager: Portage-2.3.80, Repoman-2.3.19
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 sys-fs/multipath-tools/files/multipathd-r1.rc      | 12 +++
 .../multipath-tools-0.8.3-r1.ebuild                | 91 ++++++++++++++++++++++
 2 files changed, 103 insertions(+)