Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu(socketcan test port compiling using debian and ubuntu eclipse-titan packages fails)
Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794528] Fri, 31 August 2018 21:29 Go to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 78
Registered: February 2016
Member
Hello,

Compiling the socketcan test port https://git.eclipse.org/c/titan/titan.TestPorts.SocketCANasp.git/ fails when using eclipse-titan packages on debian testing and ubuntu 18. 04.

When compiling titan myself from repo, the socketcan test port compiles and runs fine.
There seem to be differences in the titan.core installation by cloning and compiling the repository and using the provided packages.

I have compiled the socketcan test port on Ubuntu 18. 04., this fails as following:
$ apt-cache policy eclipse-titan
eclipse-titan:
  Installed: 6.3.1-1build1
  Candidate: 6.3.1-1build1
  Version table:
 *** 6.3.1-1build1 500
        500 http://de.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status


$ compiler -v
warning: Charstring pattern: Environment variable TTCN3_DIR not present. Case-insensitive universal charstring patterns are disabled.

TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Product number: CRL 113 200/6 R3B
Build date: Mar 21 2018 07:43:09
Compiled with: GCC 7.3.0
Using OpenSSL 1.1.0g  2 Nov 2017

Copyright (c) 2000-2017 Ericsson Telecom AB


$ make
/bin/compiler -lL ../src/Bcm.ttcn ../src/Can.ttcn ../src/CanError.ttcn ../src/General_Types.ttcn ../src/Raw.ttcn SocketCAN_BCM_test.ttcn ../src/SocketCAN_PortType.ttcn SocketCAN_RAW_test.ttcn ../src/SocketCAN_Templates.ttcn ../src/SocketCAN_Types.ttcn SocketCANtest.ttcn Isobus.ttcn Isobustest.ttcn IsobusMessageTypes.ttcn Isobus_Templates.ttcn IsobusNMMessageTypes.ttcn IsobusCMMessageTypes.ttcn IsobusVTMessageTypes.ttcn Isotp.ttcn Isotptest.ttcn CAN_matrix_general_types.ttcn CAN_matrix_test.ttcn CAN_matrix.ttcn My_can_matrix.ttcn My_canfd_matrix.ttcn - ../src/Bcm.ttcn ../src/Can.ttcn ../src/CanError.ttcn ../src/General_Types.ttcn ../src/Raw.ttcn SocketCAN_BCM_test.ttcn ../src/SocketCAN_PortType.ttcn SocketCAN_RAW_test.ttcn ../src/SocketCAN_Templates.ttcn ../src/SocketCAN_Types.ttcn SocketCANtest.ttcn Isobus.ttcn Isobustest.ttcn IsobusMessageTypes.ttcn Isobus_Templates.ttcn IsobusNMMessageTypes.ttcn IsobusCMMessageTypes.ttcn IsobusVTMessageTypes.ttcn Isotp.ttcn Isotptest.ttcn CAN_matrix_general_types.ttcn CAN_matrix_test.ttcn CAN_matrix.ttcn My_can_matrix.ttcn My_canfd_matrix.ttcn
make: /bin/compiler: Command not found
Creating dependency file for ../src/SocketCAN_PT.cc
In file included from ../src/SocketCAN_PT.cc:16:0:
../src/SocketCAN_PT.hh:27:10: fatal error: SocketCAN_Types.hh: No such file or directory
 #include "SocketCAN_Types.hh"
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** No rule to make target 'compile', needed by 'Bcm.cc'.  Stop.


ls /bin/compiler
ls: cannot access '/bin/compiler': No such file or directory


Similar errors seem to appear, with debian testing. That's why Marc Kleine-Budde has created this repository:
https://github.com/marckleinebudde/titan.TestPorts.SocketCANasp
I do not have a debian at hand, but when I test the repo from Marc on Ubuntu, it compiles well, but fails when the script is started.

