Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604230 - sys-cluster/vzctl-4.9.4 : config.c:1250:10: error: called object 'major' is not a function or function pointer
Summary: sys-cluster/vzctl-4.9.4 : config.c:1250:10: error: called object 'major' is n...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at if you want to take care of it
: 633710 (view as bug list)
Depends on:
Blocks: glibc-sysmacros
  Show dependency tree
Reported: 2016-12-31 09:27 UTC by Toralf Förster
Modified: 2017-10-20 21:28 UTC (History)
1 user (show)

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

config.log (config.log,71.03 KB, text/plain)
2016-12-31 09:27 UTC, Toralf Förster
emerge-history.txt (emerge-history.txt,166.44 KB, text/plain)
2016-12-31 09:27 UTC, Toralf Förster
environment (environment,82.65 KB, text/plain)
2016-12-31 09:27 UTC, Toralf Förster
etc.portage.tbz2 (etc.portage.tbz2,11.73 KB, application/x-bzip)
2016-12-31 09:27 UTC, Toralf Förster
sys-cluster:vzctl-4.9.4:20161231-014709.log (sys-cluster:vzctl-4.9.4:20161231-014709.log,46.37 KB, text/plain)
2016-12-31 09:27 UTC, Toralf Förster

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2016-12-31 09:27:14 UTC
config.c: In function 'store_dev':
config.c:1250:10: error: called object 'major' is not a function or function pointer
  major = major(res->dev);     \
config.c:1293:3: note: in expansion of macro 'PRINT_DEV'


  This is an unstable amd64 chroot image (named 13.0-unstable_20161228-111033) at a hardened host acting as a tinderbox.

  from make.conf:
USE="  pax_kernel xtpax -cdinstall -oci8 -bindist ssp avformat gzip kvm -mdnsresponder-compat melt mpi opencv php postproc pwquality sql system-jpeg system-llvm tracepath ufed -wma xcb xvmc"

gcc-config -l:
 [1] x86_64-pc-linux-gnu-5.4.0 *
llvm-config --version:

Available Python interpreters, in order of preference:
  [1]   python2.7
  [2]   python3.4
Available Ruby profiles:
  [1]   ruby21 (with Rubygems) *


$ cat emerge-info.txt
Portage 2.3.3 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.24, 4.8.15-hardened x86_64)
                         System Settings
System uname: Linux-4.8.15-hardened-x86_64-Intel-R-_Core-TM-_i7-3930K_CPU_@_3.20GHz-with-gentoo-2.3
KiB Mem:    65285560 total,   4153316 free
KiB Swap:   67108860 total,  67091440 free
Timestamp of repository gentoo: Fri, 30 Dec 2016 23:22:39 +0000
sh bash 4.4_p5-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.4_p5-r1::gentoo
dev-lang/perl:            5.24.1_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.27::gentoo
sys-devel/gcc:            5.4.0-r2::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.9::gentoo (virtual/os-headers)
sys-libs/glibc:           2.24::gentoo

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

    location: /tmp/tb/data/portage
    masters: gentoo
    priority: 2

    location: /usr/local/portage
    masters: gentoo
    priority: 99

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -march=native -Wall"
CONFIG_PROTECT="/etc /etc/omega.conf /etc/stunnel/stunnel.conf /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native"
EMERGE_DEFAULT_OPTS="--verbose --verbose-conflicts --color=n --nospinner --tree --quiet-build"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox parallel-fetch preserve-libs protect-owned sandbox sfperms strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" rsync:// rsync://"
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="acl amd64 avformat berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm gzip iconv ipv6 kvm melt mmx mmxext modules mpi multilib ncurses nls nptl opencv openmp pam pax_kernel pcre php postproc pwquality readline seccomp session sql sse sse2 ssl ssp system-jpeg system-llvm tcpd tracepath ufed unicode xattr xcb xtpax xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" L10N="doi is te zh" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" 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 i965" 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 Toralf Förster gentoo-dev 2016-12-31 09:27:20 UTC
Created attachment 458100 [details]
Comment 2 Toralf Förster gentoo-dev 2016-12-31 09:27:23 UTC
Created attachment 458102 [details]
Comment 3 Toralf Förster gentoo-dev 2016-12-31 09:27:25 UTC
Created attachment 458104 [details]
Comment 4 Toralf Förster gentoo-dev 2016-12-31 09:27:28 UTC
Created attachment 458106 [details]
Comment 5 Toralf Förster gentoo-dev 2016-12-31 09:27:31 UTC
Created attachment 458108 [details]
Comment 6 Agostino Sarubbo gentoo-dev 2017-01-10 15:12:43 UTC
script mistake, sorry
Comment 7 Joakim 2017-10-07 20:29:44 UTC
So, if I understand this correctly the simple fix here is to add the line

#include <sys/sysmacros.h>

to /src/lib/config.c

which seems to be a fairly simple operation, if you know how to write a patch for the ebuild adding this...

if someone just is willing to post the proper bits here, I'm willing to copy/paste and test it ;-)

btw, I opened #633710 as somehow my search never picked up this one, while google did as went for a solution to my problem. Obviously a duplicate...
Comment 8 Joakim 2017-10-07 20:30:20 UTC
*** Bug 633710 has been marked as a duplicate of this bug. ***
Comment 9 Joakim 2017-10-08 10:18:49 UTC
Actually, I think I have solved it, probably not the most elegant solution but hey I'm not a C or C++ developer ;-) So I spent some time reading the dev manual and then added a batch of sed calls into src_prepare, injecting #include  <sys/sysmacros.h> on line preceeding types.h in all .c and .h files, plus config.guess

This is probably not the solution wanted here as a path would probably be better, but it works for me and I just need this package to compile for now as I'm on a tight Monday 10am leach to have my box up an running.

Once that's done I may spend some time on testing if all those injections really are needed or not and present a final list of sed injections.
Comment 10 Larry the Git Cow gentoo-dev 2017-10-20 21:28:46 UTC
The bug has been closed via the following commit(s):

commit 671e279dc14f829cf52b0bf95df2b4221edf54ba
Author:     Andreas K. Hüttel <>
AuthorDate: 2017-10-20 21:28:30 +0000
Commit:     Andreas K. Hüttel <>
CommitDate: 2017-10-20 21:28:30 +0000

    sys-cluster/vzctl: Fix build with glibc-2.25, bug 604230
    Package-Manager: Portage-2.3.12, Repoman-2.3.3

 .../vzctl/files/vzctl-4.9.4-glibc225-2.patch       | 33 ++++++++++++++++++++++
 sys-cluster/vzctl/files/vzctl-4.9.4-glibc225.patch | 11 ++++++++
 sys-cluster/vzctl/vzctl-4.9.4.ebuild               |  5 +++-
 3 files changed, 48 insertions(+), 1 deletion(-)