Building from port on 11.0-RELEASE-p7 #0 r312523, kBuild failed with /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998/src/sed/config/help2man --name "stream editor for filtering and transforming text" \ -p sed --include /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998/src/sed/doc/sed.x ../sed/sed > /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998/src/sed/doc/sed.1 help2man: can't get `--help' info from ../sed/sed gmake[7]: *** [Makefile:878: sed.1] Error 255 /etc/make.conf DEFAULT_VERSIONS+= gcc=5
Perhaps an earlier error caused the build of kBuild's internal version of sed to fail?
kBuild version of sed segfault root@rork:~ # /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998/out/freebsd.amd64/release/bootstrap/sed/sed/sed Segmentation fault (core dumped) Running gdb: Core was generated by `sed'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libc.so.7...Reading symbols from /usr/lib/debug//lib/libc.so.7.debug...done. done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...Reading symbols from /usr/lib/debug//libexec/ld-elf.so.1.debug...done. done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x000000080063a186 in memcpy () from /libexec/ld-elf.so.1 (gdb) Could it be related to the message printed when installing gcc? > To ensure binaries built with this toolchain find appropriate versions > of the necessary run-time libraries, you may want to link using > > -Wl,-rpath=%%TARGLIB%%
Building from scratch (rm -rf /usr/local /var/db/pkg/*) [root@rork /usr/ports/devel/kBuild]# MAKE_JOBS_UNSAFE=yes make kBuild: Installing kmk_time => /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998/kBuild/bin/freebsd.amd64/kmk_time kmk: Leaving directory `/usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998' echo done > /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998/out/freebsd.amd64/release/bootstrap/ts-stage2-install gmake[2]: Leaving directory '/usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998' cd /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998 && /bin/rm -f -r out cd /usr/obj/usr/ports/devel/kBuild/work/kBuild-0.1.9998 && ./kBuild/env.sh kmk ./kBuild/env.sh: info: Executing command: kmk Segmentation fault (core dumped) ./kBuild/env.sh: info: rc=139: kmk *** Error code 139 Perhaps the problem is more related to gcc?
It was discussed a month ago in #bsdports@EFNet IRC. I had the same with # grep =RELRO /var/db/ports/devel_binutils/options OPTIONS_FILE_SET+=RELRO After I changed it to OPTIONS_FILE_UNSET+=RELRO and recompile devel/binutils - devel/kBuild builded without errors. A bit more info: #include <ctype.h> int main () { islower('a'); return 0; } $ gcc -o test test.c $ ./test Segmentation fault Quote from irc log: <jilles> VVD, there is a commit to libexec/rtld-elf from early this year with message "For the main binary, postpone enforcing relro read-only protection until copy relocations are done." <jilles> svn r311984 in head and MFCed to stable/11 and stable/10 <VVD> jilles, do I need recompile binutils with OPTIONS_FILE_UNSET+=RELRO ? <jilles> VVD, that's a possible workaround <VVD> will try <VVD> jilles, yes, it fixed: binutils with OPTIONS_FILE_UNSET+=RELRO
I confirm, that was due to binutils RELRO option. I removed it and now kBuild is building fine. Thanks
Appears to work now.