Why make command is failing here - makefile

I am compiling and building my project using GNU make version 3.81. The make command was successful in building my project. However, from today, I am getting a strange error while running make. I am not sure what got changed inadvertently in my machine which is causing it to fail --
C:\TestView710\bora>make.exe MY_PROD
bash.exe: warning: could not create /tmp!
bash.exe: warning: could not create /tmp!
bash.exe: warning: could not create /tmp!
C:/TestView710/sysimg-ufa/bora/make2284-1.sh: line 2: syntax error: unexpected end of file
make.exe: *** [ufa-standalone-msm] Error 2
I have a couple of questions --
does make.exe internally invoke bash.exe?
And why is bash.exe complaining about tmp folder?
Also it looks like make.exe is creating a transient file make2284-1.sh which gets deleted very soon.
Finally how to debug and fix this problem ?
Curious to understand what is going on here.

Related

Running windows make command fails

I have just started working on a project in windows environment. The project is compiled and build using make command which compiles and generates the executables. It is a C# project. However, when I run the make command to build, I get the following error -- E:\GJoaquin\depot\sim\joaquin>make
was unexpected at this time.
"Error: "WORKSTATION_VERSION not defined. Please define in test test bora/publi
/vm_version.h.""
was unexpected at this time.
was unexpected at this time.
! was unexpected at this time.
make: *** [default] Error 255
I am not very knowledgeable on make files. Not sure which make file and which line in that make file might be causing the problem. Do you have any idea on how to debug this?

XCode 7 Otool failing to copy file during build

[OSX 10.10.5, XCode 7.0.1]
I'm getting an error during my build stating that Otool can't copy a file:
error: otool: can't open file: /usr/local/opt/llvm/lib/libclang.3.6.dylib: (No such file or directory)
The two lines before the error (and what I think is causing it, because there are no other error indications) are:
cp -p /usr/local/opt/llvm/lib/libclang.3.6.dylib /Users/me/Library/Developer/Xcode/DerivedData/MiCASE-asvgjysohljplretlamgcpgnxgiq/Build/Products/Debug/MiCASE.app/Contents/Frameworks
cp -p /usr/local/opt/llvm/lib/libclang.3.6.dylib: /Users/me/Library/Developer/Xcode/DerivedData/MiCASE-asvgjysohljplretlamgcpgnxgiq/Build/Products/Debug/MiCASE.app/Contents/Frameworks
When I manually perform the command in a terminal, it works fine. I've set the permissions of the dynamic library to me:admin 777, so the file definitely exists. Thus I don't understand why I am getting the error.
This leads me to believe there is something else that is failing but the build log isn't showing it.
I'm also getting this error at the end of the script, but I think it's due to the above:
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
Solution
#trojanfoe, thanks for the info.
The problem was that as part of the build, a script was being run. In the script otool was being used to extract dependencies, and filtering of its output was done incorrectly. Fixing the filtering resolved the issue.

Error installing libmaxminddb

I am trying to install the GEolite2 database on a netbsd server. I can't get past the first make for libmaxmindb. I get the following error;
make all-recursive
Making all in src
Making all in bin
Making all in t
make: don't know how to make man/man1/*.1. Stop
make: stopped in /usr/local/maxmind/libmaxminddb-1.1.1
*** Error code 1
Stop.
make: stopped in /usr/local/maxmind/libmaxminddb-1.1.1
*** Error code 1
Stop.
make: stopped in /usr/local/maxmind/libmaxminddb-1.1.1
Hpw can I either fix this or get around it?
UPDATE:
I downloaded the tarball for 1.1.1 from github.com/maxmind/libmaxminddb/releases/download/1.1.1/….
I noticed that the man directory has no Makefile in it and from what I could tell, maybe it should.
I am using NetBSD 6.0.1 and ran the steps in the Readme.
configure - ran normally
make - failed as shown above. –
I also tried starting from a git clone - same result.
On BSD systems one should always use GNU Make with Makefiles generated by GNU Automake.
I see in README.md for the libmaxminddb repository on github.com that one is expected to run the bootstrap script after cloning the repo (which is quite normal, though more often the script is called autogen).
If you don't already have GNU Make and the GNU Autotools installed I recommend using pkgsrc to install them.

Spin: gcc-4: error: spawn: No such file or directory

I want to use SPIN model checker on windows7-64 and I have installed all the prerequisites of it. Below is the procedure how I did it
I installed gcc compiler with cygwin .. updated path checked with command
prompt it shows version 4.9.2
Installed Active Tcl .. updated path .. works fine when I open ispin.
Updated path with ispin directory as well.
Just a bit of trick, also check by giving exact path of gcc.exe inside ispin file. But the error remained same.
But when I try to compile pre included example files (e.g leader.pml), it gives me the error
spin: preprocessing failed
gcc-4: error: spawn: No such file or directory
Can someone please tell me what am I doing wrong and/or missing ? and how can I fix this ?
Thanks.
In cygwin\bin, copy gcc twice, name one gcc-3, the other gcc-4, but also leave plain gcc there.

Compile error from gmake, but single line runs fine

I'm editing a makefile with multiple targets, using the Unity unit testing framework. Pressing the "Build" button in Code Composer Studio runs through fine until the following line
$(C_COMPILER) $(INC_DIRS) $(SRC_FILES1) -o $(TARGET1)
Also in the makefile are the following lines:
C_COMPILER=C:\MinGW\bin\mingw32-gcc.exe
UNITY_ROOT=../test/unity/
UNITY_C=$(UNITY_ROOT)unity.c
UNITY_H=$(UNITY_ROOT)unity.h
INC_DIRS=-I../include/ -I$(UNITY_ROOT)
SRC_FILES1=$(UNITY_C) ../source/ProductionCode.c ../test/TestProductionCode.c ../test/test_runners/TestProductionCode_Runner.c
TARGET_BASE1=test1
TARGET_EXTENSION=.out
TARGET1 = $(TARGET_BASE1)$(TARGET_EXTENSION)
And when building in Code Composer, this is the error that is displayed
C:\MinGW\bin\mingw32-gcc.exe -I../include/ -I../test/unity/ ../test/unity/unity.c ../source/ProductionCode.c ../test/TestProductionCode.c ../test/test_runners/TestProductionCode_Runner.c -o test1.out
gmake[1]: *** [default] Error 1
gmake[1]: Leaving directory `C:/Users/matt.harding/Documents/SubversionDirectories/pt_listen_only_can_interface/sw/ccs6_workspace/makefile_project_test1/Debug'
gmake: *** [all] Error 2
So I opened up Cygwin and tried it there to see if I could find the cause. Entering just this problem line, it ran perfectly fine and generated the target successfully! So I'm not sure what would be the problem in Code Composer...
Any ideas? Thanks!
EDIT: If I run the same makefile with gmake in cygwin, it displays the same error as in CCS. So... why is there a problem running this with gmake rather than just running the compiler from Cygwin?
EDIT: From what I can gather, it looks like a compiler incompatibility between Windows and Cygwin? If I change the compiler in the makefile to
C_COMPILER=C:\cygwin\bin\gcc.exe
There is still a problem when running the makefile from Code Composer, but running gmake all works perfectly in Cygwin!
So I found a solution to my problem.
I changed the compiler to
C_COMPILER=C:\MinGW\bin\gcc.exe
Still didn't work in Code Composer Studio (CCS)
I added C:\MinGW\bin\ to the system PATH.
Still didn't work in CCS.
I closed and reopened CCS after having added MinGW to the system PATH.
SUCCESS!
I don't fully understand why things didn't work why I expected them to, but at least we have a solution.

Resources