Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634502 - >=net-fs/nfs-utils-2.1.2_rc5[kerberos]: ../../support/nfs/libnfs.a(cacheio.o): In function `cache_flush': cacheio.c:(.text+0x592): undefined reference to `etab'
Summary: >=net-fs/nfs-utils-2.1.2_rc5[kerberos]: ../../support/nfs/libnfs.a(cacheio.o)...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 636854 642002 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-10-17 01:26 UTC by Seong-ho Cho
Modified: 2019-11-27 02:26 UTC (History)
9 users (show)

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


Attachments
build error log produced by =net-fs/nfs-utils-2.1.2_rc5 (build.log,81.78 KB, text/plain)
2017-10-17 03:03 UTC, Seong-ho Cho
Details
This patch eliminates 'undefined reference to `etab`' (nfs-utils-2.1.2_rc6-cacheio-etab.patch,477 bytes, patch)
2017-10-23 01:15 UTC, Seong-ho Cho
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seong-ho Cho 2017-10-17 01:26:03 UTC
Yes, as we can see on above summary, I have met error message on nfs-utils-2.1.2_rc5 and rc6, during building general purpose nfs storage server.

I noticed bug 614948 to resolve 'undefined reference major' problem, before to try to emerge rc5 and rc6, I believed that will resolve all existing bugs, but It does not in real.

I really want to drill down nfs-utils' source tree to find where causes this error, but I just can do this on weekend, so I request patch for this.

Thanks for advance.
Comment 1 Seong-ho Cho 2017-10-17 02:11:06 UTC
here is my emerge --info

---------------------

Portage 2.3.11 (python 3.5.4-final-0, default/linux/amd64/13.0, gcc-7.2.0, glibc-2.25-r7, 4.9.34-gentoo x86_64)
=================================================================
System uname: Linux-4.9.34-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5520_@_2.27GHz-with-gentoo-2.4.1
KiB Mem:    12234668 total,   5632416 free
KiB Swap:   67108860 total,  67108860 free
Timestamp of repository gentoo: Mon, 16 Oct 2017 06:30:01 +0000
Head commit of repository gentoo: 4662478559d66ea1da41fbe9ad333730a67da8bf
sh bash 4.4_p12
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.26.9999::gentoo
dev-lang/python:          2.7.14::gentoo, 3.4.6::gentoo, 3.5.4::gentoo
dev-util/cmake:           3.9.4::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.33::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo, 2.29.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.3.0::gentoo, 7.2.0::gentoo
sys-devel/gcc-config:     1.9.0::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
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/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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"
GENTOO_MIRRORS="http://ftp.lanet.kr/pub/gentoo"
LANG="ko_KR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j10 -l16"
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 amd64 audit berkdb bzip2 cjk cli cracklib crypt cscope cxx dri fortran gdbm geoip gpm iconv icu iodbc ipv6 json kerberos ldap libedit lzma modules multilib ncurses nfsdcld nfsv41 nls nptl openmp pam pcre python readline seccomp session sqlite ssl tcl tcpd terminal tools unicode urandom uuid valgrind vim-pager warmstarts xattr xml yaml 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 popcnt sse sse2 sse3 sse4_1 sse4_2 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="ko" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ko" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Seong-ho Cho 2017-10-17 03:03:34 UTC
Created attachment 498932 [details]
build error log produced by =net-fs/nfs-utils-2.1.2_rc5

I was about to forget to bring this attachment.

error msgs showing on rc5 and rc6 are the same.
Comment 3 Seong-ho Cho 2017-10-17 07:06:23 UTC
I reported the same bug into here

https://bugzilla.linux-nfs.org/show_bug.cgi?id=315
Comment 4 Seong-ho Cho 2017-10-23 01:15:46 UTC
Created attachment 499734 [details, diff]
This patch eliminates 'undefined reference to `etab`'

I don't know what etab is for exactly(Line #233, in support/nfs/cacheio.c), because there is no enough description in support/include/nfslib.h.

228                 "nfsd.export",
229                 NULL
230         };
231         now = time(0);
232         if (force ||
233             stat(etab.statefn, &stb) != 0 ||
234             stb.st_mtime > now)
235                 stb.st_mtime = time(0);
236 
237         sprintf(stime, "%ld\n", stb.st_mtime);

but I just found that this line just breaks compile process, so I just changed line #233 as a comment. I need more help, to find problem whether my patch has side-effect or not.
Comment 5 Samuel Bernardo 2017-11-09 01:20:00 UTC
I have exactly the same problem.
Is there any news about this compile error?

I already search for it and can't find any clue... Can it be the gcc version or a lib missing problem?
Comment 6 Seong-ho Cho 2017-11-14 00:20:32 UTC
(In reply to Samuel Bernardo from comment #5)
> I have exactly the same problem.
> Is there any news about this compile error?
> 
> I already search for it and can't find any clue... Can it be the gcc version
> or a lib missing problem?

duh, Lars seems found that using 'kerberos' flag occurs compilation fail.
and he proved that my patch is useless and unrelated for this problem(Thanks!!!!!).

I tried compile again with excluding 'kerberos' and I saw that all is done.
I do not know why and how excluding 'kerberos' can resolve compilation error. :$
Comment 7 cbdougla 2017-11-14 23:09:24 UTC
My terrible coding skills prompted me to try this in cacheio.c

30c30
< extern struct state_paths etab;
---
> struct state_paths etab;

removing the extern declaration allowed a clean compile and etab is now located in the cacheio.o object file where it was undefined before.  

ella nfs # nm cacheio.o
                 U __ctype_b_loc
                 U __ctype_toupper_loc
                 U __errno_location
                 U __snprintf_chk
                 U __sprintf_chk
                 U __xstat
00000000000004e1 T cache_flush
0000000000000000 r cachelist.8621
                 U close
0000000000000018 C etab
                 U open
0000000000000000 T qword_add
000000000000020e T qword_addeol
00000000000000b4 T qword_addhex
0000000000000180 T qword_addint
00000000000001c7 T qword_adduint
0000000000000222 T qword_get
000000000000044b T qword_get_int
0000000000000496 T qword_get_uint
                 U strerror
                 U strtol
                 U strtoul
                 U time
                 U write
                 U xlog_warn

I also tried including "nfslib.h" in addition to <nfslib.h> but this seemed to make no difference at all (though I suspect "nfslib.h" might be the better choice).

Obviously there are still undefined references to other things and those are apparently ok.  I am sure someone far more talented than I will fix this for real but I thought I'd add my $0.02.
Comment 8 Samuel Bernardo 2017-12-06 15:51:39 UTC
I think the bug report #636854 maybe related to this.
Comment 9 Ben Kohler gentoo-dev 2017-12-27 19:04:57 UTC
*** Bug 642002 has been marked as a duplicate of this bug. ***
Comment 10 Ben Kohler gentoo-dev 2017-12-27 19:05:10 UTC
*** Bug 636854 has been marked as a duplicate of this bug. ***
Comment 11 Matt Turner gentoo-dev 2019-09-02 05:44:29 UTC
Can anyone reproduce with a version in tree?
Comment 12 David Klempner 2019-11-27 02:26:56 UTC
I can confirm that I had this on my package.use hack list as a problem in the past and it works for me now (with 2.4.2-r1)