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?
Related
When I ran Makefile on one Ubuntu machine the compilation went all fine. However, when I run it on another way, I get the error.
*** missing separator
Can the type of machine cause this error?
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.
[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.
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.
I'm very new to Linux and I'm using UBUNTU to run a code! when I use 'make' command to compile my 'Makefile' I get this error:
make:*** [mod_param.o] Error 127
could anyone tell me what is this error and why this happen?
Thanks in advance!
Whenever reading the output of a build, you want to go up and find the FIRST error message. That's almost always the important one. Once something fails, the rest of the errors might be cascading problems from the first one. In this case, that message is just make telling you that it tried to compile mod_param.c and it didn't work. You'll have to look at the messages BEFORE this one to see why the compile failed.