Jump to content
Форум по продукции MOXA

Ошибка компиляции MOXA NPort Server Real TTY Driver


Recommended Posts

Возникает ошибка компиляции драйвера MOXA NPort Server Real TTY Driver Ver4.0.17 в Debian 10 (виртуальная машина)

 

Хостовая ОС - VMware ESXi 5.5.0

Гостевая ОС - Debian 10 (Buster)

 

Логи:

===============================================================================
Copyright (C) 2002-2020  Moxa Inc.
All Rights Reserved.

MOXA NPort Server Real TTY Driver Ver4.0.17 Installation.
System Information: Kernel 4.19.0-17-amd64; Machine x86_64.
===============================================================================


Building driver...

If you want to use secure communication with target,
you might choose [y] to enable the SSL function.
Note: This function support RealCOM with secure mode only.
Do you want to enable secure function? [y/N].
n
make -C /lib/modules/4.19.0-17-amd64/build M=/home/degtyand/moxa modules
make[1]: вход в каталог «/usr/src/linux-headers-4.19.0-17-amd64»
  CC [M]  /home/degtyand/moxa/npreal2.o
/home/degtyand/moxa/npreal2.c: In function ‘npreal_close’:
/home/degtyand/moxa/npreal2.c:991:20: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  if (info->flags & ASYNC_CLOSING) {
                    ^~~~~~~~~~~~~
                    ASYNC_SAK
/home/degtyand/moxa/npreal2.c:991:20: note: each undeclared identifier is reported only once for each function it appears in
/home/degtyand/moxa/npreal2.c:1007:21: error: ‘ASYNC_NORMAL_ACTIVE’ undeclared (first use in this function); did you mean ‘ASYNC_CALLOUT_ACTIVE’?
  if ( info->flags & ASYNC_NORMAL_ACTIVE )
                     ^~~~~~~~~~~~~~~~~~~
                     ASYNC_CALLOUT_ACTIVE
/home/degtyand/moxa/npreal2.c: In function ‘npreal_hangup’:
/home/degtyand/moxa/npreal2.c:1609:20: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  if (info->flags & ASYNC_CLOSING)
                    ^~~~~~~~~~~~~
                    ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_check_modem_status’:
/home/degtyand/moxa/npreal2.c:1637:22: error: ‘ASYNC_CHECK_CD’ undeclared (first use in this function); did you mean ‘TTY_PORT_CHECK_CD’?
  if ( (info->flags & ASYNC_CHECK_CD) && (is_dcd_changed))
                      ^~~~~~~~~~~~~~
                      TTY_PORT_CHECK_CD
/home/degtyand/moxa/npreal2.c: In function ‘npreal_block_til_ready’:
/home/degtyand/moxa/npreal2.c:1702:22: error: ‘ASYNC_NORMAL_ACTIVE’ undeclared (first use in this function); did you mean ‘ASYNC_CALLOUT_ACTIVE’?
   if ( info->flags & ASYNC_NORMAL_ACTIVE )
                      ^~~~~~~~~~~~~~~~~~~
                      ASYNC_CALLOUT_ACTIVE
/home/degtyand/moxa/npreal2.c:1758:46: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
   if ( tty_hung_up_p(filp) || (info->flags & ASYNC_CLOSING) )
                                              ^~~~~~~~~~~~~
                                              ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_startup’:
/home/degtyand/moxa/npreal2.c:1857:21: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if ( info->flags & ASYNC_INITIALIZED )
                     ^~~~~~~~~~~~~~~~~
                     VM_UNINITIALIZED
/home/degtyand/moxa/npreal2.c: In function ‘npreal_shutdown’:
/home/degtyand/moxa/npreal2.c:2088:23: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if ( !(info->flags & ASYNC_INITIALIZED) )
                       ^~~~~~~~~~~~~~~~~
                       VM_UNINITIALIZED
/home/degtyand/moxa/npreal2.c:2121:19: error: ‘ASYNC_NORMAL_ACTIVE’ undeclared (first use in this function); did you mean ‘ASYNC_CALLOUT_ACTIVE’?
  info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE|ASYNC_INITIALIZED|ASYNC_CLOSING);
                   ^~~~~~~~~~~~~~~~~~~
                   ASYNC_CALLOUT_ACTIVE
/home/degtyand/moxa/npreal2.c:2121:78: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE|ASYNC_INITIALIZED|ASYNC_CLOSING);
                                                                              ^~~~~~~~~~~~~
                                                                              ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_port_init’:
/home/degtyand/moxa/npreal2.c:2530:19: error: ‘ASYNC_CHECK_CD’ undeclared (first use in this function); did you mean ‘TTY_PORT_CHECK_CD’?
   info->flags &= ~ASYNC_CHECK_CD;
                   ^~~~~~~~~~~~~~
                   TTY_PORT_CHECK_CD
/home/degtyand/moxa/npreal2.c: In function ‘npreal_set_serial_info’:
/home/degtyand/moxa/npreal2.c:2901:21: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if ( info->flags & ASYNC_INITIALIZED )
                     ^~~~~~~~~~~~~~~~~
                     VM_UNINITIALIZED
