OMNeT++/OMNEST Bug Tracker - OMNeT++
View Issue Details
0001032OMNeT++runtime / Cmdenvpublic2018-03-01 11:022018-04-18 13:25
julius.f 
rhornig 
normalminoralways
resolvedfixed 
Linux Debian 8 Jessie3.16.0-5-amd64
 
 
0001032: omnetpp-5.3p3 does not build on debian Jessie
Compilation of the preview 3 of 5.3 does not compile on debian Jessie because some builtin functions can not be found.
Preview 2 worked fine.

cdynamicexpression.cc:385:9: error: use of undeclared identifier '__builtin_add_overflow'
    if (__builtin_add_overflow(a, b, &res))
        ^
cdynamicexpression.cc:397:10: error: use of undeclared identifier '__builtin_mul_overflow'
    if ( __builtin_mul_overflow(a, b, &res))
         ^
cfsm.cc
cnedmathfunction.cc
2 errors generated.
Makefile:100: recipe for target '/mnt/distsim/omnetpp-5.3p3/out/clang-release/src/sim/cdynamicexpression.o' failed
make[2]: *** [/mnt/distsim/omnetpp-5.3p3/out/clang-release/src/sim/cdynamicexpression.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Copying to: /mnt/distsim/omnetpp-5.3p3/bin/scavetool
Makefile:117: recipe for target 'sim' failed
make[1]: *** [sim] Error 2
Makefile:28: recipe for target 'allmodes' failed
make: *** [allmodes] Error 2


[email protected]:distsim/omnetpp-5.3p3 $ clang --version
Debian clang version 3.5.0-10 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix


It looks like the llvm 3.5 toolchain only supports add and mul for short and unsigned:

http://releases.llvm.org/3.5.0/tools/clang/docs/LanguageExtensions.html#builtin-functions [^]

See attached config.log for details.

ubuntu
log config.log (231,558) 2018-03-01 11:02
https://dev.omnetpp.org/bugs/file_download.php?file_id=210&type=bug
Issue History
2018-03-01 11:02julius.fNew Issue
2018-03-01 11:02julius.fFile Added: config.log
2018-03-01 15:22rhornigNote Added: 0001352
2018-03-01 15:22rhornigStatusnew => resolved
2018-03-01 15:22rhornigResolutionopen => fixed
2018-03-01 15:22rhornigAssigned To => rhornig
2018-04-18 13:25userofomnetTag Attached: ubuntu

Notes
(0001352)
rhornig   
2018-03-01 15:22   
Thanks. Indeed. I have added __has_builtin macro to test for the builtin function