OpenAADL / ocarina

AADL model processor: mappings to code (C, Ada); Petri Nets; scheduling tools (MAST, Cheddar); WCET; REAL
http://www.openaadl.org
Other
65 stars 29 forks source link

Ocarina generated code not working #278

Closed nikhilakn closed 3 years ago

nikhilakn commented 3 years ago

Our goal is to generate code from the AADL model using OCARINA. The sample code is available here:https://github.com/nikhilakn/AADL-MDSD/tree/master/TrialM and the generated code is available in the "simplesystem_impl" folder. Tried to execute generated C code with "Makefile". But got the error shown below.

8<----------8<----------8<----------8<----------8<----------8<----------8<----

HOST MACHINE and OPERATING SYSTEM: Ubuntu 18.04.5 LTS, 64-bit. COMPILER VERSION GNATLS 7.5.0 gcc (Ubuntu 10.1.0-2ubuntu1~18.04) 10.1.0

Error: set -e; for d in this_process; do make -C $d ; done make[1]: Entering directory '/home/selab/Downloads/OSATE-Current/workspace/TrialM/simplesystem_impl/this_process' make generate-asn1-deployment target-objects compile-c-files compile-cpp-files compile-ada-files compile-po-hi subpgm.o activity.o subprograms.o deployment.o types.o main.o make[2]: Entering directory '/home/selab/Downloads/OSATE-Current/workspace/TrialM/simplesystem_impl/this_process' make[2]: Nothing to be done for 'generate-asn1-deployment'. make[2]: Nothing to be done for 'target-objects'. gcc -c -I. -I"/home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/include" "-I/home/selab/Downloads/OSATE-Current/workspace/TrialM" -DTARGET=linux64 -DPOSIX -m64 -D_POSIX_SOURCE -D_GNU_SOURCE -I'/home/selab/Downloads/OSATE-Current/workspace/TrialM/' '/home/selab/Downloads/OSATE-Current/workspace/TrialM/subpgm.c' -o subpgm.o make[2]: Nothing to be done for 'compile-cpp-files'. make[2]: Nothing to be done for 'compile-ada-files'. for f in po_hi_task.o po_hi_time.o po_hi_utils.o po_hi_protected.o po_hi_monitor.o po_hi_storage.o po_hi_main.o po_hi_lua.o; do \ c_file="basename $f .o.c"; \ c_file_dirname="dirname $f"; \ if [ -n "$c_file_dirname" ]; then \ if [ ! -d $c_file_dirname ]; then mkdir -p $c_file_dirname ; fi ; \ gcc -I. -I"/home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/include" "-I/home/selab/Downloads/OSATE-Current/workspace/TrialM" -DTARGET=linux64 -DPOSIX -m64 -D_POSIX_SOURCE -D_GNU_SOURCE -c -o $f '/home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/src/'$c_file_dirname'/'$c_file || exit 1 ; \ else \ gcc -I. -I"/home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/include" "-I/home/selab/Downloads/OSATE-Current/workspace/TrialM" -DTARGET=linux64 -DPOSIX -m64 -D_POSIX_SOURCE -D_GNU_SOURCE -c -o $f '/home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/src/'$c_file || exit 1 ; \ fi ; \ done /home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/src/./po_hi_task.c:38:10: fatal error: xlocale.h: No such file or directory 38 | #include | ^~~ compilation terminated. /home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/make/Makefile.common:237: recipe for target 'compile-po-hi' failed make[2]: [compile-po-hi] Error 1 make[2]: Leaving directory '/home/selab/Downloads/OSATE-Current/workspace/TrialM/simplesystem_impl/this_process' /home/selab/Downloads/ocarina-2017.1-suite-linux-x86_64-20170204/include/ocarina/runtime/polyorb-hi-c/make/Makefile.common:327: recipe for target 'this_process' failed make[1]: [this_process] Error 2 make[1]: Leaving directory '/home/selab/Downloads/OSATE-Current/workspace/TrialM/simplesystem_impl/this_process' Makefile:10: recipe for target 'all' failed

yoogx commented 3 years ago

It works well, you use an old version of Ocarina and a newer version of glib 1/ Update Ocarina, use ocarina-build repo for an install script 2/ you want also to change your model a) function names should be lower case, not "A" but "a" b) use Native as deployment platform, rather that Linux64