Thus there seem to be even differences between Debian and Ubuntu environment when the eclpse-titan packages are installed. Here the logs when compiling Marc's repository on Ubuntu 18.04:
make
/usr/bin/ttcn3_compiler -L  SocketCANtest.ttcn Bcm.ttcn CANFD_matrix_messages.ttcn CAN_matrix.ttcn CAN_matrix_general_types.ttcn CAN_matrix_messages.ttcn CAN_matrix_signals.ttcn CAN_matrix_templates.ttcn CAN_matrix_test.ttcn Can.ttcn CanError.ttcn General_Types.ttcn Isobus.ttcn IsobusCMMessageTypes.ttcn IsobusMessageTypes.ttcn IsobusNMMessageTypes.ttcn IsobusVTMessageTypes.ttcn Isobus_Templates.ttcn Isobustest.ttcn Isotp.ttcn Isotptest.ttcn J1939.ttcn Raw.ttcn SocketCAN_BCM_test.ttcn SocketCAN_PortType.ttcn SocketCAN_RAW_test.ttcn SocketCAN_Templates.ttcn SocketCAN_Types.ttcn - SocketCANtest.ttcn Bcm.ttcn CANFD_matrix_messages.ttcn CAN_matrix.ttcn CAN_matrix_general_types.ttcn CAN_matrix_messages.ttcn CAN_matrix_signals.ttcn CAN_matrix_templates.ttcn CAN_matrix_test.ttcn Can.ttcn CanError.ttcn General_Types.ttcn Isobus.ttcn IsobusCMMessageTypes.ttcn IsobusMessageTypes.ttcn IsobusNMMessageTypes.ttcn IsobusVTMessageTypes.ttcn Isobus_Templates.ttcn Isobustest.ttcn Isotp.ttcn Isotptest.ttcn J1939.ttcn Raw.ttcn SocketCAN_BCM_test.ttcn SocketCAN_PortType.ttcn SocketCAN_RAW_test.ttcn SocketCAN_Templates.ttcn SocketCAN_Types.ttcn
warning: Charstring pattern: Environment variable TTCN3_DIR not present. Case-insensitive universal charstring patterns are disabled.

