Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel initramfs build fails due to new glibc has no rpc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Helsy7
n00b
n00b


Joined: 17 Nov 2017
Posts: 7

PostPosted: Fri Nov 17, 2017 10:39 am    Post subject: genkernel initramfs build fails due to new glibc has no rpc Reply with quote

Hi ,
i tried to update my initramfs with:
Code:
genkernel --luks --mdadm --lvm --install initramfs

and it fails with:
Code:
util-linux/mount.c:252:22: fatal error: rpc/rpc.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/Makefile.build:197: util-linux/mount.o] Error 1

rpc.h is normally part of glibc via a patch, but the gentoo team removed this patch:
https://bugs.gentoo.org/370645
https://bugs.gentoo.org/381391

Im still able to get rpc.h via the package libtirpc and the new location is tirpc/rpc/rpc.h and not in rpc/rpc.h
Still on the wrong place.
How to solve this problem?
I found a guideline how to port packages away from rpc:
https://wiki.gentoo.org/wiki/Project:Toolchain/RPC_implementation
But when i look in /usr/portage/disfiles/util-linux/util-linux-2.31.tar.gz/sys-utils/mount.c i cant find the pattern "rpc" within this file.
And i cant find the file mount.h
Does genkernel uses its own copy of util-linux ?

EDIT: noticed they use busybox and found the specific mount.c, Will open an issue in the genkernel git to add a patch
EDIT2: I found this issue from few days ago which describes the bug in busy box https://bugs.gentoo.org/637536, should i also open an issue for genkernel or is this enough ?
Back to top
View user's profile Send private message
Helsy7
n00b
n00b


Joined: 17 Nov 2017
Posts: 7

PostPosted: Fri Nov 17, 2017 11:18 am    Post subject: Re: genkernel initramfs build fails due to new glibc has no Reply with quote

Helsy7 wrote:
Hi ,
i tried to update my initramfs with:
Code:
genkernel --luks --mdadm --lvm --install initramfs

and it fails with:
Code:
util-linux/mount.c:252:22: fatal error: rpc/rpc.h: No such file or directory
compilation terminated.
make[1]: *** [scripts/Makefile.build:197: util-linux/mount.o] Error 1

rpc.h is normally part of glibc via a patch, but the gentoo team removed this patch:
https://bugs.gentoo.org/370645
https://bugs.gentoo.org/381391

Im still able to get rpc.h via the package libtirpc and the new location is tirpc/rpc/rpc.h and not in rpc/rpc.h
Still in the wrong place.
How to solve this problem?
I found a guideline how to port packages away from rpc:
https://wiki.gentoo.org/wiki/Project:Toolchain/RPC_implementation
But when i look in /usr/portage/disfiles/util-linux/util-linux-2.31.tar.gz/sys-utils/mount.c i cant find the pattern "rpc" within this file.
And i cant find the file mount.h
Does genkernel uses its own copy of util-linux ?

EDIT: noticed they use busybox and found the specific mount.c, Will open an issue in the genkernel git to add a patch
EDIT2: I found this issue from few days ago which describes the bug in busy box https://bugs.gentoo.org/637536 , should i also open an issue for genkernel or is this enough ?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30917
Location: here

PostPosted: Fri Nov 17, 2017 11:25 am    Post subject: Re: genkernel initramfs build fails due to new glibc has no Reply with quote

Helsy7 wrote:
EDIT2: I found this issue from few days ago which describes the bug in busy box https://bugs.gentoo.org/637536, should i also open an issue for genkernel or is this enough ?

