No files emitted Warning. Seems to recognize compiler though - coverity

During the build, I am expecting cov-emit.exe to get called for these C files compiled using aampc.exe. It seems to recognize the aampc compiler since it says "COMPILING". Could it still be that the compiler is not recognized? Thanks for any help.
Here is a snippet for 2 of the files so you can see what is in the build-log.txt file:
2021-07-28T15:22:43.189188Z|cov-translate|204916|output|>
2021-07-28T15:22:43.282923Z|cov-internal-capture|185068|info|> EXECUTING: "c:\localapps\msys\1.0\bin\echo.exe"
2021-07-28T15:22:43.376446Z|cov-internal-capture|185068|info|> EXECUTING: "C:\localapps\msys\1.0\bin\sh.exe"
2021-07-28T15:22:43.471298Z|cov-internal-capture|185068|info|> EXECUTING: "c:\localapps\msys\1.0\bin\echo.exe"
2021-07-28T15:22:43.600730Z|cov-internal-capture|185068|info|> EXECUTING: c:\AAMP_Tools\aampc\bin\aampc.exe -c =a-noupper -I../../GSW/source/ac -O2 -w2 -l ../../GSW/source/ui/uimprog.c =a-list=obj/ui/uimprog.lis =a-object=obj/ui/uimprog.obj
2021-07-28T15:22:43.710078Z|cov-internal-capture|185068|info|> EXECUTING: c:\AAMP_Tools\aampc\bin\aampcc #C:\Users\userrabz\AppData\Local\Temp\tmp2 -I../../GSW/source/ac
2021-07-28T15:22:44.768043Z|cov-internal-capture|185068|info|> EXECUTING: C:\WINDOWS\system32\cmd.exe /c move /Y ....\GSW\source\ui\uimprog.lis ....\GSW\source\ui\uimprog.clis
2021-07-28T15:22:45.003488Z|cov-internal-capture|185068|info|> EXECUTING: c:\AAMP_Tools\aampc\bin\macasm "C:\views\surfmob\GB_GRAM_3_2\GSW\build../../GSW/source/ui/uimprog.asm" -in_macro c:\AAMP_Tools\aampc\bin\aamp5 -list -cross_reference -instr -l -noupper -list=obj/ui/uimprog.lis -object=obj/ui/uimprog.obj
2021-07-28T15:22:45.182336Z|cov-internal-capture|185068|info|> EXECUTING: C:\WINDOWS\system32\cmd.exe /c move /Y ....\GSW\source\ui\uimprog.clis obj\ui\uimprog.lis
2021-07-28T15:22:45.395191Z|cov-internal-capture|185068|info|> CWD: C:\views\surfmob\GB_GRAM_3_2\GSW\build
2021-07-28T15:22:45.395191Z|cov-internal-capture|185068|info|> COMPILING: "C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-translate.exe" c:\AAMP_Tools\aampc\bin\aampc.exe -c =a-noupper -I../../GSW/source/ac -O2 -w2 -l ../../GSW/source/ui/uimprog.c =a-list=obj/ui/uimprog.lis =a-object=obj/ui/uimprog.obj
2021-07-28T15:22:45.395191Z|cov-internal-capture|185068|info|> OUTPUT_FILE: pipe:\.\pipe\cov-log-5ff163dd5238b84826969c9de92e1a35.s
2021-07-28T15:22:45.637350Z|cov-translate|200900|output|> Using cached template compiler configuration instance C:/Users/userrabz/coverity-idirs/DRS/emit/CRM25528/config/ad1734263e4f13355ef9c06230b585b3/coverity_config.xml
2021-07-28T15:22:45.652972Z|cov-translate|200900|output|> COV_TRANSLATE EXPANDED ARGS: "-c" "=a-noupper" "-I../../GSW/source/ac" "-O2" "-w2" "-l" "../../GSW/source/ui/uimprog.c" "=a-list=obj/ui/uimprog.lis" "=a-object=obj/ui/uimprog.obj"
2021-07-28T15:22:45.684216Z|cov-translate|200900|output|> [WARNING] Invalid gxx version specification: Empty version number. Defaulting to version 3.2.0
2021-07-28T15:22:45.715458Z|cov-translate|200900|output|>
2021-07-28T15:22:45.777943Z|cov-internal-capture|185068|info|> EXECUTING: "c:\localapps\msys\1.0\bin\echo.exe"
2021-07-28T15:22:45.845650Z|cov-internal-capture|185068|info|> EXECUTING: "C:\localapps\msys\1.0\bin\sh.exe"
2021-07-28T15:22:45.940491Z|cov-internal-capture|185068|info|> EXECUTING: "c:\localapps\msys\1.0\bin\echo.exe"
2021-07-28T15:22:46.065464Z|cov-internal-capture|185068|info|> EXECUTING: c:\AAMP_Tools\aampc\bin\aampc.exe -c =a-noupper -I../../GSW/source/ac -O2 -w2 -l ../../GSW/source/ui/uimerase.c =a-list=obj/ui/uimerase.lis =a-object=obj/ui/uimerase.obj
2021-07-28T15:22:46.178008Z|cov-internal-capture|185068|info|> EXECUTING: c:\AAMP_Tools\aampc\bin\aampcc #C:\Users\userrabz\AppData\Local\Temp\tmp2 -I../../GSW/source/ac
2021-07-28T15:22:47.486879Z|cov-internal-capture|185068|info|> EXECUTING: C:\WINDOWS\system32\cmd.exe /c move /Y ....\GSW\source\ui\uimerase.lis ....\GSW\source\ui\uimerase.clis
2021-07-28T15:22:47.706457Z|cov-internal-capture|185068|info|> EXECUTING: c:\AAMP_Tools\aampc\bin\macasm "C:\views\surfmob\GB_GRAM_3_2\GSW\build../../GSW/source/ui/uimerase.asm" -in_macro c:\AAMP_Tools\aampc\bin\aamp5 -list -cross_reference -instr -l -noupper -list=obj/ui/uimerase.lis -object=obj/ui/uimerase.obj
2021-07-28T15:22:47.856727Z|cov-internal-capture|185068|info|> EXECUTING: C:\WINDOWS\system32\cmd.exe /c move /Y ....\GSW\source\ui\uimerase.clis obj\ui\uimerase.lis
2021-07-28T15:22:48.045314Z|cov-internal-capture|185068|info|> CWD: C:\views\surfmob\GB_GRAM_3_2\GSW\build
2021-07-28T15:22:48.045314Z|cov-internal-capture|185068|info|> COMPILING: "C:\Program Files\Coverity\Coverity Static Analysis\bin\cov-translate.exe" c:\AAMP_Tools\aampc\bin\aampc.exe -c =a-noupper -I../../GSW/source/ac -O2 -w2 -l ../../GSW/source/ui/uimerase.c =a-list=obj/ui/uimerase.lis =a-object=obj/ui/uimerase.obj
2021-07-28T15:22:48.045314Z|cov-internal-capture|185068|info|> OUTPUT_FILE: pipe:\.\pipe\cov-log-5ff163dd5238b84826969c9de92e1a35.s
2021-07-28T15:22:48.280087Z|cov-translate|198032|output|> Using cached template compiler configuration instance C:/Users/userrabz/coverity-idirs/DRS/emit/CRM25528/config/ad1734263e4f13355ef9c06230b585b3/coverity_config.xml
2021-07-28T15:22:48.296829Z|cov-translate|198032|output|> COV_TRANSLATE EXPANDED ARGS: "-c" "=a-noupper" "-I../../GSW/source/ac" "-O2" "-w2" "-l" "../../GSW/source/ui/uimerase.c" "=a-list=obj/ui/uimerase.lis" "=a-object=obj/ui/uimerase.obj"
2021-07-28T15:22:48.312450Z|cov-translate|198032|output|> [WARNING] Invalid gxx version specification: Empty version number. Defaulting to version 3.2.0
2021-07-28T15:22:48.328072Z|cov-translate|198032|output|>