/home/degtyand/moxa/npreal2.c: In function ‘npreal_net_write’:
/home/degtyand/moxa/npreal2.c:3907:20: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  if (info->flags & ASYNC_CLOSING)
                    ^~~~~~~~~~~~~
                    ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_do_session_recovery’:
/home/degtyand/moxa/npreal2.c:4260:20: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if (info->flags & ASYNC_INITIALIZED)
                    ^~~~~~~~~~~~~~~~~
                    VM_UNINITIALIZED
make[4]: *** [/usr/src/linux-headers-4.19.0-17-common/scripts/Makefile.build:315: /home/degtyand/moxa/npreal2.o] Ошибка 1
make[3]: *** [/usr/src/linux-headers-4.19.0-17-common/Makefile:1562: _module_/home/degtyand/moxa] Ошибка 2
make[2]: *** [Makefile:146: sub-make] Ошибка 2
make[1]: *** [Makefile:8: all] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-headers-4.19.0-17-amd64»
make: *** [Makefile:74: module] Ошибка 2
Check Driver...
FAILED !!!

Install Not Completed !

 

Link to comment

Аналогичные ошибки.

 

===============================================================================
Copyright (C) 2002-2019  Moxa Inc.
All Rights Reserved.

MOXA NPort Server Real TTY Driver Ver4.0 Installation.
System Information: Kernel 4.19.0-17-amd64; Machine x86_64.
===============================================================================


Building driver...

If you want to use secure communication with target,
you might choose [y] to enable the SSL function.
Note: This function support RealCOM with secure mode only.
Do you want to enable secure function? [y/N].
n
make -C /lib/modules/4.19.0-17-amd64/build M=/home/degtyand/moxa modules
make[1]: вход в каталог «/usr/src/linux-headers-4.19.0-17-amd64»
  CC [M]  /home/degtyand/moxa/npreal2.o
/home/degtyand/moxa/npreal2.c: In function ‘npreal_close’:
/home/degtyand/moxa/npreal2.c:987:20: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  if (info->flags & ASYNC_CLOSING) {
                    ^~~~~~~~~~~~~
                    ASYNC_SAK
/home/degtyand/moxa/npreal2.c:987:20: note: each undeclared identifier is reported only once for each function it appears in
/home/degtyand/moxa/npreal2.c:1003:21: error: ‘ASYNC_NORMAL_ACTIVE’ undeclared (first use in this function); did you mean ‘ASYNC_CALLOUT_ACTIVE’?
  if ( info->flags & ASYNC_NORMAL_ACTIVE )
                     ^~~~~~~~~~~~~~~~~~~
                     ASYNC_CALLOUT_ACTIVE
/home/degtyand/moxa/npreal2.c: In function ‘npreal_hangup’:
/home/degtyand/moxa/npreal2.c:1605:20: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  if (info->flags & ASYNC_CLOSING)
                    ^~~~~~~~~~~~~
                    ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_check_modem_status’:
/home/degtyand/moxa/npreal2.c:1633:22: error: ‘ASYNC_CHECK_CD’ undeclared (first use in this function); did you mean ‘TTY_PORT_CHECK_CD’?
  if ( (info->flags & ASYNC_CHECK_CD) && (is_dcd_changed))
                      ^~~~~~~~~~~~~~
                      TTY_PORT_CHECK_CD
/home/degtyand/moxa/npreal2.c: In function ‘npreal_block_til_ready’:
/home/degtyand/moxa/npreal2.c:1698:22: error: ‘ASYNC_NORMAL_ACTIVE’ undeclared (first use in this function); did you mean ‘ASYNC_CALLOUT_ACTIVE’?
   if ( info->flags & ASYNC_NORMAL_ACTIVE )
                      ^~~~~~~~~~~~~~~~~~~
                      ASYNC_CALLOUT_ACTIVE
/home/degtyand/moxa/npreal2.c:1754:46: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
   if ( tty_hung_up_p(filp) || (info->flags & ASYNC_CLOSING) )
                                              ^~~~~~~~~~~~~
                                              ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_startup’:
/home/degtyand/moxa/npreal2.c:1853:21: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if ( info->flags & ASYNC_INITIALIZED )
                     ^~~~~~~~~~~~~~~~~
                     VM_UNINITIALIZED
/home/degtyand/moxa/npreal2.c: In function ‘npreal_shutdown’:
/home/degtyand/moxa/npreal2.c:2084:23: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if ( !(info->flags & ASYNC_INITIALIZED) )
                       ^~~~~~~~~~~~~~~~~
                       VM_UNINITIALIZED
/home/degtyand/moxa/npreal2.c:2117:19: error: ‘ASYNC_NORMAL_ACTIVE’ undeclared (first use in this function); did you mean ‘ASYNC_CALLOUT_ACTIVE’?
  info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE|ASYNC_INITIALIZED|ASYNC_CLOSING);
                   ^~~~~~~~~~~~~~~~~~~
                   ASYNC_CALLOUT_ACTIVE