Notify: Parsing TTCN-3 module `SocketCANtest.ttcn'...
Notify: Parsing TTCN-3 module `Bcm.ttcn'...
Notify: Parsing TTCN-3 module `CANFD_matrix_messages.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix_general_types.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix_messages.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix_signals.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix_templates.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix_test.ttcn'...
Notify: Parsing TTCN-3 module `Can.ttcn'...
Notify: Parsing TTCN-3 module `CanError.ttcn'...
Notify: Parsing TTCN-3 module `General_Types.ttcn'...
Notify: Parsing TTCN-3 module `Isobus.ttcn'...
Notify: Parsing TTCN-3 module `IsobusCMMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `IsobusMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `IsobusNMMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `IsobusVTMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `Isobus_Templates.ttcn'...
Notify: Parsing TTCN-3 module `Isobustest.ttcn'...
Notify: Parsing TTCN-3 module `Isotp.ttcn'...
Notify: Parsing TTCN-3 module `Isotptest.ttcn'...
Notify: Parsing TTCN-3 module `J1939.ttcn'...
Notify: Parsing TTCN-3 module `Raw.ttcn'...
Notify: Parsing TTCN-3 module `SocketCAN_BCM_test.ttcn'...
Notify: Parsing TTCN-3 module `SocketCAN_PortType.ttcn'...
Notify: Parsing TTCN-3 module `SocketCAN_RAW_test.ttcn'...
Notify: Parsing TTCN-3 module `SocketCAN_Templates.ttcn'...
Notify: Parsing TTCN-3 module `SocketCAN_Types.ttcn'...
Notify: Checking modules...
Notify: Generating code...
Notify: File `Bcm.hh' was generated.
Notify: File `Bcm.cc' was generated.
Notify: File `CANFD_matrix_messages.hh' was generated.
Notify: File `CANFD_matrix_messages.cc' was generated.
Notify: File `CAN_matrix.hh' was generated.
Notify: File `CAN_matrix.cc' was generated.
Notify: File `CAN_matrix_general_types.hh' was generated.
Notify: File `CAN_matrix_general_types.cc' was generated.
Notify: File `CAN_matrix_messages.hh' was generated.
Notify: File `CAN_matrix_messages.cc' was generated.
Notify: File `CAN_matrix_signals.hh' was generated.
Notify: File `CAN_matrix_signals.cc' was generated.
Notify: File `CAN_matrix_templates.hh' was generated.
Notify: File `CAN_matrix_templates.cc' was generated.
Notify: File `CAN_matrix_test.hh' was generated.
Notify: File `CAN_matrix_test.cc' was generated.
Notify: File `Can.hh' was generated.
Notify: File `Can.cc' was generated.
Notify: File `CanError.hh' was generated.
Notify: File `CanError.cc' was generated.
Notify: File `General_Types.hh' was generated.
Notify: File `General_Types.cc' was generated.
Notify: File `Isobus.hh' was generated.
Notify: File `Isobus.cc' was generated.
Notify: File `IsobusCMMessageTypes.hh' was generated.
Notify: File `IsobusCMMessageTypes.cc' was generated.
Notify: File `IsobusMessageTypes.hh' was generated.
Notify: File `IsobusMessageTypes.cc' was generated.
Notify: File `IsobusNMMessageTypes.hh' was generated.
Notify: File `IsobusNMMessageTypes.cc' was generated.
Notify: File `IsobusVTMessageTypes.hh' was generated.
Notify: File `IsobusVTMessageTypes.cc' was generated.
Notify: File `Isobus_Templates.hh' was generated.
Notify: File `Isobus_Templates.cc' was generated.
Notify: File `Isobustest.hh' was generated.
Notify: File `Isobustest.cc' was generated.
Notify: File `Isotp.hh' was generated.
Notify: File `Isotp.cc' was generated.
Notify: File `Isotptest.hh' was generated.
Notify: File `Isotptest.cc' was generated.
Notify: File `J1939.hh' was generated.
Notify: File `J1939.cc' was generated.
Notify: File `Raw.hh' was generated.
Notify: File `Raw.cc' was generated.
Notify: File `SocketCAN_BCM_test.hh' was generated.
Notify: File `SocketCAN_BCM_test.cc' was generated.
Notify: File `SocketCAN_PortType.hh' was generated.
Notify: File `SocketCAN_PortType.cc' was generated.
Notify: File `SocketCAN_RAW_test.hh' was generated.
Notify: File `SocketCAN_RAW_test.cc' was generated.
Notify: File `SocketCAN_Templates.hh' was generated.
Notify: File `SocketCAN_Templates.cc' was generated.
Notify: File `SocketCAN_Types.hh' was generated.
Notify: File `SocketCAN_Types.cc' was generated.
Notify: File `SocketCANtest.hh' was generated.
Notify: File `SocketCANtest.cc' was generated.
Notify: 56 files were updated.
touch compile
Creating dependency file for SocketCAN_Types.cc
Creating dependency file for SocketCAN_Templates.cc
Creating dependency file for SocketCAN_RAW_test.cc
Creating dependency file for SocketCAN_PortType.cc
Creating dependency file for SocketCAN_BCM_test.cc
Creating dependency file for Raw.cc
Creating dependency file for J1939.cc
Creating dependency file for Isotptest.cc
Creating dependency file for Isotp.cc
Creating dependency file for Isobustest.cc
Creating dependency file for Isobus_Templates.cc
Creating dependency file for IsobusVTMessageTypes.cc
Creating dependency file for IsobusNMMessageTypes.cc
Creating dependency file for IsobusMessageTypes.cc
Creating dependency file for IsobusCMMessageTypes.cc
Creating dependency file for Isobus.cc
Creating dependency file for General_Types.cc
Creating dependency file for CanError.cc
Creating dependency file for Can.cc
Creating dependency file for CAN_matrix_test.cc
Creating dependency file for CAN_matrix_templates.cc
Creating dependency file for CAN_matrix_signals.cc
Creating dependency file for CAN_matrix_messages.cc
Creating dependency file for CAN_matrix_general_types.cc
Creating dependency file for CAN_matrix.cc
Creating dependency file for CANFD_matrix_messages.cc
Creating dependency file for Bcm.cc
Creating dependency file for SocketCANtest.cc
Creating dependency file for SocketCAN_PT.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o SocketCANtest.o SocketCANtest.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Bcm.o Bcm.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CANFD_matrix_messages.o CANFD_matrix_messages.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CAN_matrix.o CAN_matrix.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CAN_matrix_general_types.o CAN_matrix_general_types.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CAN_matrix_messages.o CAN_matrix_messages.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CAN_matrix_signals.o CAN_matrix_signals.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CAN_matrix_templates.o CAN_matrix_templates.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CAN_matrix_test.o CAN_matrix_test.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Can.o Can.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o CanError.o CanError.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o General_Types.o General_Types.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Isobus.o Isobus.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o IsobusCMMessageTypes.o IsobusCMMessageTypes.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o IsobusMessageTypes.o IsobusMessageTypes.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o IsobusNMMessageTypes.o IsobusNMMessageTypes.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o IsobusVTMessageTypes.o IsobusVTMessageTypes.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Isobus_Templates.o Isobus_Templates.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Isobustest.o Isobustest.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Isotp.o Isotp.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Isotptest.o Isotptest.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o J1939.o J1939.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o Raw.o Raw.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o SocketCAN_BCM_test.o SocketCAN_BCM_test.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o SocketCAN_PortType.o SocketCAN_PortType.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o SocketCAN_RAW_test.o SocketCAN_RAW_test.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o SocketCAN_Templates.o SocketCAN_Templates.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o SocketCAN_Types.o SocketCAN_Types.cc
g++  -c -DLINUX -DMAKEDEPEND_RUN -I/usr/include -I/usr/include/titan -Wall   -o SocketCAN_PT.o SocketCAN_PT.cc
if g++  -L /usr/lib/titan  -o SocketCANtest SocketCANtest.o Bcm.o CANFD_matrix_messages.o CAN_matrix.o CAN_matrix_general_types.o CAN_matrix_messages.o CAN_matrix_signals.o CAN_matrix_templates.o CAN_matrix_test.o Can.o CanError.o General_Types.o Isobus.o IsobusCMMessageTypes.o IsobusMessageTypes.o IsobusNMMessageTypes.o IsobusVTMessageTypes.o Isobus_Templates.o Isobustest.o Isotp.o Isotptest.o J1939.o Raw.o SocketCAN_BCM_test.o SocketCAN_PortType.o SocketCAN_RAW_test.o SocketCAN_Templates.o SocketCAN_Types.o SocketCAN_PT.o \
-L/usr/lib -lttcn3-parallel \
-L/lib -lcrypto \
-L/usr/lib -lxml2; \
then : ; else /usr/bin/titanver SocketCANtest.o Bcm.o CANFD_matrix_messages.o CAN_matrix.o CAN_matrix_general_types.o CAN_matrix_messages.o CAN_matrix_signals.o CAN_matrix_templates.o CAN_matrix_test.o Can.o CanError.o General_Types.o Isobus.o IsobusCMMessageTypes.o IsobusMessageTypes.o IsobusNMMessageTypes.o IsobusVTMessageTypes.o Isobus_Templates.o Isobustest.o Isotp.o Isotptest.o J1939.o Raw.o SocketCAN_BCM_test.o SocketCAN_PortType.o SocketCAN_RAW_test.o SocketCAN_Templates.o SocketCAN_Types.o SocketCAN_PT.o; exit 1; fi