As the question focuses on the meaning of this log output, I'll do the same.
The presence of the COMPILING line indicates that cov-build recognizes that aampc.exe is a compiler (based on its executable path name), and has handed one of its command lines to cov-translate for further processing.
However, cov-translate seems to be confused about what the command line means. First, it warns about its inability to query the GCC compiler version number; I don't know what aampc.exe is, but if it is not a GCC derivative then cov-configure may have been given bad information. The absence of any further output from cov-translate means it did not see any compilation and so did nothing. (That would be correct behavior if the compiler was being invoked to do something like preprocessing or linking only, but that's not the case here.)

Check for your compiler entry in coverity_config.xml.

Related

SFML: Unable to run code because of soundbuffer error

I came across a problem that wouldn't let me play sounds on SFML. Whenever I call the sf::SoundBuffer buffer; object, the code would break and spit out an error.
I either think its a problem inside the makefile. Other than that, I'm completely lost in what to do
Sample of makefile:
all: compile link
compile:
g++ -I src/include -c main.cpp
link:
g++ main.o -o Sorter -L src/lib -l sfml-audio -l sfml-graphics -l sfml-window -l sfml-system
Picture of the error

How do I get pipe to work when passed in string for sh -c and su is involved

I have the below command
su - root -s /usr/bin/sh -c "java -version|grep build"
But the pipe to grep doesn't seem to work since it prints all lines regardless
java -version writes to standard error, not standard output.
su - root -s /usr/bin/sh -c "java -version 2>&1 |grep build"
2>&1 copies standard error to standard output, so that it gets fed through the pipe and into grep.
That said, grep doesn't have to be run as root, assuming the pipeline isn't being specified for use by something that just runs arbitrary code using su sh -c '...'.
su - root -s /usr/bin/sh -c 'java -version' 2>&1 | grep build

