On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks at 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.
On Sat, 30 Dec 2017 15:05:46 +0300, Anatoly Pugachev said:> On Sat, Dec 30, 2017 at 3:00 PM, <valdis.kletnieks at 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://www.zytor.com/pipermail/klibc/attachments/20171230/04b4af5f/attachment-0001.sig>
On Sat, Dec 30, 2017 at 3:14 PM, <valdis.kletnieks at 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 at 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!