I'm using make to build a large project on OSX Lion. The scripts worked fine on OSX up to Snow Leopard, but now it fails.
What happens is that after building certain modules, I get an error similar to the following:
touch my.app/Contents/Resources
touch my.app
make[2]: write error
make[1]: *** [all] Error 1
make: *** [all] Error 1
If I then type make again it resumes from where it fails and builds successfully (until it hits another such error). It always happens for the same two modules of the project, and I can't for the life of me work out why.
Please let me know if there's any more information I can provide that would be helpful.
1st Update
Here's the output of make -d:
...
Finished prerequisites of target file `DesktopConn.o'.
Prerequisite `DesktopConn.cxx' is older than target `DesktopConn.o'.
No need to remake target `DesktopConn.o'.
Considering target file `List.o'.
Looking for an implicit rule for `List.o'.
Trying pattern rule with stem `List'.
Trying implicit prerequisite `/bin/sh: line 1: 6733 Segmentation fault: 11 make all
Reaping losing child 0x102d0ae70 PID 6471
make[1]: *** [all] Error 1
Removing child 0x102d0ae70 PID 6471 from chain.
Reaping losing child 0x10560ee20 PID 6342
make: *** [all] Error 1
Removing child 0x10560ee20 PID 6342 from chain.
I've put the whole make -d output (extremely verbose) on pastebin.
2nd Update
I've uploaded the Makefile too.
3rd Update
I've downloaded the source for make, built from source on my machine. It still fails at the same point. I've also tried using the make binary from Snow Leopard.
Try taking the SEGV at face value. make is either dereferencing an out-of-bounds pointer, or trying to write memory somewhere out of bounds, or it is trying to extend the stack beyond the process stack size limit. There's nothing you can do about the first two without debugging GNU make, but you can increase the stack limit. Using bash:
ulimit -s hard
raises the soft limit to the hard limit, giving you as much stack space as possible. Try it and see if make can run to completion without crashing.
llvm is the default compiler in Lion, I believe, but was not in previous versions you mentioned. Occam's razor says try it using:
CC=gcc make
Edit:
Found this, which I think is related. See answer #1, 3 edits: here. It refers to building Ruby, but I think the underlying issue is the same. It's possible you'll need to download a different version of GCC if this is the issue.
Related
I am trying to learn how to port GCC to new architectures. Most tutorials say that I only have to create three files named my_processor.c my_processor.h and my_processor.md; however when running ./configure --target=my_processor machine is not recognized.
Following an answer given in How to write your own code generator backend for gcc?, I added my configuration in config.sub and ./configure worked.
Unfortunately, when I use make, the terminal returns an error saying
checking if mkdir takes one argument... no
*** Configuration my_processor-unknown-none not supported
Makefile:4230: recipe for target 'configure-gcc' failed
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory 'objdir'
Makefile:905: recipe for target 'all' failed
make: *** [all] Error 2
The problem seems to be due to a bad configuration in gcc/config.gcc, maybe because I added my architecture in a wrong place (there are multiple case ${target}, so not sure which choose) or because I am missing something.
The only information that I have found appears in https://gcc.gnu.org/onlinedocs/gcc-4.2.2/gccint/Back-End.html, but it is not complete enough.
So, how could I do to avoid this error?
Krister Walfridsson's blog has a detailed description of all the steps needed to create a new backend. The first in the series is about the 8 kinds of files to be changed or created. It's also suggested to follow the logic for a Moxie backend that might be easier to start with than risc-v.
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 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.
I'm trying to build a new kernel and add a new system call to that built kernel and when I try to recompile using 'make' command after creating the new system call I get this error.
scripts/Makefile.build:44: /usr/src/linux-3.0.42/block/helloworld/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-3.0.42/block/helloworld/Makefile'. Stop.
make: *** [block/helloworld] Error 2
If someone can help me with this I'll be thankful :)
Kernel modules use a different version of make than you are probably used to. It greatly simplifies things, but can be a bit confusing at first. Here is documentation for kernel make: http://lwn.net/Articles/21835/
Here is tutorial on a hello world module:
The c code: http://tldp.org/LDP/lkmpg/2.6/html/x121.html
The corresponding makefile: http://tldp.org/LDP/lkmpg/2.6/html/x181.html
Not to bring back an old post but I had a similar problem and I am surprised no one suggested this.
When editing the linux3-x-x/Makefile
you want to include your directory by modifying the line:
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
to
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ helloworld/
A simple mistake is to forget THE SPACE after each directory block/_helloworld/
The underscore represents a SPACE
IF YOU do not have that space then you will get the above error no matter what.
Just thought I would add this incase others are searching around for a response
I've been for the past few hours trying to figure out why openCV doesn't compile on leopard. I've been googling for references but all point to a dead google group.
So my question is quite simple: I've read INSTALL file, read all documentation i could find and still couldn't figure a solution for this.
The compile breaks here (this is generated through the Makefile):
rm -fr
.libs/libcxcore.lax/lib_cxcore.a mkdir
.libs/libcxcore.lax/lib_cxcore.a
Extracting /Users/fmsf/Projects/Motion
Tracking/Libs/opencv-1.1.0/cxcore/src/./.libs/lib_cxcore.a (cd .libs/libcxcore.lax/lib_cxcore.a
&& ar x /Users/fmsf/Projects/Motion
Tracking/Libs/opencv-1.1.0/cxcore/src/./.libs/lib_cxcore.a) ar: /Users/fmsf/Projects/Motion: No
such file or directory make[2]: ***
[libcxcore.la] Error 1 make[1]: ***
[check-recursive] Error 1 make: ***
[check-recursive] Error 1
Does anyone know what i could do to build it?
I'm using mac os 1.5 leopard, while reading i found the full port for Mac OS is still unfinished, but I don't really believe it's the missing of this library.
Based on the error, my suggestion is:
Try building it in a folder that doesn't have spaces in the name.
("/Users/fmsf/Projects/Motion Tracking/" vs "ar: /Users/fmsf/Projects/Motion: No such file or directory")
you may be trying 1.1. this is pretty new. consider trying 1.0. i have built 1.0 on windows and ubuntu.