Eclipse Makefile: Make Variables are skipped

I have a project with a Makefile in it, on Unix console it works fine, compiles, builds and I can run the binary at the end.
I imported the project into Eclipse workspace and somehow Makefile module of Eclipse cannot build the project now. It gives the following error:
g++: error: /src/main: No such file or directory
Whereas there should have been
g++ -I $(APR_INCLUDE) -I $(CMS_HOME)/src/main
which uses two make variables. I already put them before this line and define them as :
export APR_INCLUDE=/usr/include/apr-1
export CMS_HOME=~/Desktop/activemq-cpp-library-3.8.4
Same Makefile is fine with console, but not with Eclipse, which is weird.
Any thoughts?
Here is where I put my export lines:
obstacleDetection_cpp: src/obstacleDetection.cpp protoc_middleman
export APR_INCLUDE=/usr/include/apr-1
export CMS_HOME=~/Desktop/activemq-cpp-library-3.8.4
g++ -I $(APR_INCLUDE) -I $(CMS_HOME)/src/main -g -o src/obstacleDetection.o -c src/obstacleDetection.cpp
cd libs && cp $(CMS_HOME)/src/main/.libs/libactivemq-cpp.so.18.0.4 . && ln -sf libactivemq-cpp.so.18.0.4 libactivemq-cpp.so.18
g++ -L $(CMS_HOME)/src/main/.libs/ -g -o bin/obstacleDetection src/obstacleDetection.o src-gen/Point.pb.cc src-gen/Point.pb.h -lactivemq-cpp -lssl -lprotobuf -pthread
#echo "Success. Run the executable from the binary directory with: LD_LIBRARY_PATH=../libs/ ./obstacleDetection"
This is not right:
obstacleDetection_cpp: src/obstacleDetection.cpp protoc_middleman
export APR_INCLUDE=/usr/include/apr-1
export CMS_HOME=~/Desktop/activemq-cpp-library-3.8.4
g++ $(APR_INCLUDE) -I $(CMS_HOME)/src/main ...
All lines in the recipe (that is, lines that are indented with a TAB in a target context like this) are passed to the shell. These are not make variable assignments. There are two things wrong with that:
First, each logical line in the recipe is passed to a new shell. That means any changes to the process context (such as the environment or the working directory) are present only for the duration of that logical line; once the shell processing that line exits, all those changes are lost. So, these lines have no impact: they set an environment variable in the shell, then the shell exits and that setting is gone.
Second, the variable references you make in your compile line, such as $(APR_INCLUDE), are make variable references, not environment variable references. So even if those environment variable assignments still had effect, they would not be used because you're not referring to environment variables here.
You want to create make variable assignments. That can only be done outside of a recipe. Also, you don't need to export them because only make needs to see them (make will expand them before invoking the shell). So, your makefile should look like this:
APR_INCLUDE = /usr/include/apr-1
CMS_HOME = $(HOME)/Desktop/activemq-cpp-library-3.8.4
obstacleDetection_cpp: src/obstacleDetection.cpp protoc_middleman
g++ -I $(APR_INCLUDE) -I $(CMS_HOME)/src/main -g -o src/obstacleDetection.o -c src/obstacleDetection.cpp
cd libs && cp $(CMS_HOME)/src/main/.libs/libactivemq-cpp.so.18.0.4 . && ln -sf libactivemq-cpp.so.18.0.4 libactivemq-cpp.so.18
g++ -L $(CMS_HOME)/src/main/.libs/ -g -o bin/obstacleDetection src/obstacleDetection.o src-gen/Point.pb.cc src-gen/Point.pb.h -lactivemq-cpp -lssl -lprotobuf -pthread
#echo "Success. Run the executable from the binary directory with: LD_LIBRARY_PATH=../libs/ ./obstacleDetection"