michael@michael-HP-Compaq-6735s:~/Programming/TTCN/marckleinebudde/titan.TestPorts.SocketCANasp/demo$ ttcn3_start SocketCAN CAN_matrix_test.cfg
ttcn3_start: Starting the test suite
ttcn3_start: cannot find executable SocketCAN


If you have a Debian and Ubuntu at hand, could you please check the eclipse-titan packages and let me know, if this is a package bug, needs changes to the makefile of the socketcan test port or anything else.
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794564 is a reply to message #1794528] Mon, 03 September 2018 06:50 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Michael,


nice to hear back from you .


First things first:


to me it eems that you don't have you environment variables set properly:

"warning: Charstring pattern: Environment variable TTCN3_DIR not present. "

That should be done regardless how you install your Titan; maybe it could be done automatically in case of a Debian installation; we will look into it.

However , until then please follow

4.1. Environment Variables

of the Installation Guide.

Environment variable TTCN3_DIR is central and cannot be skipped.


Please let me know if it helps. In the afternoon I will check my assumption on Ubuntu, at the moment I don't have access.


BR

Elemer
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794571 is a reply to message #1794564] Mon, 03 September 2018 08:29 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 78
Registered: February 2016
Member
When I set the environment variables in Ubuntu 18. 04 in .bashrc as following :
export TTCN3_DIR=/usr
export PATH=$TTCN3_DIR/bin/:${PATH}
export LD_LIBRARY_PATH=$TTCN3_DIR/lib:${LD_LIBRARY_PATH}
export MANPATH=$TTCN3_DIR/man:${MANPATH}


