Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 479494

Summary: libelf compatibility issue?: ctfconvert -L VERSION -g aicasm.o , segfault 11.
Product: Gentoo/Alt Reporter: Yuta SATOH <nigoro.dev>
Component: FreeBSDAssignee: Gentoo/BSD Team <bsd+disabled>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: FreeBSD   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: sample patch for freebsd-lib-9.1-r10.ebuild
sample patch for freebsd-cddl-9.1.ebuild
sample patch for freebsd-usbin-9.1.ebuild
sample patch for dev-libs/glib-2.36.3-r1.ebuild
freebsd-lib/files/freebsd-lib-9.1-liblink.patch

Description Yuta SATOH 2013-08-02 11:00:57 UTC
When using libelf included in freebsd-lib, this issue does not occur.
I think better to use libelf contained in freebsd-lib instead of sys-libs/libelf...
Comment 1 Yuta SATOH 2013-08-02 11:05:53 UTC
Created attachment 354888 [details, diff]
sample patch for freebsd-lib-9.1-r10.ebuild

Don't forget rev bump.
Comment 2 Yuta SATOH 2013-08-02 11:06:37 UTC
Created attachment 354890 [details, diff]
sample patch for freebsd-cddl-9.1.ebuild
Comment 3 Yuta SATOH 2013-08-02 11:07:12 UTC
Created attachment 354892 [details, diff]
sample patch for freebsd-usbin-9.1.ebuild
Comment 4 Yuta SATOH 2013-08-02 11:07:58 UTC
Created attachment 354894 [details, diff]
sample patch for dev-libs/glib-2.36.3-r1.ebuild
Comment 5 Yuta SATOH 2013-08-02 11:34:43 UTC
Created attachment 354896 [details, diff]
freebsd-lib/files/freebsd-lib-9.1-liblink.patch
Comment 6 Yuta SATOH 2013-08-02 12:00:25 UTC
Steps to Reproduce:

prepare)
mkdir /9.1 && cd /9.1
wget http://distfiles.gentoo.org/experimental/bsd/freebsd/stages/amd64-fbsd-9.1/stage3-amd64-freebsd-9.1.tar.bz2
tar xjpf stage3-amd64-freebsd-9.1.tar.bz2
mkdir /9.1/usr/portage /9.1/var/tmp/portage
mount -t devfs devfs /9.1/dev
mount -t nullfs /usr/portage /9.1/usr/portage
cp /etc/resolv.conf /9.1/etc
chroot /9.1 /bin/bash

export MAKEOPTS=-j10
emerge freebsd-cddl
cd /usr/src/sys/amd64/conf
echo 'makeoptions     WITH_CTF=1' >> GENERIC
config GENERIC
cd ../compile/GENERIC
make clean && make cleandepend && make depend && make -j10
<snip>
ctfconvert -L VERSION -g aicasm.o
*** [aicasm.o] Signal 11

Got Signal 11. next step.

workaround)
cd /tmp
for num in 354888 354890 354892 354894 354896
do
wget --no-check-certificate -O ${num}.patch "https://bugs.gentoo.org/attachment.cgi?id=${num}"
sleep 10
done

cd /usr/portage/sys-freebsd/freebsd-lib
patch -p1 < /tmp/354888.patch
cp freebsd-lib-9.1-r10.ebuild freebsd-lib-9.1-r11.ebuild
cp /tmp/354896.patch files/freebsd-lib-9.1-liblink.patch
ebuild freebsd-lib-9.1-r11.ebuild digest

cd /usr/portage/sys-freebsd/freebsd-cddl
patch -p1 < /tmp/354890.patch
ebuild freebsd-cddl-9.1.ebuild digest

cd /usr/portage/sys-freebsd/freebsd-usbin
patch -p1 < /tmp/354892.patch
ebuild freebsd-usbin-9.1.ebuild digest

cd /usr/portage/dev-libs/glib
patch -p1 < /tmp/354894.patch
ebuild glib-2.36.3-r1.ebuild digest

emerge -C libelf
emerge freebsd-lib && emerge freebsd-cddl

retry)
cd /usr/src/sys/amd64/compile/GENERIC
ctfconvert -L VERSION -g aicasm.o

ok. no error. check kernel compile is successful.

make clean && make cleandepend && make depend && make -j10

done.
Comment 7 Alexis Ballier gentoo-dev 2013-08-09 13:05:56 UTC
better fix libelf / ctfconvert then I think
Comment 8 Alexis Ballier gentoo-dev 2013-08-11 20:42:26 UTC
applied your patches in the end, you're right its better that way, thanks!