[GenABEL-dev] jenkins gcc to g++

L.C. Karssen lennart at karssen.org
Tue Feb 18 17:49:49 CET 2014


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
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20140218/42a42a39/attachment.sig>


More information about the genabel-devel mailing list