I get the following errors and warnings:

michael@michael-HP-Compaq-6735s:~/Programming/TTCN/josemic/titan.TestPorts.SocketCANasp/demo$ make
/usr/bin/compiler -lL ../src/Bcm.ttcn ../src/Can.ttcn ../src/CanError.ttcn ../src/General_Types.ttcn ../src/Raw.ttcn SocketCAN_BCM_test.ttcn ../src/SocketCAN_PortType.ttcn SocketCAN_RAW_test.ttcn ../src/SocketCAN_Templates.ttcn ../src/SocketCAN_Types.ttcn SocketCANtest.ttcn Isobus.ttcn Isobustest.ttcn IsobusMessageTypes.ttcn Isobus_Templates.ttcn IsobusNMMessageTypes.ttcn IsobusCMMessageTypes.ttcn IsobusVTMessageTypes.ttcn Isotp.ttcn Isotptest.ttcn CAN_matrix_general_types.ttcn CAN_matrix_test.ttcn CAN_matrix.ttcn My_can_matrix.ttcn My_canfd_matrix.ttcn - ../src/Bcm.ttcn ../src/Can.ttcn ../src/CanError.ttcn ../src/General_Types.ttcn ../src/Raw.ttcn SocketCAN_BCM_test.ttcn ../src/SocketCAN_PortType.ttcn SocketCAN_RAW_test.ttcn ../src/SocketCAN_Templates.ttcn ../src/SocketCAN_Types.ttcn SocketCANtest.ttcn Isobus.ttcn Isobustest.ttcn IsobusMessageTypes.ttcn Isobus_Templates.ttcn IsobusNMMessageTypes.ttcn IsobusCMMessageTypes.ttcn IsobusVTMessageTypes.ttcn Isotp.ttcn Isotptest.ttcn CAN_matrix_general_types.ttcn CAN_matrix_test.ttcn CAN_matrix.ttcn My_can_matrix.ttcn My_canfd_matrix.ttcn
warning: Charstring pattern: Cannot open file '/usr/etc/CaseFolding.txt' for reading. Case-insensitive universal charstring patterns are disabled.

