* building debug version of klibc
@ 2017-12-30 10:54 Anatoly Pugachev
2017-12-30 11:30 ` Sam Ravnborg
2017-12-30 12:00 ` valdis.kletnieks at vt.edu
0 siblings, 2 replies; 13+ messages in thread
From: Anatoly Pugachev @ 2017-12-30 10:54 UTC (permalink / raw)
To: kernelnewbies
Hello!
Can someone please help me in building debug version of klibc ?
I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
failed to build it with debug info
added "-g" to HOSTCFLAGS in Makefile, but
$ make -j KLIBCKERNELSRC=`pwd`/../linux-2.6/usr
still strips every debug symbol , and i'm failed to change
scripts/Kbuild.klibc and Makefile to remove strip usage
klibc$ find . -name fstype | xargs file
./usr/kinit/fstype: directory
./usr/kinit/fstype/static/fstype: ELF 64-bit MSB executable, SPARC V9,
relaxed memory ordering, version 1 (SYSV), statically linked, stripped
./usr/kinit/fstype/shared/fstype: ELF 64-bit MSB executable, SPARC V9,
relaxed memory ordering, version 1 (SYSV), statically linked,
interpreter /lib/klibc-M67ne2AU3wnuYln_9h2L1vfH5J0.so, stripped
I started to get segfault in fstype:
linux-2.6$ make install
...
DEPMOD 4.15.0-rc5-00149-g5aa90a845892
sh ./arch/sparc/boot/install.sh 4.15.0-rc5-00149-g5aa90a845892
arch/sparc/boot/zImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal
4.15.0-rc5-00149-g5aa90a845892
/boot/vmlinuz-4.15.0-rc5-00149-g5aa90a845892
run-parts: executing /etc/kernel/postinst.d/initramfs-tools
4.15.0-rc5-00149-g5aa90a845892
/boot/vmlinuz-4.15.0-rc5-00149-g5aa90a845892
update-initramfs: Generating /boot/initrd.img-4.15.0-rc5-00149-g5aa90a845892
Segmentation fault
run-parts: executing /etc/kernel/postinst.d/zz-update-grub
4.15.0-rc5-00149-g5aa90a845892
/boot/vmlinuz-4.15.0-rc5-00149-g5aa90a845892
Dec 30 12:51:06 ttip kernel: fstype[162686]: segfault at 38 ip
000000008001069c (rpc 0000000080004820) sp 000007feffdf53a1 error 1 in
klibc-g_9mplOvk_73CeIA8YN-t9vhxyc.so[80000000+14000]
linux-2.6$ gdb -q -c core.164896
[New LWP 164896]
Core was generated by `/usr/lib/klibc/bin/fstype /dev/vdiska2'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000008001069c in ?? ()
linux-2.6$ $ find /usr -name fstype | xargs file
/usr/lib/klibc/bin/fstype: ELF 64-bit MSB executable, SPARC V9,
relaxed memory ordering, version 1 (SYSV), statically linked,
interpreter /lib/klibc-g_9mplOvk_73CeIA8YN-t9vhxyc.so, stripped
linux-2.6# file -s /dev/vdiska2
/dev/vdiska2: Linux rev 1.0 ext4 filesystem data,
UUID=f2eda779-5310-4af2-b48a-b43db51c0961 (needs journal recovery)
(extents) (64bit) (large files) (huge files)
$ dpkg -S /usr/lib/klibc/bin/fstype
klibc-utils: /usr/lib/klibc/bin/fstype
$ dpkg -l klibc-utils
||/ Name Version
Architecture Description
+++-==================================-======================-======================-=========================================================================
ii klibc-utils 2.0.4-10 sparc64
small utilities built with klibc for early boot
$ apt show klibc-utils
Package: klibc-utils
Version: 2.0.4-10
Priority: optional
Section: libs
Source: klibc
Maintainer: maximilian attems <maks@debian.org>
Installed-Size: 522 kB
Depends: libklibc (= 2.0.4-10)
Breaks: initramfs-tools (<< 0.123~)
Homepage: https://git.kernel.org/cgit/libs/klibc/klibc.git
Download-Size: 107 kB
APT-Manual-Installed: no
APT-Sources: http://ftp.ports.debian.org/debian-ports unstable/main
sparc64 Packages
Description: small utilities built with klibc for early boot
This package contains a collection of programs that are linked
against klibc. These duplicate some of the functionality of a
regular Linux toolset, but are typically much smaller than their
full-function counterparts. They are intended for inclusion in
initramfs images and embedded systems.
^ permalink raw reply [flat|nested] 13+ messages in thread* building debug version of klibc
2017-12-30 10:54 building debug version of klibc Anatoly Pugachev
@ 2017-12-30 11:30 ` Sam Ravnborg
2017-12-30 12:00 ` Anatoly Pugachev
2017-12-30 12:00 ` valdis.kletnieks at vt.edu
1 sibling, 1 reply; 13+ messages in thread
From: Sam Ravnborg @ 2017-12-30 11:30 UTC (permalink / raw)
To: kernelnewbies
Hi Anatoly
On Sat, Dec 30, 2017 at 01:54:05PM +0300, Anatoly Pugachev wrote:
> Hello!
>
> Can someone please help me in building debug version of klibc ?
>
> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
> failed to build it with debug info
>
> added "-g" to HOSTCFLAGS in Makefile, but
HOSTCFLAGS is used when building tools running on your build machine.
Try something like this (untested, whitespace damaged):
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index f500d535..3e8124f7 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -69,7 +69,7 @@ include $(srctree)/scripts/Kbuild.include
KLIBCREQFLAGS := $(call cc-option, -fno-stack-protector, ) \
$(call cc-option, -fwrapv, )
KLIBCARCHREQFLAGS :=
-KLIBCOPTFLAGS :=
+KLIBCOPTFLAGS := -g
KLIBCWARNFLAGS := -W -Wall -Wno-sign-compare -Wno-unused-parameter
KLIBCSHAREDFLAGS :=
KLIBCBITSIZE :=
If you use make V=1 then you should be able to see the
full gcc command line, where -g should be included with
theabove fix.
Sam
^ permalink raw reply related [flat|nested] 13+ messages in thread* building debug version of klibc
2017-12-30 11:30 ` Sam Ravnborg
@ 2017-12-30 12:00 ` Anatoly Pugachev
0 siblings, 0 replies; 13+ messages in thread
From: Anatoly Pugachev @ 2017-12-30 12:00 UTC (permalink / raw)
To: kernelnewbies
On Sat, Dec 30, 2017 at 2:30 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> Hi Anatoly
>
> On Sat, Dec 30, 2017 at 01:54:05PM +0300, Anatoly Pugachev wrote:
>> Hello!
>>
>> Can someone please help me in building debug version of klibc ?
>>
>> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
>> failed to build it with debug info
>>
>> added "-g" to HOSTCFLAGS in Makefile, but
>
> HOSTCFLAGS is used when building tools running on your build machine.
>
> Try something like this (untested, whitespace damaged):
>
> diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
> index f500d535..3e8124f7 100644
> --- a/scripts/Kbuild.klibc
> +++ b/scripts/Kbuild.klibc
> @@ -69,7 +69,7 @@ include $(srctree)/scripts/Kbuild.include
> KLIBCREQFLAGS := $(call cc-option, -fno-stack-protector, ) \
> $(call cc-option, -fwrapv, )
> KLIBCARCHREQFLAGS :=
> -KLIBCOPTFLAGS :=
> +KLIBCOPTFLAGS := -g
> KLIBCWARNFLAGS := -W -Wall -Wno-sign-compare -Wno-unused-parameter
> KLIBCSHAREDFLAGS :=
> KLIBCBITSIZE :=
>
> If you use make V=1 then you should be able to see the
> full gcc command line, where -g should be included with
> theabove fix.
Sam, thanks!
I did notice that later as well, but I've changed KLIBCCFLAGS to
include "-g" and changed strip to echo:
mator at ttip:~/klibc$ git diff
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index f500d535..40cbfd60 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -74,7 +74,7 @@ KLIBCWARNFLAGS := -W -Wall -Wno-sign-compare
-Wno-unused-parameter
KLIBCSHAREDFLAGS :=
KLIBCBITSIZE :=
KLIBCLDFLAGS :=
-KLIBCCFLAGS :=
+KLIBCCFLAGS := -g
# Defaults for arch to override
KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/$(KLIBCARCH)/include
@@ -99,7 +99,7 @@ KLIBCAR := $(AR)
klibc-ar = $(KLIBCAR) $(if $(KBUILD_REPRODUCIBLE),$(2),$(1))
KLIBCRANLIB := $(call klibc-ar,s,Ds)
-KLIBCSTRIP := $(STRIP)
+KLIBCSTRIP := echo
KLIBCNM := $(NM)
KLIBCOBJCOPY := $(OBJCOPY)
KLIBCOBJDUMP := $(OBJDUMP)
@@ -126,7 +126,7 @@ KLIBCCPPFLAGS += $(KLIBCDEFS)
KLIBCCFLAGS += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS) \
$(KLIBCOPTFLAGS) $(KLIBCWARNFLAGS)
KLIBCAFLAGS += -D__ASSEMBLY__ $(KLIBCCFLAGS)
-KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
+#KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
mator at ttip:~/klibc$
this helped me to produce exec with debug info and stack trace:
(gdb) file ./usr/kinit/fstype/static/fstype
Reading symbols from ./usr/kinit/fstype/static/fstype...done.
(gdb) run
Starting program: /home/mator/klibc/usr/kinit/fstype/static/fstype
Program received signal SIGSEGV, Segmentation fault.
__syscall_common () at usr/klibc/arch/sparc64/syscall.S:15
15 st %o0,[%g4]
(gdb) bt
#0 __syscall_common () at usr/klibc/arch/sparc64/syscall.S:15
#1 0x00000000001010d4 in identify_fs ()
#2 0x00000000001001f0 in main ()
PS: added sparclinux at vger , first thread message is
http://www.zytor.com/pipermail/klibc/2017-December/003962.html
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: building debug version of klibc
@ 2017-12-30 12:00 ` Anatoly Pugachev
0 siblings, 0 replies; 13+ messages in thread
From: Anatoly Pugachev @ 2017-12-30 12:00 UTC (permalink / raw)
To: kernelnewbies
On Sat, Dec 30, 2017 at 2:30 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> Hi Anatoly
>
> On Sat, Dec 30, 2017 at 01:54:05PM +0300, Anatoly Pugachev wrote:
>> Hello!
>>
>> Can someone please help me in building debug version of klibc ?
>>
>> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
>> failed to build it with debug info
>>
>> added "-g" to HOSTCFLAGS in Makefile, but
>
> HOSTCFLAGS is used when building tools running on your build machine.
>
> Try something like this (untested, whitespace damaged):
>
> diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
> index f500d535..3e8124f7 100644
> --- a/scripts/Kbuild.klibc
> +++ b/scripts/Kbuild.klibc
> @@ -69,7 +69,7 @@ include $(srctree)/scripts/Kbuild.include
> KLIBCREQFLAGS := $(call cc-option, -fno-stack-protector, ) \
> $(call cc-option, -fwrapv, )
> KLIBCARCHREQFLAGS :> -KLIBCOPTFLAGS :> +KLIBCOPTFLAGS := -g
> KLIBCWARNFLAGS := -W -Wall -Wno-sign-compare -Wno-unused-parameter
> KLIBCSHAREDFLAGS :> KLIBCBITSIZE :>
> If you use make V=1 then you should be able to see the
> full gcc command line, where -g should be included with
> theabove fix.
Sam, thanks!
I did notice that later as well, but I've changed KLIBCCFLAGS to
include "-g" and changed strip to echo:
mator@ttip:~/klibc$ git diff
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index f500d535..40cbfd60 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -74,7 +74,7 @@ KLIBCWARNFLAGS := -W -Wall -Wno-sign-compare
-Wno-unused-parameter
KLIBCSHAREDFLAGS : KLIBCBITSIZE : KLIBCLDFLAGS :-KLIBCCFLAGS :+KLIBCCFLAGS := -g
# Defaults for arch to override
KLIBCARCHINCFLAGS = -I$(KLIBCKERNELOBJ)/arch/$(KLIBCARCH)/include
@@ -99,7 +99,7 @@ KLIBCAR := $(AR)
klibc-ar = $(KLIBCAR) $(if $(KBUILD_REPRODUCIBLE),$(2),$(1))
KLIBCRANLIB := $(call klibc-ar,s,Ds)
-KLIBCSTRIP := $(STRIP)
+KLIBCSTRIP := echo
KLIBCNM := $(NM)
KLIBCOBJCOPY := $(OBJCOPY)
KLIBCOBJDUMP := $(OBJDUMP)
@@ -126,7 +126,7 @@ KLIBCCPPFLAGS += $(KLIBCDEFS)
KLIBCCFLAGS += $(KLIBCCPPFLAGS) $(KLIBCREQFLAGS) $(KLIBCARCHREQFLAGS) \
$(KLIBCOPTFLAGS) $(KLIBCWARNFLAGS)
KLIBCAFLAGS += -D__ASSEMBLY__ $(KLIBCCFLAGS)
-KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
+#KLIBCSTRIPFLAGS += --strip-all -R .comment -R .note
KLIBCLIBGCC_DEF := $(shell $(KLIBCCC) $(KLIBCCFLAGS) --print-libgcc)
KLIBCLIBGCC ?= $(KLIBCLIBGCC_DEF)
mator@ttip:~/klibc$
this helped me to produce exec with debug info and stack trace:
(gdb) file ./usr/kinit/fstype/static/fstype
Reading symbols from ./usr/kinit/fstype/static/fstype...done.
(gdb) run
Starting program: /home/mator/klibc/usr/kinit/fstype/static/fstype
Program received signal SIGSEGV, Segmentation fault.
__syscall_common () at usr/klibc/arch/sparc64/syscall.S:15
15 st %o0,[%g4]
(gdb) bt
#0 __syscall_common () at usr/klibc/arch/sparc64/syscall.S:15
#1 0x00000000001010d4 in identify_fs ()
#2 0x00000000001001f0 in main ()
PS: added sparclinux@vger , first thread message is
http://www.zytor.com/pipermail/klibc/2017-December/003962.html
^ permalink raw reply related [flat|nested] 13+ messages in thread
* building debug version of klibc
2017-12-30 10:54 building debug version of klibc Anatoly Pugachev
2017-12-30 11:30 ` Sam Ravnborg
@ 2017-12-30 12:00 ` valdis.kletnieks at vt.edu
2017-12-30 12:05 ` Anatoly Pugachev
1 sibling, 1 reply; 13+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-12-30 12:00 UTC (permalink / raw)
To: kernelnewbies
On Sat, 30 Dec 2017 13:54:05 +0300, Anatoly Pugachev said:
> Hello!
>
> Can someone please help me in building debug version of klibc ?
>
> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
> failed to build it with debug info
>
> added "-g" to HOSTCFLAGS in Makefile, but
Hint: HOSTCFLAGS is applied to code that needs to run on the machine that's
doing the build, not the target code. So for instance, if I'm cross-compiling on
an x86_64 for an ARM target (which I do quite a bit, building Lede router images
for my wireless), HOSTCFLAGS is applied to any x86_64 utility code that gets
built. I don't know what code is in klibc, but an example in the kernel source
tree would be 'objtool' - that runs on the host system during the build, not at runtime.
> I started to get segfault in fstype:
> linux-2.6$ make install
...
> DEPMOD 4.15.0-rc5-00149-g5aa90a845892
> sh ./arch/sparc/boot/install.sh 4.15.0-rc5-00149-g5aa90a845892 arch/sparc/boot/zImage \
> System.map "/boot"
What directory did you do that in? It looks like you're trying to install a whole
new kernel image, not a new initramfs that has an updated klibc on it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171230/94407224/attachment.bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* building debug version of klibc
2017-12-30 12:00 ` valdis.kletnieks at vt.edu
@ 2017-12-30 12:05 ` Anatoly Pugachev
0 siblings, 0 replies; 13+ messages in thread
From: Anatoly Pugachev @ 2017-12-30 12:05 UTC (permalink / raw)
To: kernelnewbies
On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks@vt.edu> wrote:
> On Sat, 30 Dec 2017 13:54:05 +0300, Anatoly Pugachev said:
>> Hello!
>>
>> Can someone please help me in building debug version of klibc ?
>>
>> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
>> failed to build it with debug info
>>
>> added "-g" to HOSTCFLAGS in Makefile, but
>
> Hint: HOSTCFLAGS is applied to code that needs to run on the machine that's
> doing the build, not the target code. So for instance, if I'm cross-compiling on
> an x86_64 for an ARM target (which I do quite a bit, building Lede router images
> for my wireless), HOSTCFLAGS is applied to any x86_64 utility code that gets
> built. I don't know what code is in klibc, but an example in the kernel source
> tree would be 'objtool' - that runs on the host system during the build, not at runtime.
>
>> I started to get segfault in fstype:
>
>> linux-2.6$ make install
> ...
>> DEPMOD 4.15.0-rc5-00149-g5aa90a845892
>> sh ./arch/sparc/boot/install.sh 4.15.0-rc5-00149-g5aa90a845892 arch/sparc/boot/zImage \
>> System.map "/boot"
>
> What directory did you do that in? It looks like you're trying to install a whole
> new kernel image, not a new initramfs that has an updated klibc on it.
Valdis,
it's usual git kernel compile and install. And it's the first time I
started to get segfault from fstype.
git kernel from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
local directory where do i build it is ~/linux-2.6 , my own config.
Worked fine for more than 100th times.
So, i'm doing "make modules_install && make install" in this directory
which doing right about to copy vmlinuz, System.map, kernel config
file to /boot and generate initrd there and updating boot loader
(grub2) config file.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building debug version of klibc
@ 2017-12-30 12:05 ` Anatoly Pugachev
0 siblings, 0 replies; 13+ messages in thread
From: Anatoly Pugachev @ 2017-12-30 12:05 UTC (permalink / raw)
To: kernelnewbies
On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks@vt.edu> wrote:
> On Sat, 30 Dec 2017 13:54:05 +0300, Anatoly Pugachev said:
>> Hello!
>>
>> Can someone please help me in building debug version of klibc ?
>>
>> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
>> failed to build it with debug info
>>
>> added "-g" to HOSTCFLAGS in Makefile, but
>
> Hint: HOSTCFLAGS is applied to code that needs to run on the machine that's
> doing the build, not the target code. So for instance, if I'm cross-compiling on
> an x86_64 for an ARM target (which I do quite a bit, building Lede router images
> for my wireless), HOSTCFLAGS is applied to any x86_64 utility code that gets
> built. I don't know what code is in klibc, but an example in the kernel source
> tree would be 'objtool' - that runs on the host system during the build, not at runtime.
>
>> I started to get segfault in fstype:
>
>> linux-2.6$ make install
> ...
>> DEPMOD 4.15.0-rc5-00149-g5aa90a845892
>> sh ./arch/sparc/boot/install.sh 4.15.0-rc5-00149-g5aa90a845892 arch/sparc/boot/zImage \
>> System.map "/boot"
>
> What directory did you do that in? It looks like you're trying to install a whole
> new kernel image, not a new initramfs that has an updated klibc on it.
Valdis,
it's usual git kernel compile and install. And it's the first time I
started to get segfault from fstype.
git kernel from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
local directory where do i build it is ~/linux-2.6 , my own config.
Worked fine for more than 100th times.
So, i'm doing "make modules_install && make install" in this directory
which doing right about to copy vmlinuz, System.map, kernel config
file to /boot and generate initrd there and updating boot loader
(grub2) config file.
^ permalink raw reply [flat|nested] 13+ messages in thread
* building debug version of klibc
2017-12-30 12:05 ` Anatoly Pugachev
@ 2017-12-30 12:14 ` valdis.kletnieks
-1 siblings, 0 replies; 13+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-12-30 12:14 UTC (permalink / raw)
To: kernelnewbies
On Sat, 30 Dec 2017 15:05:46 +0300, Anatoly Pugachev said:
> On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks@vt.edu> wrote:
> > On Sat, 30 Dec 2017 13:54:05 +0300, Anatoly Pugachev said:
> >> Hello!
> >>
> >> Can someone please help me in building debug version of klibc ?
> >>
> >> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
> >> failed to build it with debug info
> >>
> >> added "-g" to HOSTCFLAGS in Makefile, but
> it's usual git kernel compile and install. And it's the first time I
> started to get segfault from fstype.
I missed where you went from klibc to building a new kernel, probably
because you changed topics in mid-email. Why were you building a new
kernel for your host system just to get a klibc that had -g?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171230/04b4af5f/attachment.bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building debug version of klibc
@ 2017-12-30 12:14 ` valdis.kletnieks
0 siblings, 0 replies; 13+ messages in thread
From: valdis.kletnieks @ 2017-12-30 12:14 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
On Sat, 30 Dec 2017 15:05:46 +0300, Anatoly Pugachev said:
> On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks@vt.edu> wrote:
> > On Sat, 30 Dec 2017 13:54:05 +0300, Anatoly Pugachev said:
> >> Hello!
> >>
> >> Can someone please help me in building debug version of klibc ?
> >>
> >> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
> >> failed to build it with debug info
> >>
> >> added "-g" to HOSTCFLAGS in Makefile, but
> it's usual git kernel compile and install. And it's the first time I
> started to get segfault from fstype.
I missed where you went from klibc to building a new kernel, probably
because you changed topics in mid-email. Why were you building a new
kernel for your host system just to get a klibc that had -g?
[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* building debug version of klibc
2017-12-30 12:14 ` valdis.kletnieks
@ 2017-12-30 12:27 ` Anatoly Pugachev
-1 siblings, 0 replies; 13+ messages in thread
From: Anatoly Pugachev @ 2017-12-30 12:27 UTC (permalink / raw)
To: kernelnewbies
On Sat, Dec 30, 2017 at 3:14 PM, <valdis.kletnieks@vt.edu> wrote:
> On Sat, 30 Dec 2017 15:05:46 +0300, Anatoly Pugachev said:
>> On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks@vt.edu> wrote:
>> > On Sat, 30 Dec 2017 13:54:05 +0300, Anatoly Pugachev said:
>> >> Hello!
>> >>
>> >> Can someone please help me in building debug version of klibc ?
>> >>
>> >> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
>> >> failed to build it with debug info
>> >>
>> >> added "-g" to HOSTCFLAGS in Makefile, but
>
>> it's usual git kernel compile and install. And it's the first time I
>> started to get segfault from fstype.
>
> I missed where you went from klibc to building a new kernel, probably
> because you changed topics in mid-email. Why were you building a new
> kernel for your host system just to get a klibc that had -g?
I'm using / testing a git kernel upstream on my hardware (sparc64 /
ppc64 / ia64 ).
Only this time, installing latest git kernel, I get a sigserv on
sparc64 from klibc utility (fstype), and posted about it to mailing
list.
So, to properly report with gdb backtrace, i was need to build klibc
(fstype) with debug info.
I'm not able to fix it myself, so probably someone else could look
into the issue (or i'm just raising awareness for the issue to other
who can hit it as well).
It could be compiler issue as well, if files in klibc.git repo does
not changed for about a year....
I was asking for help with building debug version of klibc and since i
was able to build it, we could close this issue for now (going to
discuss it with debian distribution maintainers first).
Thanks!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building debug version of klibc
@ 2017-12-30 12:27 ` Anatoly Pugachev
0 siblings, 0 replies; 13+ messages in thread
From: Anatoly Pugachev @ 2017-12-30 12:27 UTC (permalink / raw)
To: kernelnewbies
On Sat, Dec 30, 2017 at 3:14 PM, <valdis.kletnieks@vt.edu> wrote:
> On Sat, 30 Dec 2017 15:05:46 +0300, Anatoly Pugachev said:
>> On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks@vt.edu> wrote:
>> > On Sat, 30 Dec 2017 13:54:05 +0300, Anatoly Pugachev said:
>> >> Hello!
>> >>
>> >> Can someone please help me in building debug version of klibc ?
>> >>
>> >> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
>> >> failed to build it with debug info
>> >>
>> >> added "-g" to HOSTCFLAGS in Makefile, but
>
>> it's usual git kernel compile and install. And it's the first time I
>> started to get segfault from fstype.
>
> I missed where you went from klibc to building a new kernel, probably
> because you changed topics in mid-email. Why were you building a new
> kernel for your host system just to get a klibc that had -g?
I'm using / testing a git kernel upstream on my hardware (sparc64 /
ppc64 / ia64 ).
Only this time, installing latest git kernel, I get a sigserv on
sparc64 from klibc utility (fstype), and posted about it to mailing
list.
So, to properly report with gdb backtrace, i was need to build klibc
(fstype) with debug info.
I'm not able to fix it myself, so probably someone else could look
into the issue (or i'm just raising awareness for the issue to other
who can hit it as well).
It could be compiler issue as well, if files in klibc.git repo does
not changed for about a year....
I was asking for help with building debug version of klibc and since i
was able to build it, we could close this issue for now (going to
discuss it with debian distribution maintainers first).
Thanks!
^ permalink raw reply [flat|nested] 13+ messages in thread
* building debug version of klibc
2017-12-30 12:27 ` Anatoly Pugachev
@ 2017-12-30 12:38 ` valdis.kletnieks
-1 siblings, 0 replies; 13+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-12-30 12:38 UTC (permalink / raw)
To: kernelnewbies
On Sat, 30 Dec 2017 15:27:17 +0300, Anatoly Pugachev said:
> I'm using / testing a git kernel upstream on my hardware (sparc64 /
> ppc64 / ia64 ).
> Only this time, installing latest git kernel, I get a sigserv on
> sparc64 from klibc utility (fstype), and posted about it to mailing
> list.
> So, to properly report with gdb backtrace, i was need to build klibc
You didn't have to re-install the kernel, just get the klibc files installed.
At worst, you only have to rebuild an initramfs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171230/4b32e6d4/attachment.bin
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: building debug version of klibc
@ 2017-12-30 12:38 ` valdis.kletnieks
0 siblings, 0 replies; 13+ messages in thread
From: valdis.kletnieks @ 2017-12-30 12:38 UTC (permalink / raw)
To: kernelnewbies
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
On Sat, 30 Dec 2017 15:27:17 +0300, Anatoly Pugachev said:
> I'm using / testing a git kernel upstream on my hardware (sparc64 /
> ppc64 / ia64 ).
> Only this time, installing latest git kernel, I get a sigserv on
> sparc64 from klibc utility (fstype), and posted about it to mailing
> list.
> So, to properly report with gdb backtrace, i was need to build klibc
You didn't have to re-install the kernel, just get the klibc files installed.
At worst, you only have to rebuild an initramfs.
[-- Attachment #2: Type: application/pgp-signature, Size: 486 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-12-30 12:38 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-30 10:54 building debug version of klibc Anatoly Pugachev
2017-12-30 11:30 ` Sam Ravnborg
2017-12-30 12:00 ` Anatoly Pugachev
2017-12-30 12:00 ` Anatoly Pugachev
2017-12-30 12:00 ` valdis.kletnieks at vt.edu
2017-12-30 12:05 ` Anatoly Pugachev
2017-12-30 12:05 ` Anatoly Pugachev
2017-12-30 12:14 ` valdis.kletnieks at vt.edu
2017-12-30 12:14 ` valdis.kletnieks
2017-12-30 12:27 ` Anatoly Pugachev
2017-12-30 12:27 ` Anatoly Pugachev
2017-12-30 12:38 ` valdis.kletnieks at vt.edu
2017-12-30 12:38 ` valdis.kletnieks
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.