Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » C++ compiler error for Eclipse plugin(the error "The version of GCC does not match the expected version (GCC 5.3.1)" comes when try to compile)
C++ compiler error for Eclipse plugin [message #1741886] Tue, 30 August 2016 12:07 Go to next message
ejabnoo ejabnoo is currently offline ejabnoo ejabnooFriend
Messages: 4
Registered: August 2013
Junior Member
i have recently installed the titan plugin for eclipse and have following issues

**************************************************************
2016-08-30_04:41:17: starting to build helloworld_ttcn_project
**************************************************************
sh -c make dep
Creating dependency file for MyExample.cc
In file included from /usr/local/TTCN3/include/TTCN3.hh:36:0,
from MyExample.hh:19,
from MyExample.cc:11:
/usr/local/TTCN3/include/cversion.h:7:2: error: #error The version of GCC does not match the expected version (GCC 5.3.1)
#error The version of GCC does not match the expected version (GCC 5.3.1)

i tried to find the GCC 5.3.1 but no luck,

i have tried with both gcc 4.3.5 and gcc 5.4.0 but didnt work

kindly help
Re: C++ compiler error for Eclipse plugin [message #1741940 is a reply to message #1741886] Tue, 30 August 2016 17:03 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi ejabnoo,

the gcc version used when compiling Titan has to be the same as the gcc version you want to use when compiling TTCN-3 projects.

So please let me know:
-what operating system you have
-what is the version of the installed gcc (gcc -v)
-what version of Titan you have installed (compiler -v)
-did you install a pre-built version -if yes, what's the name of the downloaded package?- or compiled from source?


BR

Elemer
Re: C++ compiler error for Eclipse plugin [message #1741953 is a reply to message #1741940] Tue, 30 August 2016 18:46 Go to previous messageGo to next message
ejabnoo ejabnoo is currently offline ejabnoo ejabnooFriend
Messages: 4
Registered: August 2013
Junior Member
thanks for the prompt response
i have two gcc versions 4.8 and 5.4
using update alternative i am switching between them but none of them works

before you spend more time to help me can i get a link to gcc 5.3.1 to download and try with that first

thanks

follwoing are the output of the commands which were asked


ejabnoo@ubuntu:~/workspace/helloworld_ttcn_project/src$ compiler -v
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Product number: CRL 113 200/5 R5A
Build date: May 24 2016 12:50:36
Compiled with: GCC 5.3.1

Copyright (c) 2000-2016 Ericsson Telecom AB

ejabnoo@ubuntu:~/workspace/helloworld_ttcn_project/src$ dpkg -l | grep gcc | awk '{print $2}'
gcc
gcc-4.8
gcc-4.8-base:amd64
gcc-5
gcc-5-base:amd64
gcc-6-base:amd64
gir1.2-packagekitglib-1.0
libcaca0:amd64
libgcc-4.8-dev:amd64
libgcc-5-dev:amd64
libgcc1:amd64
libpackagekit-glib2-16:amd64
libunity-action-qt1:amd64
libwebrtc-audio-processing-0:amd64
qtchooser
qtdeclarative5-unity-action-plugin:amd64


ejabnoo@ubuntu:~/workspace/helloworld_ttcn_project/src$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
ejabnoo@ubuntu:~/workspace/helloworld_ttcn_project/src$
ejabnoo@ubuntu:~/workspace/helloworld_ttcn_project/src$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.2' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
ejabnoo@ubuntu:~/workspace/helloworld_ttcn_project/src$
Re: C++ compiler error for Eclipse plugin [message #1741956 is a reply to message #1741953] Tue, 30 August 2016 19:37 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi ejabnoo,

so you have downloaded the Titan binary package built on Ubuntu 16.04
tcn3-5.5.pl0-linux64-gcc5.3-ubuntu16.04.tgz

which was compiled with gcc 5.3.1 which probably was the default for Ubuntu 16.04,
but your gcc is 5.4.0 now, likely due to an upgrade.

As these might not be exactly compatible , Titan complains.

So you either install gcc 5.3.1, or , probably simplest , download the source from https://github.com/eclipse/titan.core and compile it;

please check README.linux for instructions.


I hope this helps.

Best regards
Elemer





Re: C++ compiler error for Eclipse plugin [message #1742072 is a reply to message #1741956] Wed, 31 August 2016 06:44 Go to previous messageGo to next message
ejabnoo ejabnoo is currently offline ejabnoo ejabnooFriend
Messages: 4
Registered: August 2013
Junior Member
thanks for your support,

firstly i couldnt find GCC 5.3.1 any where on the https://gcc.gnu.org/
however i have downloaded 5.3.0, complied it and installed it.

I can compile the ttcn3 code and build the binaries.

thanks again for your support
.
Re: C++ compiler error for Eclipse plugin [message #1742074 is a reply to message #1742072] Wed, 31 August 2016 06:59 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi ejabnoo,

great , good luck then!

Best regards

Elemer

Re: C++ compiler error for Eclipse plugin [message #1742089 is a reply to message #1742074] Wed, 31 August 2016 10:34 Go to previous message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 60
Registered: July 2015
Member
Hi Ejabnoo,

Please note, that it is always the best to compile C++ binaries for your exact platform (including TITAN).
As C++ does not require any binary compatibility, even the smallest difference in the version number of the compilation and execution environment can have strange effects.

Once we had a problem where a titan compiled on "gcc version 4.1.2 20070115 (SUSE Linux)" turned out to be non-compatible with the platform which had "gcc version 4.1.2 20070115 (prerelease) (SUSE Linux)".
In that case for some reason the logmerge utility dropped characters randomly from the output as the binary interfaces did not align perfectly Sad

For this reason we always build for the CD version of operating systems (what gets installed from the official release package without any updates applied) ... or recommend to have a specific build for the given platform
Previous Topic:Titan internal communication
Next Topic:Remote Build Setup
Goto Forum:
  


Current Time: Tue Apr 16 06:16:43 GMT 2024

Powered by FUDForum. Page generated in 0.45557 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top