/home/degtyand/moxa/npreal2.c:2117:78: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  info->flags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CALLOUT_ACTIVE|ASYNC_INITIALIZED|ASYNC_CLOSING);
                                                                              ^~~~~~~~~~~~~
                                                                              ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_port_init’:
/home/degtyand/moxa/npreal2.c:2526:19: error: ‘ASYNC_CHECK_CD’ undeclared (first use in this function); did you mean ‘TTY_PORT_CHECK_CD’?
   info->flags &= ~ASYNC_CHECK_CD;
                   ^~~~~~~~~~~~~~
                   TTY_PORT_CHECK_CD
/home/degtyand/moxa/npreal2.c: In function ‘npreal_set_serial_info’:
/home/degtyand/moxa/npreal2.c:2897:21: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if ( info->flags & ASYNC_INITIALIZED )
                     ^~~~~~~~~~~~~~~~~
                     VM_UNINITIALIZED
/home/degtyand/moxa/npreal2.c: In function ‘npreal_net_write’:
/home/degtyand/moxa/npreal2.c:3889:20: error: ‘ASYNC_CLOSING’ undeclared (first use in this function); did you mean ‘ASYNC_SAK’?
  if (info->flags & ASYNC_CLOSING)
                    ^~~~~~~~~~~~~
                    ASYNC_SAK
/home/degtyand/moxa/npreal2.c: In function ‘npreal_do_session_recovery’:
/home/degtyand/moxa/npreal2.c:4240:20: error: ‘ASYNC_INITIALIZED’ undeclared (first use in this function); did you mean ‘VM_UNINITIALIZED’?
  if (info->flags & ASYNC_INITIALIZED)
                    ^~~~~~~~~~~~~~~~~
                    VM_UNINITIALIZED
make[4]: *** [/usr/src/linux-headers-4.19.0-17-common/scripts/Makefile.build:315: /home/degtyand/moxa/npreal2.o] Ошибка 1
make[3]: *** [/usr/src/linux-headers-4.19.0-17-common/Makefile:1562: _module_/home/degtyand/moxa] Ошибка 2
make[2]: *** [Makefile:146: sub-make] Ошибка 2
make[1]: *** [Makefile:8: all] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-headers-4.19.0-17-amd64»
make: *** [Makefile:72: module] Ошибка 2
Check Driver...
FAILED !!!

Install Not Completed !
 

Link to comment

1. Для чего (каким образом и зачем) вы применяете NPort?
2. Пробовали ли вы устанавливать драйвер на другие VM?
3. Читали ли вы readme файл (прикреплен) и пробовали ли вы следовать описанным процедурам?

 

README.TXT

Link to comment

1. Есть NPort 5150, подключенный к GPRS-модему. Существует необходимость с сервера дозваниваться до контроллера и получать данные с него. Данная схема успешно работает на Windows 7.

2. На этом же хосте есть другая VM (Debian 10 i686), там возникают те же самые ошибки при компиляции.

3. Да, вроде всё делаю по инструкции.

 

Мне кажется дело именно в том, что Debian находится на виртуальной машине. Есть какие то нюансы при этом?

Link to comment
  • 1 month later...

Такая же проблема.
Физический комп, не виртуалка. Все пакеты обновлены на свежие версии из штатных дебиановских репозиториев.
Debian 10

alex@alex-debian:~$ uname -a
Linux alex-debian 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64 GNU/Linux

Пробовал собрать:

alex@alex-debian:~/Setup$ ls
moxa-real-tty-drivers-for-linux-3.x.x-driver-v3.0.tgz
moxa-real-tty-drivers-for-linux-4.x.x-driver-v4.0.tgz
moxa-real-tty-drivers-for-linux-5.x.x-driver-v5.0.tgz
npreal2_1.14_build_07062310.tgz
npreal2_1.18.35_build_14081817.tgz
npreal2_1.18.45_build_14112017.tgz
npreal2_1.18.49_build_15041511.tgz
npreal2_1.18.51_build_15051816.tgz
npreal2_1.18.65_build_17062316.tgz
real-tty-drivers-for-linux-4_x_x-driver-v4_0_2.tgz

Не билдится не один.

При попытке собрать moxa-real-tty-drivers-for-linux-4.x.x-driver-v4.0.tgz или real-tty-drivers-for-linux-4_x_x-driver-v4_0_2.tgz выдаются те же ошибки, что и у топикстартера.

Что делать, куда бежать?
 

Link to comment
alex@alex-debian:~/Setup/moxa_4-0-19$ sudo ./mxinst

===============================================================================
Copyright (C) 2002-2020  Moxa Inc.
All Rights Reserved.

MOXA NPort Server Real TTY Driver Ver4.0.19 Installation.
System Information: Kernel 4.19.0-17-amd64; Machine x86_64.
===============================================================================


Building driver...

...
Бла-бла-бла
...

Loading TTY Driver...
Complete.



===============================================================================
Installation process is completed.
The all driver files are installed on /usr/lib/npreal2/driver.
Now you can cd /usr/lib/npreal2/driver and run ./mxaddsvr to add tty port.
===============================================================================

О, собралось!
Спасибо.

Link to comment
  • 1 year later...
  • 7 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...