Notify: Parsing TTCN-3 module `../src/Bcm.ttcn'...
Notify: Parsing TTCN-3 module `../src/Can.ttcn'...
Notify: Parsing TTCN-3 module `../src/CanError.ttcn'...
Notify: Parsing TTCN-3 module `../src/General_Types.ttcn'...
Notify: Parsing TTCN-3 module `../src/Raw.ttcn'...
Notify: Parsing TTCN-3 module `SocketCAN_BCM_test.ttcn'...
Notify: Parsing TTCN-3 module `../src/SocketCAN_PortType.ttcn'...
Notify: Parsing TTCN-3 module `SocketCAN_RAW_test.ttcn'...
Notify: Parsing TTCN-3 module `../src/SocketCAN_Templates.ttcn'...
Notify: Parsing TTCN-3 module `../src/SocketCAN_Types.ttcn'...
Notify: Parsing TTCN-3 module `SocketCANtest.ttcn'...
Notify: Parsing TTCN-3 module `Isobus.ttcn'...
Notify: Parsing TTCN-3 module `Isobustest.ttcn'...
Notify: Parsing TTCN-3 module `IsobusMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `Isobus_Templates.ttcn'...
Notify: Parsing TTCN-3 module `IsobusNMMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `IsobusCMMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `IsobusVTMessageTypes.ttcn'...
Notify: Parsing TTCN-3 module `Isotp.ttcn'...
Notify: Parsing TTCN-3 module `Isotptest.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix_general_types.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix_test.ttcn'...
Notify: Parsing TTCN-3 module `CAN_matrix.ttcn'...
Notify: Parsing TTCN-3 module `My_can_matrix.ttcn'...
Notify: Parsing TTCN-3 module `My_canfd_matrix.ttcn'...
Notify: Checking modules...
Notify: Generating code...
Notify: File `Bcm.hh' was generated.
Notify: File `Bcm.cc' was generated.
Notify: File `CAN_matrix.hh' was generated.
Notify: File `CAN_matrix.cc' was generated.
Notify: File `CAN_matrix_general_types.hh' was generated.
Notify: File `CAN_matrix_general_types.cc' was generated.
Notify: File `CAN_matrix_test.hh' was generated.
Notify: File `CAN_matrix_test.cc' was generated.
Notify: File `Can.hh' was generated.
Notify: File `Can.cc' was generated.
Notify: File `CanError.hh' was generated.
Notify: File `CanError.cc' was generated.
Notify: File `General_Types.hh' was generated.
Notify: File `General_Types.cc' was generated.
Notify: File `Isobus.hh' was generated.
Notify: File `Isobus.cc' was generated.
Notify: File `IsobusCMMessageTypes.hh' was generated.
Notify: File `IsobusCMMessageTypes.cc' was generated.
Notify: File `IsobusMessageTypes.hh' was generated.
Notify: File `IsobusMessageTypes.cc' was generated.
Notify: File `IsobusNMMessageTypes.hh' was generated.
Notify: File `IsobusNMMessageTypes.cc' was generated.
Notify: File `IsobusVTMessageTypes.hh' was generated.
Notify: File `IsobusVTMessageTypes.cc' was generated.
Notify: File `Isobus_Templates.hh' was generated.
Notify: File `Isobus_Templates.cc' was generated.
Notify: File `Isobustest.hh' was generated.
Notify: File `Isobustest.cc' was generated.
Notify: File `Isotp.hh' was generated.
Notify: File `Isotp.cc' was generated.
Notify: File `Isotptest.hh' was generated.
Notify: File `Isotptest.cc' was generated.
Notify: File `My_can_matrix.hh' was generated.
Notify: File `My_can_matrix.cc' was generated.
Notify: File `My_canfd_matrix.hh' was generated.
Notify: File `My_canfd_matrix.cc' was generated.
Notify: File `Raw.hh' was generated.
Notify: File `Raw.cc' was generated.
Notify: File `SocketCAN_BCM_test.hh' was generated.
Notify: File `SocketCAN_BCM_test.cc' was generated.
Notify: File `SocketCAN_PortType.hh' was generated.
Notify: File `SocketCAN_PortType.cc' was generated.
Notify: File `SocketCAN_RAW_test.hh' was generated.
Notify: File `SocketCAN_RAW_test.cc' was generated.
Notify: File `SocketCAN_Templates.hh' was generated.
Notify: File `SocketCAN_Templates.cc' was generated.
Notify: File `SocketCAN_Types.hh' was generated.
Notify: File `SocketCAN_Types.cc' was generated.
Notify: File `SocketCANtest.hh' was generated.
Notify: File `SocketCANtest.cc' was generated.
Notify: 50 files were updated.
touch compile
Creating dependency file for My_canfd_matrix.cc
In file included from Can.hh:20:0,
                 from My_canfd_matrix.hh:20,
                 from My_canfd_matrix.cc:11:
General_Types.hh:22:2: error: #error Version mismatch detected. Please check the version of the TTCN-3 compiler and the base library. Run make clean and rebuild the project if the version of the compiler changed recently.
 #error Version mismatch detected.\
  ^~~~~
In file included from My_canfd_matrix.hh:20:0,
                 from My_canfd_matrix.cc:11:
Can.hh:23:2: error: #error Version mismatch detected. Please check the version of the TTCN-3 compiler and the base library. Run make clean and rebuild the project if the version of the compiler changed recently.
 #error Version mismatch detected.\
  ^~~~~
In file included from My_canfd_matrix.hh:21:0,
                 from My_canfd_matrix.cc:11:
CAN_matrix_general_types.hh:22:2: error: #error Version mismatch detected. Please check the version of the TTCN-3 compiler and the base library. Run make clean and rebuild the project if the version of the compiler changed recently.
 #error Version mismatch detected.\
  ^~~~~
In file included from My_canfd_matrix.cc:11:0:
My_canfd_matrix.hh:24:2: error: #error Version mismatch detected. Please check the version of the TTCN-3 compiler and the base library. Run make clean and rebuild the project if the version of the compiler changed recently.
 #error Version mismatch detected.\
  ^~~~~
Creating dependency file for My_can_matrix.cc
In file included from Can.hh:20:0,
                 from My_can_matrix.hh:20,
                 from My_can_matrix.cc:11:
General_Types.hh:22:2: error: #error Version mismatch detected. Please check the version of the TTCN-3 compiler and the base library. Run make clean and rebuild the project if the version of the compiler changed recently.
 #error Version mismatch detected.\
  ^~~~~
In file included from My_can_matrix.hh:20:0,
                 from My_can_matrix.cc:11:
Can.hh:23:2: error: #error Version mismatch detected. Please check the version of the TTCN-3 compiler and the base library. Run make clean and rebuild the project if the version of the compiler changed recently.
 #error Version mismatch detected.\
...


What means?:
warning: Charstring pattern: Cannot open file '/usr/etc/CaseFolding.txt' for reading. Case-insensitive universal charstring patterns are disabled.


Regards,
Michael
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794572 is a reply to message #1794571] Mon, 03 September 2018 08:30 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 78
Registered: February 2016
Member
Hi Elemer,

one further question. Has Titan been cross-compiled into an embedded Linux distribution?

Michael

[Updated on: Mon, 03 September 2018 08:31]

Report message to a moderator

Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794573 is a reply to message #1794572] Mon, 03 September 2018 08:45 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Michael,

I'm not sure about the warning you have pointed to ;


However please try a 'make clean' as inidicated in:
error: #error Version mismatch detected. Please check the version of the TTCN-3 compiler and the base library. Run make clean and rebuild the project if the version of the compiler changed recently.
 #error Version mismatch detected.



followed by a make.


Also please check this:



https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884303
http://git.osmocom.org/osmo-ttcn3-hacks/tree/regen-makefile.sh



Titan has been compiled on many Linux platforms, including Raspbian on Raspberry, ( not cross-compiled , but directly compiled on a Raspberry board ) , and Hummingboard.

As long as the gcc toolchain ( and possibly the other dependencies of Titan) are supported , there should be no problem.



Best regards
Elemer





Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794576 is a reply to message #1794573] Mon, 03 September 2018 09:16 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 78
Registered: February 2016
Member
Quote:
However please try a 'make clean' as inidicated in:

I did this. Did not help.
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794578 is a reply to message #1794576] Mon, 03 September 2018 09:48 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Michael,

OK,
according to your printout, Titan has been compiled with gcc 7.3.0.

What is the gcc version you are using?


gcc -v should answer this question.

Is it a unique gcc or maybe you have another parallel one installed?

gcc used to compile Titan and gcc used to compile with Titan should be the same.



BR

Elemer






Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794582 is a reply to message #1794578] Mon, 03 September 2018 10:03 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 78
Registered: February 2016
Member
Hi Elemer,

here the output:
michael@michael-HP-Compaq-6735s:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/7/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-16ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --with-as=/usr/bin/x86_64-linux-gnu-as --with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --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 --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3) 


PS: I did not get much further with this:
Quote:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884303
http://git.osmocom.org/osmo-ttcn3-hacks/tree/regen-makefile.sh


I think it is pointing to the wrong Titan version not gcc version:
#include <TTCN3.hh>

#if TTCN3_VERSION != 60301
#error Version mismatch detected.\
 Please check the version of the TTCN-3 compiler and the base library.\
 Run make clean and rebuild the project if the version of the compiler changed recently. TTCN3_VERSION
#endif

[Updated on: Mon, 03 September 2018 10:51]

Report message to a moderator

Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794599 is a reply to message #1794582] Mon, 03 September 2018 14:46 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Michael,


here's what happens:


the Makefile in /demo contains assumptions regarding where Titan libraries, include files etc. are located;
these assumptions are correct for an installation from source, but not for a Debian install.

First you need to add -I/usr/include/titan to your Makefile as below:

# Flags for the C++ preprocessor (and makedepend as well):
CPPFLAGS = -D$(PLATFORM) -I. -I$(TTCN3_DIR)/include -I. -I../src -I/usr/include/titan



also you need to add
# Flags for the linker:
LDFLAGS = -L /usr/lib/titan 


etc. as described in

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884303
http://git.osmocom.org/osmo-ttcn3-hacks/tree/regen-makefile.sh

above mentioned.


Best regards
Elemer
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794611 is a reply to message #1794599] Mon, 03 September 2018 19:10 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 78
Registered: February 2016
Member
Hi Elemer,

then I get the following error:
make
g++  -o SocketCAN Bcm.o Can.o CanError.o General_Types.o Raw.o SocketCAN_BCM_test.o SocketCAN_PortType.o SocketCAN_RAW_test.o SocketCAN_Templates.o SocketCAN_Types.o SocketCANtest.o Isobus.o Isobustest.o IsobusMessageTypes.o Isobus_Templates.o IsobusNMMessageTypes.o IsobusCMMessageTypes.o IsobusVTMessageTypes.o Isotp.o Isotptest.o CAN_matrix_general_types.o CAN_matrix_test.o CAN_matrix.o My_can_matrix.o My_canfd_matrix.o SocketCAN_PT.o \
-L/usr/lib -L/usr/lib -L/usr/lib \
-lttcn3-parallel -lcrypto \
-lxml2  -lpthread -lrt \
|| if [ -f /usr/bin/titanver ]; then /usr/bin/titanver Bcm.o Can.o CanError.o General_Types.o Raw.o SocketCAN_BCM_test.o SocketCAN_PortType.o SocketCAN_RAW_test.o SocketCAN_Templates.o SocketCAN_Types.o SocketCANtest.o Isobus.o Isobustest.o IsobusMessageTypes.o Isobus_Templates.o IsobusNMMessageTypes.o IsobusCMMessageTypes.o IsobusVTMessageTypes.o Isotp.o Isotptest.o CAN_matrix_general_types.o CAN_matrix_test.o CAN_matrix.o My_can_matrix.o My_canfd_matrix.o SocketCAN_PT.o; else : ; fi
/usr/bin/x86_64-linux-gnu-ld: cannot find -lttcn3-parallel
collect2: error: ld returned 1 exit status


From Makefile:
# Execution mode: (either ttcn3 or ttcn3-parallel)
TTCN3_LIB = ttcn3-parallel


Michael
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794620 is a reply to message #1794611] Tue, 04 September 2018 05:08 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Michael,

make sure you have

# Flags for the linker:
LDFLAGS = -L/usr/lib/titan 


added to the Makefile

Also add /usr/lib/titan to LD_LIBRARY_PATH


BR
Elemer
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794628 is a reply to message #1794620] Tue, 04 September 2018 08:01 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 78
Registered: February 2016
Member
Hi Elemer,

with the library path below and above change it works:
export LD_LIBRARY_PATH=$TTCN3_DIR/lib:${LD_LIBRARY_PATH}


Is there a way to have a "generic" Makefile, which works for both the debain / ubuntu eclipse-titan packages and titan.core repositories?

Michael
Re: Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794630 is a reply to message #1794628] Tue, 04 September 2018 08:13 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Michael,

I'm afraid not; both the environment variables and the variables in the Makefile should reflect Titan installation details (paths, directories etc.) which are different
from installation to installation.


What I propose is that you add a Makefile.debian which works for Debian installations , next to the original Makefile which is tailored for a Titan installation from source, and possibly
a few lines in the README to explain the role of different Makefiles.

BR

Elemer




[Updated on: Tue, 04 September 2018 11:05]

Report message to a moderator

Previous Topic:Problems in LibItsBtp_EncdecDeclarations.hh
Next Topic:Titan intermediate release 6.4.1
Goto Forum:
  


Current Time: Sat Sep 22 10:40:59 GMT 2018

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

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

Back to the top