I'm trying to compile busybox, but it segfaults when I try to do so.
ignatius@ulven:~/PROJ$ make
scripts/kconfig/conf -s Config.in
#
# using defaults found in .config
#
make[2]: *** [/home/ignatius/PROJ/scripts/kconfig/Makefile:40: silentoldconfig] Segmentation fault (core dumped)
make[1]: *** [/home/ignatius/PROJ/Makefile:444: silentoldconfig] Error 2
make: *** [Makefile:522: include/autoconf.h] Error 2
Anyone know what the problem might be?
Thank you.
Typically error 2 means no such file
Suggest you look at the lines # indicated in the makefile.
Please specify OS
I have looked at the lines. They are
scripts/kconfig/Makefile lines 40:
silentoldconfig
$< -s Config.in
$(MTIME_IS_COARSE) && sleep 1
This system is openSuSE Leap 15.5
Thanks.
And the others mentioned ...444 , 522
Line 444:
$(Q)$(MAKE) $(build)=scripts/kconfig $@
Line 522:
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
@ignatius , posting the lines is not much help here sorry, suggest you look to see if there's anything related to those lines specifically - for example do all the files (if any) (include/autoconf.h) mentioned exist on your path, are the readable/executable etc ... whats in the input to silentoldconfig Config.in file etc. - what do you think the reason for them causing an error to be thrown might be.
try adding --debug to the make command make --debug .... and capture the output to a file for you to inspect for possible causes.
what's the version of make being used ? make -v
you may get more concrete advice here https://www.busybox.net/
Here's the output of make --debug
GNU Make 4.2.1
Built for x86_64-suse-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
File '__build' does not exist.
File 'FORCE' does not exist.
Must remake target 'FORCE'.
Successfully remade target file 'FORCE'.
Prerequisite 'FORCE' of target 'scripts/basic/fixdep' does not exist.
Must remake target 'scripts/basic/fixdep'.
HOSTCC scripts/basic/fixdep
Successfully remade target file 'scripts/basic/fixdep'.
Prerequisite 'FORCE' of target 'scripts/basic/split-include' does not exist.
Prerequisite 'scripts/basic/fixdep' is newer than target 'scripts/basic/split-include'.
Must remake target 'scripts/basic/split-include'.
HOSTCC scripts/basic/split-include
Successfully remade target file 'scripts/basic/split-include'.
Prerequisite 'FORCE' of target 'scripts/basic/docproc' does not exist.
Prerequisite 'scripts/basic/fixdep' is newer than target 'scripts/basic/docproc'.
Must remake target 'scripts/basic/docproc'.
HOSTCC scripts/basic/docproc
Successfully remade target file 'scripts/basic/docproc'.
Must remake target '__build'.
Successfully remade target file '__build'.
Successfully remade target file 'scripts_basic'.
File 'outputmakefile' does not exist.
Must remake target 'outputmakefile'.
Successfully remade target file 'outputmakefile'.
File 'gen_build_files' does not exist.
Must remake target 'gen_build_files'.
Successfully remade target file 'gen_build_files'.
File 'FORCE' does not exist.
Must remake target 'FORCE'.
Successfully remade target file 'FORCE'.
Must remake target 'silentoldconfig'.
GNU Make 4.2.1
Built for x86_64-suse-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
File 'silentoldconfig' does not exist.
File 'scripts/kconfig/conf.o' does not exist.
File 'FORCE' does not exist.
Must remake target 'FORCE'.
Successfully remade target file 'FORCE'.
Must remake target 'scripts/kconfig/conf.o'.
HOSTCC scripts/kconfig/conf.o
Successfully remade target file 'scripts/kconfig/conf.o'.
File 'scripts/kconfig/kxgettext.o' does not exist.
Must remake target 'scripts/kconfig/kxgettext.o'.
HOSTCC scripts/kconfig/kxgettext.o
Successfully remade target file 'scripts/kconfig/kxgettext.o'.
File 'scripts/kconfig/mconf.o' does not exist.
Must remake target 'scripts/kconfig/mconf.o'.
HOSTCC scripts/kconfig/mconf.o
Successfully remade target file 'scripts/kconfig/mconf.o'.
File 'scripts/kconfig/zconf.tab.o' does not exist.
Must remake target 'scripts/kconfig/zconf.tab.o'.
HOSTCC scripts/kconfig/zconf.tab.o
Successfully remade target file 'scripts/kconfig/zconf.tab.o'.
Prerequisite 'scripts/kconfig/conf.o' is newer than target 'scripts/kconfig/conf'.
Prerequisite 'scripts/kconfig/kxgettext.o' is newer than target 'scripts/kconfig/conf'.
Prerequisite 'scripts/kconfig/mconf.o' is newer than target 'scripts/kconfig/conf'.
Prerequisite 'scripts/kconfig/zconf.tab.o' is newer than target 'scripts/kconfig/conf'.
Prerequisite 'FORCE' of target 'scripts/kconfig/conf' does not exist.
Must remake target 'scripts/kconfig/conf'.
HOSTLD scripts/kconfig/conf
Successfully remade target file 'scripts/kconfig/conf'.
Must remake target 'silentoldconfig'.
scripts/kconfig/conf -s Config.in
so, has it complied now ?
there's no segfault or errors shown in you last post ..., is that everything that was generated ?
there are binaries that can be downloaded - from the busybox.net website - might be easier than struggling to build from sources.
If I get time I will attempt to build from source (although I have the executable already on my system - linux mint 20.2)
I didi a make --debug >> bleh
and for some reason it missed the segfault lines. Here they are:
#
# using defaults found in .config
#
*** Error during writing of the configuration.
make[2]: *** [/home/ignatius/PROJ/scripts/kconfig/Makefile:40: silentoldconfig] Error 1
make[1]: *** [/home/ignatius/PROJ/Makefile:444: silentoldconfig] Error 2
make: *** [Makefile:522: include/autoconf.h] Error 2
error 1 ... differs from your initial posting. check you have permission to write to what directory this is happening in (or file being written into)
error 2 .... does the file include/autoconf.h exist (can you read as non-privileged) ?
where did you get the command line make scripts/kconfig/conf -s Config.in
from
which version of busybox are you attempting to build ? ....
the more complete the information you supply the better change of making progress is.
Ok. I think I found the problem.
ignatius@ulven:~/PROJ/scripts/kconfig$ ./conf -s
./conf: Kconfig file missing
Segmentation fault (core dumped)
I just don't know how to solve it.
A number of questions have asked that seem to be ignored - once you answer them we might be able to continue. Also, you are posting differing command lines each time ...
run and capture the output of (nothing else please) make
as previously mentioned .. I downloaded the source ... here's the salient part of the my attempt to build . this took a few minutes.
NB: text surrounded by ##### are mine, the rest is verbatim from executing the commands shown.;
#
# having downloaded and unzipped the source code ...
#
cd ~/Downloads/busybox
make
scripts/kconfig/conf -s Config.in
***
*** You have not yet configured busybox!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make defconfig").
***
make[2]: *** [/home/munke/Downloads/busybox/scripts/kconfig/Makefile:40: silentoldconfig] Error 1
make[1]: *** [/home/munke/Downloads/busybox/Makefile:444: silentoldconfig] Error 2
make: *** [Makefile:522: include/autoconf.h] Error 2
#####
# following advice from above ... assumed defconfig === default ...
#####
make defconfig
make
#####(reams of output ....)
#####
# try a couple of commands
#####
./busybox pwd
/home/munke/Downloads/busybox
./busybox groups
munke adm cdrom sudo dip plugdev crontab lpadmin .....
./busybox ls
AUTHORS applets_sh editors printutils
Config.in arch examples procps
INSTALL archival findutils qemu_multiarch_testing
LICENSE busybox include runit
Makefile busybox_ldscript.README.txt init scripts
Makefile.custom busybox_unstripped klibc-utils selinux
Makefile.flags busybox_unstripped.map libbb shell
Makefile.help busybox_unstripped.out libpwdgrp size_single_applets.sh
NOFORK_NOEXEC.lst configs loginutils sysklogd
NOFORK_NOEXEC.sh console-tools mailutils testsuite
README coreutils make_single_applets.sh
...
1 Like