[GenABEL-dev] jenkins gcc to g++
Frank, Alvaro Jesus
alvaro.frank at rwth-aachen.de
Tue Feb 18 17:56:34 CET 2014
Hi Lennart,
thank you for the quick response, it is interesting to note that using
g++ *.cpp -L/usr/lib/openblas-base -lpthread -lopenblas -llapacke -fopenmp -Wall -pedantic -Wunused-result -Wmaybe-uninitialized
wont yield the warnings from the "-Wmaybe-uninitialized" flag, but adding the optimizations "-02" will:
g++ *.cpp -L/usr/lib/openblas-base -lpthread -lopenblas -llapacke -fopenmp -O2 -Wall -pedantic -Wunused-result -Wmaybe-uninitialized
O2 seems to trigger the warnings only when present.
-Alvaro
________________________________________
From: genabel-devel-bounces at lists.r-forge.r-project.org [genabel-devel-bounces at lists.r-forge.r-project.org] on behalf of L.C. Karssen [lennart at karssen.org]
Sent: Tuesday, February 18, 2014 5:49 PM
To: genabel-devel at lists.r-forge.r-project.org
Subject: Re: [GenABEL-dev] jenkins gcc to g++
Hi Alvaro,
Thank you for looking into this!
On 18-02-14 17:16, Frank, Alvaro Jesus wrote:
> Hi all,
>
> I have been trying to replicate Jenkins behavior locally to avoid
> unnecessary numbers commit>bugfix that could be committed at once. but
> the project locally ahs to be compiled using g++ and not gcc. Jenkins
> uses gcc for the unused variables warnings.
If I understand you correctly, you mean that the output of the "GNU Make
+ GNU C compiler warnings" is run by gcc instead of g++. Right?
I didn't check in detail which compiler is used by this check, but in
the Jenkins config it says that it uses the console log (see URL in the
next sentence).
If I look at the console output of the last build
(http://www.karssen.org/jenkins/job/OmicABELnoMM/18/console) I see the
same warnings pop up. For example:
g++ -DHAVE_CONFIG_H -I. -I./src -Wall -fopenmp -g -O2 -MT
src/Algorithm.o -MD -MP -MF $depbase.Tpo -c -o src/Algorithm.o
src/Algorithm.cpp &&\
mv -f $depbase.Tpo $depbase.Po
src/AIOwrapper.cpp: In static member function ‘static void*
AIOwrapper::async_io(void*)’:
src/AIOwrapper.cpp:227:82: warning: ignoring return value of ‘size_t
fread(void*, size_t, size_t, FILE*)’, declared with attribute
warn_unused_result [-Wunused-result]
fread (tobeFilled->buff, sizeof(type_precision),
size_buff, fp_Y);
So I'm not sure if there is a problem with the "Gnu Make + ..." check.
What the Jenkins build does is the following (Jenkins runs on an Ubuntu
13.10 machine, so look there for the exact package versions of automake,
gcc, etc.):
- Check SVN every 15 minutes for changes
- If there are changes, run the following:
- Remove files not in SVN (e.g. Makefile.in and .o files from previous
builds)
- Count lines of code (sloccount) and run cppcheck:
sloccount --duplicates --wide --details src/ | grep -vP
".svn|cppcheck-result.xml|sloccount.sc" > sloccount.sc
cppcheck --quiet --enable=all --xml src/ 2> cppcheck-result.xml
- Run cpplint.py:
#!/bin/bash -x
cpplint.py
--filter=-whitespace/tab,-whitespace/comments,-whitespace/newline,-whitespace/braces,-build/header_guard,-build/include
src/*.{cpp,h} 2> src/cpplint.log
exit 0
- Do the actual build:
autoreconf -i
if [ -f Makefile ]; then
make distclean
fi
./configure --disable-silent-rules LDFLAGS="-L/usr/lib/openblas-base"
make -j2
- Scan for compiler warnings ("Gnu Make + ...").
- Publish cppcheck results
- Publish sloccount results
- Report violations from cpplint.log
Best,
Lennart.
> Is there a way to perhaps change
> https://jenkins.genabel.org/jenkins/job/OmicABELnoMM/ to check using g++
> for more consistent results?
>
> Thank you for the help.
>
> -Alvaro
>
>
> _______________________________________________
> genabel-devel mailing list
> genabel-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel
>
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands
lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
More information about the genabel-devel
mailing list