lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Russel,

I thank you vewrry much for your reply.
I will check the discussion on "nim" and come back with my results as soon as possible.

In deed my controller only supports DKMs which makes some things more complicated often.

Regards
Gregor

Am 08.03.2018 20:12, schrieb Russell Haley:



On Thu, Mar 8, 2018 at 12:17 AM, Gregor Weissenborn <gregor.weissenborn@weissenborn-online.de> wrote:

Hello everyone,

I like to bring Lua 5.3.4 on to an industrial PLC controller which has VxWorks 6.9 as OS.
I downloaded the sources but failed compiling them.

I use an official Windriver Workbench for the development.

First I created a (DKM) project and copied all src files to that.

The following error _VX_CPU I could get rid of by defining LUA_USE_C89:

--->

Build Started in Project 'lua-5.3.4-library':   2011-08-17 10:41:26
Generation of makefiles started.
Generation of makefiles finished (Elapsed Time: 00:00).
Platform: Wind River VxWorks 6.9
Command: make --no-print-directory BUILD_SPEC=ARMARCH7gnu_SMP DEBUG_MODE=1 TRACE=1 clean all
Working Directory: C:/WindRiver/CAS_2.6/lua-5.3.4-library/ARMARCH7gnu_SMP
make: removing targets and objects of C:/WindRiver/CAS_2.6/lua-5.3.4-library/ARMARCH7gnu_SMP
if [ -d "lua-5.3.4-library" ]; then cd "lua-5.3.4-library"; rm -rf Debug; fi
if [ -d "lua-5.3.4-library_partialImage" ]; then cd "lua-5.3.4-library_partialImage"; rm -rf Debug; fi
if [ ! -d "`dirname "lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o"`" ]; then mkdir -p "`dirname "lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o"`"; fi;echo "building lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o"; ccarm -g -t7 -mfpu=vfp -mfloat-abi=softfp -mlong-calls -ansi -fno-zero-initialized-in-bss -Wall -MD -MP -DCPU=_VX_ARMARCH7 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_WRS_VX_SMP -D_WRS_CONFIG_SMP -D_VSB_CONFIG_FILE=\"C:/WindRiver/vxworks-6.9/target/lib_smp/h/config/vsbConfig.h\" -DARMEL -DARMEL  -DARM_USE_VFP -DIP_PORT_VXWORKS=69    -IC:/WindRiver/vxworks-6.9/target/h -IC:/WindRiver/vxworks-6.9/target/h/wrn/coreip -IC:/WindRiver/CAS_2.6/lua-5.3.4   -o "lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o" -c "C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.c"
building lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o
In file included from C:/WindRiver/vxworks-6.9/target/h/types/vxANSI.h:61,
                 from C:/WindRiver/vxworks-6.9/target/h/string.h:36,
                 from C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.c:14:
C:/WindRiver/vxworks-6.9/target/h/types/vxCpu.h:648:2: error: #error _VX_CPU is not defined correctly
In file included from C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.c:14:
C:/WindRiver/vxworks-6.9/target/h/string.h:54: error: expected declaration specifiers or '...' before 'size_t'
C:/WindRiver/vxworks-6.9/target/h/string.h:55: error: expected declaration specifiers or '...' before 'size_t'
C:/WindRiver/vxworks-6.9/target/h/string.h:56: error: expected declaration specifiers or '...' before 'size_t'

<---

But then I get this errors:

--->
Build Started in Project 'lua-5.3.4-library':   2011-08-16 16:31:15
Generation of makefiles started.
Generation of makefiles finished (Elapsed Time: 00:00).
Platform: Wind River VxWorks 6.9
Command: make --no-print-directory BUILD_SPEC=ARMARCH7gnu_SMP DEBUG_MODE=1 TRACE=1 clean all
Working Directory: C:/WindRiver/CAS_2.6/lua-5.3.4-library/ARMARCH7gnu_SMP
make: removing targets and objects of C:/WindRiver/CAS_2.6/lua-5.3.4-library/ARMARCH7gnu_SMP
if [ -d "lua-5.3.4-library" ]; then cd "lua-5.3.4-library"; rm -rf Debug; fi
if [ -d "lua-5.3.4-library_partialImage" ]; then cd "lua-5.3.4-library_partialImage"; rm -rf Debug; fi
if [ ! -d "`dirname "lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o"`" ]; then mkdir -p "`dirname "lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o"`"; fi;echo "building lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o"; ccarm -g -t7 -mfpu=vfp -mfloat-abi=softfp -mlong-calls -ansi -fno-zero-initialized-in-bss -Wall -MD -MP -DCPU=_VX_ARMARCH7 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL -D_WRS_VX_SMP -D_WRS_CONFIG_SMP -D_VSB_CONFIG_FILE=\"C:/WindRiver/vxworks-6.9/target/lib_smp/h/config/vsbConfig.h\" -DARMEL -DARMEL  -DARM_USE_VFP -DIP_PORT_VXWORKS=69 -DLUA_USE_C89    -IC:/WindRiver/vxworks-6.9/target/h -IC:/WindRiver/vxworks-6.9/target/h/wrn/coreip -IC:/WindRiver/CAS_2.6/lua-5.3.4   -o "lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o" -c "C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.c"
building lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o
In file included from C:/WindRiver/vxworks-6.9/target/h/signal.h:102,
                 from C:/WindRiver/CAS_2.6/lua-5.3.4/lstate.h:41,
                 from C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.h:12,
                 from C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.c:18:
C:/WindRiver/vxworks-6.9/target/h/sigevent.h:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sigeventInit'
C:/WindRiver/vxworks-6.9/target/h/sigevent.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sigeventNotify'
C:/WindRiver/vxworks-6.9/target/h/sigevent.h:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'sigeventDelete'
In file included from C:/WindRiver/CAS_2.6/lua-5.3.4/lstate.h:41,
                 from C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.h:12,
                 from C:/WindRiver/CAS_2.6/lua-5.3.4/lapi.c:18:
C:/WindRiver/vxworks-6.9/target/h/signal.h:410: error: expected ')' before 'rtpId'
C:/WindRiver/vxworks-6.9/target/h/signal.h:464: error: expected ')' before '__tid'
C:/WindRiver/vxworks-6.9/target/h/signal.h:465: error: expected ')' before 'tid'
C:\WindRiver\utilities-1.0\x86-win32\bin\make.exe: *** [lua-5.3.4-library_partialImage/Debug/Objects/lua-5.3.4-library/Sources/lapi.o] Error 1
Build Failed in Project 'lua-5.3.4-library' (Process Exit Value was 2):   2011-08-16 16:31:16   (Elapsed Time: 00:01)

<---


Maybe someone of you can help me and then we also could add the knowledge of that what we experience during the way to get that runnig to get a general support of Lua on VxWorks. - Good Idea?

Regards
Gregor

Hi, 
 
There seems to be some information here: https://forum.nim-lang.org/t/798/2. Note the third post where the user seemed to find a fix by creating a new define. Also from the same thread:
 
"In VxWorks you can generate two types of artifacts, DKMs and RTPs (a.k.a. VXEs). My changes let me generate a vxe, which is akin to a regular executable."
 
Are you sure you want to generate Lua as a DKM Kernel Module? Perhaps what you want is a VXE? I don't know anything about VXWorks but it makes sense that signal libraries work differently within the kernel as compared to userland. 
 
Good luck, I'd love to know the outcome.
 
Russ