The problem is related to busybox then I think that the existing bug is enough (it's not a genkernel problem)
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Helsy7
n00b
n00b


Joined: 17 Nov 2017
Posts: 7

PostPosted: Fri Nov 17, 2017 12:05 pm    Post subject: Re: genkernel initramfs build fails due to new glibc has no Reply with quote

Thx for the quick answer

In case someone has the same problem, i solved it:
in
Code:
 /usr/share/genkernel/defaults/busy-config

search for the line:
Code:
# CONFIG_FEATURE_MOUNT_NFS is not set

and edit it to:
Code:
CONFIG_FEATURE_MOUNT_NFS=n


and in
Code:
/usr/share/genkernel/gen_compile.sh

search for the line:
Code:
kconfig_set_opt "${TEMP}/busybox-config" CONFIG_FEATURE_MOUNT_NFS y

and edit it to:
Code:
kconfig_set_opt "${TEMP}/busybox-config" CONFIG_FEATURE_MOUNT_NFS n

Explanation: https://bugs.gentoo.org/637536
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21635

PostPosted: Sat Nov 18, 2017 1:10 am    Post subject: Reply with quote

If you make those changes to genkernel, you must also take steps to ensure that no new merges of genkernel overwrite those changes.
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1214
Location: Massachusetts USA

PostPosted: Sat Nov 18, 2017 2:23 am    Post subject: Reply with quote

The bug was fixed in genkernel-3.5.2.4 see 637446 - sys-kernel/genkernel-3.5.2.3 fails building busybox with missing rpc.h (since glibc-2.26?)
Back to top
View user's profile Send private message
dman777
Veteran
Veteran


Joined: 10 Jan 2007
Posts: 1004

PostPosted: Mon May 27, 2019 12:33 am    Post subject: Reply with quote

Using genkernel-3.5.1.1 so I do not have to use static libs from the latest version of genkernel.

I was getting the rpc missing directory error also, so I disabled NFS as mentioned in another post. Now I am getting these errors. I am doing this on a new Gentoo installation so I can use luks.

Any suggestions?

Code:
livecd portage # cat foo.txt
* Gentoo Linux Genkernel; Version 3.5.1.1
* Running with options: --luks --lvm initramfs

* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
* Linux Kernel 4.19.44-gentoo for x86_64...
* .. with config file /usr/share/genkernel/arch/x86_64/generated-config
* busybox: >> Using cache
* initramfs: >> Initializing...
*         >> Appending devices cpio data...
*         >> Appending base_layout cpio data...
*         >> Appending auxilary cpio data...
*         >> Copying keymaps
*         >> Appending busybox cpio data...
*         >> Appending lvm cpio data...
*           LVM: Adding support (compiling binaries)...
* lvm: >> Applying patches...
*           - lvm2-2.02.72-no-export-dynamic.patch
* lvm: >> Configuring...
* lvm: >> Compiling...
* ERROR: Failed to compile the "" target...
*
* -- Grepping log... --
*
*DEPS=`echo ../make.tmpl ../VERSION ../Makefile ../include/.symlinks_created | sed -e 's/\\//\\\\\\//g'`; \
*gcc -MM -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 -o misc/crc.d misc/crc.c; \
*sed -i "s/\(.*\)\.o[ :]*/$FILE.o $FILE.d $FILE.pot: $DEPS /g" misc/crc.d; \
*[ -s misc/crc.d ] || rm -f misc/crc.d
*libdm-common.c: In function ���_build_dev_path.constprop���:
*libdm-common.c:168:31: warning: ���__builtin___snprintf_chk��� output may be truncated before the last format character [-Wformat-truncation=]
*--
*gcc -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 -Wl,--export-dynamic -L../../libdm -L../../lib -L../../daemons/dmeventd -L. -o dmeventd dmeventd.o \
*-ldl -ldevmapper-event -lpthread  -ldevmapper -rdynamic
*gcc -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 -Wl,--export-dynamic -L../../libdm -L../../lib -L../../daemons/dmeventd -Wl,--no-export-dynamic -static -L. -L../../libdm/ioctl -o dmeventd.static \
*dmeventd.o -ldl -ldevmapper-event -lpthread  -ldevmapper 
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: dmeventd.o: in function `_register_for_event':
*dmeventd.c:(.text+0x1be9): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
*--
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 filters/filter-regex.c -o filters/filter-regex.o
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 filters/filter-sysfs.c -o filters/filter-sysfs.o
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 filters/filter-md.c -o filters/filter-md.o
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 filters/filter.c -o filters/filter.o
*filters/filter-sysfs.c: In function ���_hash_dev���:
*filters/filter-sysfs.c:125:10: warning: implicit declaration of function ���major��� [-Wimplicit-function-declaration]
*  return (major(dev) ^ minor(dev)) & (SET_BUCKETS - 1);
*          ^~~~~
*filters/filter-sysfs.c:125:10: warning: nested extern declaration of ���major��� [-Wnested-externs]
*filters/filter-sysfs.c:125:23: warning: implicit declaration of function ���minor���; did you mean ���mknod���? [-Wimplicit-function-declaration]
*  return (major(dev) ^ minor(dev)) & (SET_BUCKETS - 1);
*                       ^~~~~
*                       mknod
*filters/filter-sysfs.c:125:23: warning: nested extern declaration of ���minor��� [-Wnested-externs]
*filters/filter-sysfs.c: In function ���_parse_dev���:
*filters/filter-sysfs.c:176:12: warning: implicit declaration of function ���makedev��� [-Wimplicit-function-declaration]
*  *result = makedev(major, minor);
*            ^~~~~~~
*filters/filter-sysfs.c:176:12: warning: nested extern declaration of ���makedev��� [-Wnested-externs]
*--
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 format_text/import_vsn1.c -o format_text/import_vsn1.o
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 format_text/tags.c -o format_text/tags.o
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 format_text/text_label.c -o format_text/text_label.o
*gcc -c -I. -I../include -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 freeseg/freeseg.c -o freeseg/freeseg.o
*format_text/text_label.c: In function ���_text_write���:
*format_text/text_label.c:53:47: warning: argument to ���sizeof��� in ���strncpy��� call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
*--
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 polldaemon.c -o polldaemon.o
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 pvchange.c -o pvchange.o
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 pvck.c -o pvck.o
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 pvcreate.c -o pvcreate.o
*lvconvert.c: In function ���_lvconvert_single���:
*lvconvert.c:1450:10: warning: ���image_count��� may be used uninitialized in this function [-Wmaybe-uninitialized]
*--
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 vgsplit.c -o vgsplit.o
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 lvmcmdlib.c -o lvmcmdlib.o
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 lvm2cmd.c -o lvm2cmd.o
*gcc -c -I. -I../include -DLVM_SHARED_PATH=\"//sbin/lvm\" -DHAVE_CONFIG_H -DDM_IOCTLS -fPIC -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -Wredundant-decls -Wpointer-arith -O2 lvm.c -o lvm.o
*vgrename.c: In function ���vg_rename_path���:
*vgrename.c:149:21: warning: ���%s��� directive writing up to 4095 bytes into a region of size 128 [-Wformat-overflow=]
*--
*/usr/include/bits/stdio2.h:36:10: note: ���__builtin___sprintf_chk��� output 1 or more bytes (assuming 4096) into a destination of size 128
*   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
*          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*       __bos (__s), __fmt, __va_arg_pack ());
*       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*vgrename.c:150:21: warning: ���%s��� directive writing up to 4095 bytes into a region of size 128 [-Wformat-overflow=]
*--
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: filter-sysfs.c:(.text+0x348): undefined reference to `major'
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: filter-sysfs.c:(.text+0x355): undefined reference to `minor'
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/liblvm-internal.a(filter-sysfs.o): in function `_accept_p':
*filter-sysfs.c:(.text+0x4d8): undefined reference to `major'
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: filter-sysfs.c:(.text+0x4e5): undefined reference to `minor'
*collect2: error: ld returned 1 exit status
*make[1]: *** [Makefile:135: lvm] Error 1
*make[1]: *** Waiting for unfinished jobs....
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/liblvm-internal.a(sharedlib.o): in function `load_shared_library':
*sharedlib.c:(.text+0x153): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
*--
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: filter-sysfs.c:(.text+0x348): undefined reference to `major'
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: filter-sysfs.c:(.text+0x355): undefined reference to `minor'
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../lib/liblvm-internal.a(filter-sysfs.o): in function `_accept_p':
*filter-sysfs.c:(.text+0x4d8): undefined reference to `major'
*/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: filter-sysfs.c:(.text+0x4e5): undefined reference to `minor'
*collect2: error: ld returned 1 exit status
*make[1]: *** [Makefile:139: lvm.static] Error 1
*make[1]: Leaving directory '/var/tmp/genkernel/16252.31875.9823.13096/LVM2.2.02.88/tools'
*make: *** [make.tmpl:214: tools] Error 2
*--
* Running with options: --luks --lvm initramfs
* Using genkernel.conf from /etc/genkernel.conf
* Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh ..
* Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
*
* ERROR: Failed to compile the "" target...
*
* -- End log... --
*
* Please consult /var/log/genkernel.log for more information and any
* errors that were reported above.
*
* Report any genkernel bugs to bugs.gentoo.org and
* assign your bug to genkernel@gentoo.org. Please include
* as much information as you can in your bug report; attaching
* /var/log/genkernel.log so that your issue can be dealt with effectively.
*
* Please do *not* report compilation failures as genkernel bugs!
*

_________________
<h5>Checkout <em>#grandmasboy</em> on <em>freenode</em>...chat with jayP bot from the movie!</h5>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum