с++ 14

76 views
Skip to first unread message

Сергей Плетнев

unread,
Sep 13, 2018, 11:44:01 AM9/13/18
to UAVCAN
Добрый день! 
Судя по коду для сборки проекта libuavcan валидны с++ 03 и 11.
Какие есть ограничения по работе с с++14?


Pavel Kirienko

unread,
Sep 13, 2018, 12:25:25 PM9/13/18
to pletne...@gmail.com, uav...@googlegroups.com
Hi Sergei,

Libuavcan can be built with any C++ standard from C++98 upwards. The library can automatically detect the version of the standard only up to C++11; if you're using C++14 or C++17, you will need to manually set UAVCAN_CPP_VERSION to UAVCAN_CPP11.


Hope this helps!

Pavel.

P.S. let's stick to English in this group, most subscribers don't speak Russian.

--
You received this message because you are subscribed to the Google Groups "UAVCAN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavcan+un...@googlegroups.com.
To post to this group, send email to uav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/uavcan/2ce7547a-bc80-4c9b-abae-1aa450a00d25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Сергей Плетнев

unread,
Sep 13, 2018, 1:34:41 PM9/13/18
to UAVCAN
Thank You for your response!

I use your advice and build libuavcan with UAVCAN_CPP11. Main project for stm32f1xx and dev tools are msvs + ARM Toolchain + visualGDB. I get 221 errors after building. The most errors allocates in libuavcan files and relates with abscence of deffinition for key values or abscence of include files. 
I use the last release version of library. 

четверг, 13 сентября 2018 г., 19:25:25 UTC+3 пользователь Pavel Kirienko написал:

Pavel Kirienko

unread,
Sep 13, 2018, 2:51:17 PM9/13/18
to pletne...@gmail.com, uav...@googlegroups.com
The section titled "Build is failing because of missing header files" is a good place to start: https://uavcan.org/Implementations/Libuavcan/FAQ/#build-is-failing-because-of-missing-header-files

Let us know please if that doesn't help.

Pavel.

CyberMerln

unread,
Sep 13, 2018, 3:54:55 PM9/13/18
to UAVCAN
You also might what to see this issue on GITHUB: https://github.com/UAVCAN/libuavcan/issues/157

Mike

Сергей Плетнев

unread,
Sep 14, 2018, 4:46:14 AM9/14/18
to UAVCAN
You right!
I forgot about dsdl. While I do not know how make autogeneration dsdl in my dev environment. 
Therefore I solve to check of libuavcan building by means of px cygwin toolchain.
And get error messages at the building:

error.png


The part of code which call exception:
57    types = run_parser(source_dirs, include_dirs + source_dirs)
58    if not types:
59        die('No type definitions were found')
60
61    logger.info('%d types total', len(types))
62    run_generator(types, output_dir)

May be you know the reason of such errors?

четверг, 13 сентября 2018 г., 21:51:17 UTC+3 пользователь Pavel Kirienko написал:

Pavel Kirienko

unread,
Sep 14, 2018, 5:00:11 AM9/14/18
to pletne...@gmail.com, uav...@googlegroups.com
This could be a problem with your build environment. Please run the DSDL compiler with -vvv for extra verbose output and see if there are any sensible messages preceding the exception.

Pavel.

Сергей Плетнев

unread,
Sep 14, 2018, 11:57:04 AM9/14/18
to UAVCAN
I use next command to compile DSDL files:
libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdlc /cygdrive/c/libuavcan/dsdl/uavcan -Oinclude/dsdlc_g -vvv

And I get many raws output of data types compilation details with result: 
83 types total

And next error messages:
Generator failure
Traceback (most recent call last):
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/__init__.py", line 101, in run_generator
    template_expander = make_template_expander(TEMPLATE_FILENAME)
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/__init__.py", line 291, in make_template_expander
    template = Template(template_text)
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py", line 1202, in __init__
    parsetree = p.parse(tmpl)
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py", line 553, in parse
    return self._parse(template)
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py", line 680, in _parse
    self._testexpr(cond.group("iter"), pos_p+cond.start("iter"))
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/pyratemp.py", line 565, in _testexpr
    raise TemplateSyntaxError(err, self._errpos(fpos))
TemplateSyntaxError: line 16, col 17: invalid syntax (, line 1)
Compiler failure
Traceback (most recent call last):
  File "libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdlc", line 61, in <module>
    dsdlc_run(args.source_dir, args.incdir, args.outdir)
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/__init__.py", line 62, in run
    run_generator(types, output_dir)
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/__init__.py", line 111, in run_generator
    die(ex)
  File "/cygdrive/c/libuavcan/libuavcan/dsdl_compiler/libuavcan_dsdl_compiler/__init__.py", line 89, in die
    raise DsdlCompilerException(str(text))
DsdlCompilerException: line 16, col 17: invalid syntax (, line 1)
line 16, col 17: invalid syntax (, line 1)

If you have ideas about this errors I will be glad to listen)



пятница, 14 сентября 2018 г., 12:00:11 UTC+3 пользователь Pavel Kirienko написал:

Pavel Kirienko

unread,
Sep 14, 2018, 12:14:34 PM9/14/18
to pletne...@gmail.com, uav...@googlegroups.com
Okay, now it looks as if your working copy got somehow damaged. Please re-check that it's correct and matches the repository, and post your copy of the file "data_type_template.tmpl" here.

Pavel.

Сергей Плетнев

unread,
Sep 14, 2018, 1:40:25 PM9/14/18
to UAVCAN
I was deleted my copy and cloned libuavcan again, then updated submodule and ran dsdl compiler. This time were no errors.
And next I made success building libuavcan:
[100%] Linking CXX static library libuavcan.a
[100%] Built target uavcan

Thank you for your help! 

пятница, 14 сентября 2018 г., 19:14:34 UTC+3 пользователь Pavel Kirienko написал:
Reply all
Reply to author
Forward
0 new messages