unable to build binutils for my cross compiler

i am trying to build binutils 2.19.1 with mingw/msys using following commands:
export PREFIX=/usr/local/cross
export TARGET=i586-elf
cd /usr/src
mkdir build-binutils
cd /usr/src/build-binutils
../binutils-x.xx/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all
make install
and im getting following errors:
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binuti
ls-2.19.1/bfd -I. -D__USE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../..
/binutils-2.19.1/bfd/../include -W -Wall -Wstrict-prototypes -Wmissing-proto
types -Wno-format -Werror -g -O2 -D__USE_MINGW_ACCESS -c -o archive.lo ../../bin
utils-2.19.1/bfd/archive.c
./libtool: line 2258: cygpath: command not found
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19.1/bfd -I. -D__U
SE_MINGW_FSEEK -I. -I../../binutils-2.19.1/bfd -I../../binutils-2.19.1/bfd/../in
clude -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-format -Werror -g -
O2 -D__USE_MINGW_ACCESS -c "" -o archive.o
gcc.exe: error: : No such file or directory
gcc.exe: fatal error: no input files
compilation terminated.
make[3]: *** [archive.lo] Error 1
make[3]: Leaving directory `/usr/src/build-binutils/bfd'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/usr/src/build-binutils/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/usr/src/build-binutils'
make: *** [install] Error 2
/x.sh: line 8: ../gcc-4.5.0/configure: No such file or directory
make: *** No rule to make target `all-gcc'. Stop.
make: *** No rule to make target `install-gcc'. Stop.
i am getting the same error even for the diff binutils version,i have tried binutils-2.19.1, 2.22.0, 2.23.1
so what can be the problem ??
also my mingw's gcc compiler version is 4.6.2
i've also tried the command
make CFLAGS="-Os -w"
bt still the same problem persists
I'm getting a similar error ("cygpath: command not found"), but with newer versions. FWICT there is a line within binutils that assumes that Cygwin is present, although I didn't see any notes in the build instructions saying that Cygwin was required (I might have missed it, though).
I suppose the correct approach would be to install Cygwin, but I'm not sure if that will interfere with Mingw in other ways. It looks like binutils is just trying to use cygpath to convert between O/S path naming conventions, so I got around this problem by creating a little dummy cygpath shell script:
#options described at http://cygwin-lite.sourceforge.net/html/cygpath.html
#echo "MISSING CYGPATH"
if [ "x$1" == "x-w" ]
then
echo $2 #just echo path name back as-is
else
read -p "MISSING CYGPATH. PARAMS WERE: 1=$1 2=$2 3=$3 4=$4 5=$5"
fi
I placed this on the PATH so binutils could find it, instead of getting an error during the build. This script just echoes the path name back as-is (for the path renaming scenario), since Windows seems to be able to understand Unix-style paths anyways these days (and I was running on Windows). For anything else, this script will pause and display the first few command line parameters, to provide some hints as to what further functionality is needed.
HTH someone get a little farther

Matlab 2011b and mingw64

I've followed the guidance I found here.
I have almost completed the work. The following section is the paragraph of batch conversion work. I have created a batch file to convert a lot of DLLs pre-built by MSVC in Matlab 2011b Windows 7(64-bit).
set path=C:\MinGW64\bin;C:\mingw\msys\bin;
mkdir lib
mkdir bin
#echo y |copy *.dll .\bin
#echo y |copy *.lib .\lib
#echo EXPORTS >libmex.def
#echo EXPORTS >libmx.def
#echo EXPORTS >libmat.def
#echo EXPORTS >libeng.def
#echo EXPORTS >libmwlapack.def
c:\mingw64\bin\pexports ./bin/libmex.dll | sed "s/^_//" > libmex.def
c:\mingw64\bin\pexports ./bin/libmat.dll | sed "s/^_//" > libmat.def
c:\mingw64\bin\pexports ./bin/libeng.dll | sed "s/^_//" > libeng.def
c:\mingw64\bin\pexports ./bin/libmwlapack.dll | sed "s/^_//" >libmwlapack.def
gendef ./bin/libmx.dll
echo "Add the mexErrMsgTxt string to each def file,"
echo "then press any key to continue the conversion process"
pause
lib /machine:x64 /def:libmex.def /name:.\bin\libmex.dll /out:.\lib\libmex.lib
lib /machine:x64 /def:libmx.def /name:.\bin\libmx.dll /out:.\lib\libmx.lib
lib /machine:x64 /def:libmat.def /name:.\bin\libmat.dll /out:.\lib\libmat.lib
lib /machine:x64 /def:libeng.def /name:.\bin\libeng.dll /out:.\lib\libeng.lib
lib /machine:x64 /def:libmwlapack.def /name:.\bin\libmwlapack.dll /out:.\lib\libmwlapack.lib
c:\mingw64\bin\x86_64-w64-mingw32-dlltool --kill-at -U -d libmex.def -l /lib/libmex.a
c:\mingw64\bin\x86_64-w64-mingw32-dlltool --kill-at -U -d libmat.def -l ./lib/libmat.a
c:\mingw64\bin\x86_64-w64-mingw32-dlltool --kill-at -U -d libeng.def -l ./lib/libeng.a
c:\mingw64\bin\x86_64-w64-mingw32-dlltool --kill-at -U -d libmx.def -l./lib/libmx.a
c:\mingw64\bin\x86_64-w64-mingw32-dlltool --kill-at -U -d libmwlapack.def -l ./lib/libmwlapack.a
Makefile for engwindemo.exe:
LIBS= -Lc:/mingw64/lib ../lib/libeng.a ../lib/libmx.a ../lib/
libmex.a ../lib/libmat.a
CC=c:/mingw64/bin/gcc -m64 -O3 -I../include -Ic:/mingw64/include
EXE=../bin/engwindemo.exe
SRC=engwindemo.c
all:$(EXE)
$(EXE): $(SRC)
$(CC) $(SRC) $(LIBS) -L../lib -ladvapi32 -luser32 -lgdi32 -lkernel32 -
lmingwex -o $(EXE)
#rm -f *.o*
Using (mingw64) gcc, the compiling and linking processes is ok. Execute engwindemo.exe, I get this error:
_engClose entry point error (in libeng.dll)
In mingw64, how can I build a stand-alone application (engwindemo.exe) which calls from the functions built-in the libeng.dll (Matlab R2011b)?
Thank everyone response! I have built up successfully! In the Matlab R2011b
win32/64, just setting up in the cygwin(x86_64-w64-mingw32-gcc 4.5.2) environment without any dll file conversion.
The part of primary setting is as following
Set the MATLABROOT in short filename form (long filename may be ok.)
MATLABROOT=c:/Progra~1/MATLAB/R2011b
linking the primary libraries built by MSVC
LIBS= -L$(MATLABROOT)/bin/win64 -lmex -lmx -lmwlapack -lmwblas -leng
declare the gcc with the flags
CC=x86_64-w64-mingw32-gcc
CFLAG=-Wall -m64 -O3 -I$(MATLABROOT)/extern/include
MEXFLAG=-m64 -shared -DMATLAB_MEX_FILE -I$(MATLABROOT)/extern/include -Wl,--export-all-symbols $(LIBS)
Others additional parameters to keep compiler happy.
And finally, in the cygwin consloe or mingw64 shell just make this project.