Compiling socketcan test port fails when using eclipse-titan packages on debian and ubuntu [message #1794528] |
Fri, 31 August 2018 17:29  |
Eclipse User |
|
|
|
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 #1794582 is a reply to message #1794578] |
Mon, 03 September 2018 06:03   |
Eclipse User |
|
|
|
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 06:51] by Moderator
|
|
|
|
|
|
|
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 04:13  |
Eclipse User |
|
|
|
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 07:05] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04874 seconds