I want to build a linux kernel with as many C source files as possible for testing, so I use make allyesconfig at first. Meanwhile I need debug info, so I tried some ways to add it:
make menuconfig and open the debuginfo option.
modify the "CONFIG_DEBUG_INFO_NONE=y" to "CONFIG_DEBUG_INFO=y"
and then run make, however an error happen for the both two ways:
"FATAL: modpost: vmlinux.o is truncated. sechdrs[i].sh_offset=572324920 > sizeof(*hrd)=64
make[1]: *** [scripts/Makefile.modpost:56: vmlinux.symvers] Error 1
make: *** [Makefile:1169: vmlinux] Error 2"
so I'm confused, how could I add debug info when I use the allyesconfig? The tested versions of my kernel is 6.0-rc6 and 6.0
Related
I am new to compiling.
I am trying to compile iperf3 for Windows 10 because there is no official Windows distribution of iperf3 and for the learning experience. I am trying to do so on the new Windows Subsystem for Linux feature via Bash on Ubuntu on Windows, also for the learning experience.
I installed mingw-w64, which should give me the proper compiler and environment necessary for cross-compiling:
sudo apt-get install mingw-w64
This put two directories into my /usr directory:
i686-w64-mingw32
x86_64-w64-mingw32
It also put a bunch of things that look like compilers into /usr/bin.
I unzipped the .tar.gz file from iperf3 and navigated into it. Then, I run ./configure --host=i686-w64-mingw32.static and it completes without errors.
I note that the output of the command has a worrisome line: checking for i686-w64-mingw32.static-gcc... no
I note that the Makefile's CC variable is set to gcc, which doesn't sound like the proper compiler.
Then, I run make. It fails with errors:
collect2: error: ld returned 1 exit status
make[2]: *** [iperf3] Error 1
make[2]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/snip/iperf3/iperf-3.1.4/src'
make: *** [all-recursive] Error 1
I also see the line: libtool: warning: undefined symbols not allowed in i686-w64-mingw32.static shared libraries; building static only
I think that the ./configure is not working correctly since it appears to have not found the right compiler for my --host argument and put it in the Makefile.
What am I doing wrong?
EDIT:
I changed the command to ./configure --host=i686-w64-mingw32 per comments and it completes without error. But no makefile is created so make yields make: *** No targets specified and no makefile found. Stop.
What am I doing wrong, now?
EDIT 2:
Looks like the ./configure actually is failing. Last line of its output is nanosleep() required for timing operations., which seems to mean that its missing a library for nanosleep.
How do I get nanosleep?
mingw doesn't support nanosleep. So programs using it cannot be compiled using mingw-w64.
I would like to ask where does this error come from:
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://github.com/archlinuxarm/PKGBUILDs/issues> for instructions.
CMakeFiles/supnsa_parser.dir/build.make:77: recipe for target 'CMakeFiles/supnsa_parser.dir/src/helper.cpp.o' failed
make[2]: *** [CMakeFiles/supnsa_parser.dir/src/helper.cpp.o] Error 4
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/supnsa_parser.dir/all' failed
make[1]: *** [CMakeFiles/supnsa_parser.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
I'm getting this on my raspberry pi when I launch the compilation of my C++ application.
Where does it come from? How can I solve this? Thank you
Usually Killed message during compilation indicates out of memory issue as most of the compilation processes requires higher amount of memory, so you should either increase it (if you can, check with free -m or top command), or another solution is to create a swap file and re-run compilation again.
See also: Out Of Memory Management in Linux Kernel.
I'm trying to compile gcc-code-assist which has the code completion feature in order to use it with emacs. However i have been getting this error message while compilinng
checking for exception model to use... configure: error: unable to detect exception model
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/home/dev/workspace/trash/gcc-code-assist-0.1-4.4.4'
make: *** [all] Error 2
I'm running Ubuntu 12.04 64bit
what can i do to overcome this problem
I found the right way to compile it ...
I really didn't have much knowledge of how to compile gcc (my first time)
after reading through the FAQ of building gcc I found the problem.
it turned out that I had to run the configure script and make from outside the source directory
( I called it gcc-build) so the directory list looked like this
gcc-source/
gcc-build/
then everything compiled smoothly
here's the link to the FAQ http://gcc.gnu.org/wiki/FAQ#configure
I have download and extracted u-boot-1.1.6 on Ubuntu Linux. I just want to compile the source code using GCC (not targeting cross compilation for any embedded platform).
I tried running the provided MAKEALL makefile but "powerpc-linux-gcc : Not Found" is happening.
My understanding is irrespective of platform the source code should compile.
What are the necessary makefile and environment changes I need to do for compilation on x86?
I have taken the recent code. Still facing some issues
I have followed following steps to compile it on x86.
make clean;
make coreboot-x86_config
./MAKEALL -C x86
In step 3 I observed following:
ravitiwari#RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make clean
ravitiwari#RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make coreboot-x86_config
Configuring for coreboot-x86 - Board: coreboot, Options: SYS_TEXT_BASE=0x01110000
ravitiwari#RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ ./MAKEALL -C x86
Configuring for coreboot-x86 - Board: coreboot, Options: SYS_TEXT_BASE=0x01110000
make[1]: ** [interrupts.o] Error 127
make: ** [arch/x86/cpu/libx86.o] Error 2
make[1]: ** [coreboot.o] Error 127
make: ** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2
make[1]: ** [bootm.o] Error 127
make: ** [arch/x86/lib/libx86.o] Error 2
size: './u-boot': No such file
/bin/bash: sparse: command not found
make[1]: ** [interrupts.o] Error 127
make: ** [arch/x86/cpu/libx86.o] Error 2
make: ** Waiting for unfinished jobs....
/bin/bash: sparse: command not found
make[1]: ** [coreboot.o] Error 127
make: ** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2
/bin/bash: sparse: command not found
make[1]: ** [bootm.o] Error 127
make: ** [arch/x86/lib/libx86.o] Error 2
make: INTERNAL: Exiting with 4 jobserver tokens available; should be 3!
--------------------- SUMMARY ----------------------------
Boards compiled: 1
Boards with errors: 1( coreboot-x86 )
make clean; make coreboot-x86_config; make
is more likely to be useful to you.
In my experience, u-boot is built for a single specific embedded platform. That would be true even when your host is x86, so you have /usr/bin/gcc already installed.
What you stumbled on (I see it by running ./MAKEALL at top level) wants to build ALL of the embedded platforms available. But it will still build specific platforms, that is inherent to U-Boot mission. It defaulted to using powerpc toolchain (powerpc-linux-gcc) rather than the x86 toolchain. My suggestion instead chooses a specific x86-based platform, and builds it. You will see various compilation outputs at console, showing what's going on.
MAKEALL would build, then throw away build results, for multiple other platforms first. You could do
.MAKEALL -c x86
but that hides compilation outputs. For other CPU you'd need appropriate cross compiler installed.
I was compiling a source code, and it always fails at make command, below is the error message.
gcc: unrecognized option '-rdynamic'
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: \
warning: --export-dynamic is not supported for PE targets, \
did you mean --export-all-symbols?
/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../i686-pc-cygwin/bin/ld: \
warning: --export-dynamic is not supported for PE targets, \
did you mean --export-all-symbols?
make[3]: Leaving directory `/home/alimjan/slim502/src'
make[2]: Leaving directory `/home/alimjan/slim502/src'
make[1]: Leaving directory `/home/alimjan/slim502/src'
Making all in lib
make[1]: Entering directory `/home/alimjan/slim502/lib'
Cannot execute /bin/lmntal
Makefile:422: recipe for target `config.il' failed
make[1]: *** [config.il] Error 1
make[1]: Leaving directory `/home/alimjan/slim502/lib'
Makefile:293: recipe for target `all-recursive' failed
make: *** [all-recursive] Error 1
(Above lines broken to display)
I could not solve this. I am new to make and don't know what to do?
Usually when a makefile output looks as severe as your output, then it is because of the environment of which it is being used on has changed -- it could perhaps be that some external files have been moved or deleted or it could be that the make is too big, especially if the make is recursive in nature ( stay away from recursive makefiles; go NR)
Anyway if I where you I would look into where the environment had changed -- perhaps if your project is in a version system - try a different branch
Trying to solve the problems in the makefile could be very difficult and so it is better to go back to a version that worked and then move on from there
I'm not really sure this is a problem with the makefile. The error is:
Cannot execute /bin/lmntal
I'm fairly sure if you tried to run "/bin/lmntal" yourself from the command line you'd get a similar error. It seems that your build requires some extra utility in order to run, that you don't have or which isn't working on your system. Does that file (/bin/lmntal) exist? Is it executable? Is it a script and if so, does the first line refer to an interpreter that exists and is executable? Is it a 32bit program (use file /bin/lmntal) while you're using a 64bit operating system and if so, do you have the 32bit versions of libc, etc. installed on your Ubuntu system? Or vice versa (if you have a 32bit Ubuntu and the utility is a 64bit program you won't be able to run it at all)?
Alternatively it could be that this program is supposed to be found somewhere else or named something else, and your makefile is at fault because some variables are not set; for example the makefile could say something like $(FOODIR)/bin/lmntal and for some reason the variable $(FOODIR) is not set.
If you provide the details above (file exists? Permissions? file output? Complete rule at line 422 of the makefile?) we can provide more help.