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

Прошу помочь со сборкой Linux драйвера для NPort 5150


Recommended Posts

Версия Linux:

uname -a

Linux linuxhost 2.6.38.6-26.rc1.fc15.i686.PAE #1 SMP Mon May 9 20:36:50 UTC 2011 i686 i686 i386 GNU/Linux

 

Версия драйвера:

npreal2_1.14_build_07062310.tgz

 

Попытка собрать:

mxinst SP1

 

===============================================================================

Copyright © 2002-2007 Moxa Technologies Co., Ltd.

All Rights Reserved.

 

MOXA NPort Server Real TTY Driver V1.14 Installation.

System Imformation: Kernel 2.6.38.6-26.rc1.fc15.i686.PAE; Machine i686.

===============================================================================

 

 

Tar files, please wait ... OK!

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/2.6.38.6-26.rc1.fc15.i686.PAE/build SUBDIRS=/tmp/moxa modules

make[1]: Entering directory `/usr/src/kernels/2.6.38.6-26.rc1.fc15.i686.PAE'

CC [M] /tmp/moxa/npreal2.o

/tmp/moxa/npreal2.c:512:2: warning: initialization from incompatible pointer type [enabled by default]

/tmp/moxa/npreal2.c:512:2: warning: (near initialization for ‘mpvar_ops.put_char’) [enabled by default]

/tmp/moxa/npreal2.c: In function ‘npreal_init_tty’:

/tmp/moxa/npreal2.c:595:5: error: implicit declaration of function ‘init_MUTEX’ [-Werror=implicit-function-declaration]

/tmp/moxa/npreal2.c:599:46: error: ‘proc_root’ undeclared (first use in this function)

/tmp/moxa/npreal2.c:599:46: note: each undeclared identifier is reported only once for each function it appears in

/tmp/moxa/npreal2.c:670:53: warning: operation on ‘tty_node->icount.dsr’ may be undefined [-Wsequence-point]

/tmp/moxa/npreal2.c: In function ‘npreal_init’:

/tmp/moxa/npreal2.c:728:5: error: ‘struct tty_driver’ has no member named ‘open’

/tmp/moxa/npreal2.c:729:5: error: ‘struct tty_driver’ has no member named ‘close’

/tmp/moxa/npreal2.c:730:5: error: ‘struct tty_driver’ has no member named ‘write’

/tmp/moxa/npreal2.c:731:5: error: ‘struct tty_driver’ has no member named ‘put_char’

/tmp/moxa/npreal2.c:732:5: error: ‘struct tty_driver’ has no member named ‘flush_chars’

/tmp/moxa/npreal2.c:733:5: error: ‘struct tty_driver’ has no member named ‘write_room’

/tmp/moxa/npreal2.c:734:5: error: ‘struct tty_driver’ has no member named ‘chars_in_buffer’

/tmp/moxa/npreal2.c:735:5: error: ‘struct tty_driver’ has no member named ‘flush_buffer’

/tmp/moxa/npreal2.c:737:5: error: ‘struct tty_driver’ has no member named ‘ioctl’

/tmp/moxa/npreal2.c:738:5: error: ‘struct tty_driver’ has no member named ‘throttle’

/tmp/moxa/npreal2.c:739:5: error: ‘struct tty_driver’ has no member named ‘unthrottle’

/tmp/moxa/npreal2.c:740:5: error: ‘struct tty_driver’ has no member named ‘set_termios’

/tmp/moxa/npreal2.c:741:5: error: ‘struct tty_driver’ has no member named ‘stop’

/tmp/moxa/npreal2.c:742:5: error: ‘struct tty_driver’ has no member named ‘start’

/tmp/moxa/npreal2.c:743:5: error: ‘struct tty_driver’ has no member named ‘hangup’

/tmp/moxa/npreal2.c:745:5: error: ‘struct tty_driver’ has no member named ‘wait_until_sent’

/tmp/moxa/npreal2.c:747:5: error: ‘struct tty_driver’ has no member named ‘break_ctl’

/tmp/moxa/npreal2.c:794:20: error: ‘struct file_operations’ has no member named ‘ioctl’

/tmp/moxa/npreal2.c: In function ‘npreal_do_softint’:

/tmp/moxa/npreal2.c:861:31: error: request for member ‘write_wakeup’ in something not a structure or union

/tmp/moxa/npreal2.c:862:28: error: request for member ‘write_wakeup’ in something not a structure or union

/tmp/moxa/npreal2.c: In function ‘npreal_open’:

/tmp/moxa/npreal2.c:970:19: warning: assignment makes integer from pointer without a cast [enabled by default]

/tmp/moxa/npreal2.c:971:5: error: implicit declaration of function ‘process_group’ [-Werror=implicit-function-declaration]

/tmp/moxa/npreal2.c: In function ‘npreal_close’:

/tmp/moxa/npreal2.c:1096:20: error: request for member ‘flush_buffer’ in something not a structure or union

/tmp/moxa/npreal2.c:1097:19: error: request for member ‘flush_buffer’ in something not a structure or union

/tmp/moxa/npreal2.c: In function ‘npreal_write’:

/tmp/moxa/npreal2.c:1111:23: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

/tmp/moxa/npreal2.c: In function ‘npreal_flush_buffer’:

/tmp/moxa/npreal2.c:1281:23: error: request for member ‘write_wakeup’ in something not a structure or union

/tmp/moxa/npreal2.c:1282:20: error: request for member ‘write_wakeup’ in something not a structure or union

/tmp/moxa/npreal2.c: In function ‘npreal_ldisc_flush_buffer’:

/tmp/moxa/npreal2.c:1323:23: error: request for member ‘write_wakeup’ in something not a structure or union

/tmp/moxa/npreal2.c:1324:20: error: request for member ‘write_wakeup’ in something not a structure or union

/tmp/moxa/npreal2.c: In function ‘npreal_ioctl’:

/tmp/moxa/npreal2.c:1380:27: error: request for member ‘flush_buffer’ in something not a structure or union

/tmp/moxa/npreal2.c:1381:27: error: request for member ‘flush_buffer’ in something not a structure or union

/tmp/moxa/npreal2.c:1384:27: error: request for member ‘flush_buffer’ in something not a structure or union

/tmp/moxa/npreal2.c:1385:27: error: request for member ‘flush_buffer’ in something not a structure or union

/tmp/moxa/npreal2.c: In function ‘npreal_block_til_ready’:

/tmp/moxa/npreal2.c:1728:32: warning: comparison between pointer and integer [enabled by default]

/tmp/moxa/npreal2.c: In function ‘npreal_flush_to_ldisc’:

/tmp/moxa/npreal2.c:3176:21: error: ‘struct tty_ldisc’ has no member named ‘receive_buf’

/tmp/moxa/npreal2.c: In function ‘npreal_net_read’:

/tmp/moxa/npreal2.c:3867:23: error: request for member ‘write_wakeup’ in something not a structure or union

/tmp/moxa/npreal2.c:3868:20: error: request for member ‘write_wakeup’ in something not a structure or union

cc1: some warnings being treated as errors

 

make[2]: *** [/tmp/moxa/npreal2.o] Error 1

make[1]: *** [_module_/tmp/moxa] Error 2

make[1]: Leaving directory `/usr/src/kernels/2.6.38.6-26.rc1.fc15.i686.PAE'

make: *** [module] Error 2

Check Driver...

FAILED !!!

 

Install Not Completed !

Link to comment
  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

/tmp/moxa/npreal2.c:512:2: warning: initialization from incompatible pointer type [enabled by default]

/tmp/moxa/npreal2.c:512:2: warning: (near initialization for ‘mpvar_ops.put_char’) [enabled by default]

 

Эти ошибки исправил, tty.h прописано put_char должен возвращать int.

Link to comment

/tmp/moxa/npreal2.c:728:5: error: ‘struct tty_driver’ has no member named ‘open’

/tmp/moxa/npreal2.c:729:5: error: ‘struct tty_driver’ has no member named ‘close’

/tmp/moxa/npreal2.c:730:5: error: ‘struct tty_driver’ has no member named ‘write’

/tmp/moxa/npreal2.c:731:5: error: ‘struct tty_driver’ has no member named ‘put_char’

/tmp/moxa/npreal2.c:732:5: error: ‘struct tty_driver’ has no member named ‘flush_chars’

/tmp/moxa/npreal2.c:733:5: error: ‘struct tty_driver’ has no member named ‘write_room’

/tmp/moxa/npreal2.c:734:5: error: ‘struct tty_driver’ has no member named ‘chars_in_buffer’

/tmp/moxa/npreal2.c:735:5: error: ‘struct tty_driver’ has no member named ‘flush_buffer’

/tmp/moxa/npreal2.c:737:5: error: ‘struct tty_driver’ has no member named ‘ioctl’

/tmp/moxa/npreal2.c:738:5: error: ‘struct tty_driver’ has no member named ‘throttle’

/tmp/moxa/npreal2.c:739:5: error: ‘struct tty_driver’ has no member named ‘unthrottle’

/tmp/moxa/npreal2.c:740:5: error: ‘struct tty_driver’ has no member named ‘set_termios’

/tmp/moxa/npreal2.c:741:5: error: ‘struct tty_driver’ has no member named ‘stop’

/tmp/moxa/npreal2.c:742:5: error: ‘struct tty_driver’ has no member named ‘start’

/tmp/moxa/npreal2.c:743:5: error: ‘struct tty_driver’ has no member named ‘hangup’

/tmp/moxa/npreal2.c:745:5: error: ‘struct tty_driver’ has no member named ‘wait_until_sent’

/tmp/moxa/npreal2.c:747:5: error: ‘struct tty_driver’ has no member named ‘break_ctl’

/tmp/moxa/npreal2.c:794:20: error: ‘struct file_operations’ has no member named ‘ioctl’

 

tty_driver.h:

 

struct tty_driver {

<------>int<--->magic;<><------>/* magic number for this structure */

<------>struct kref kref;<----->/* Reference management */

<------>struct cdev cdev;

<------>struct module<->*owner;

<------>const char<---->*driver_name;

<------>const char<---->*name;

<------>int<--->name_base;<---->/* offset of printed name */

<------>int<--->major;<><------>/* major device number */

<------>int<--->minor_start;<-->/* start of minor device number */

<------>int<--->minor_num;<---->/* number of *possible* devices */

<------>int<--->num;<--><------>/* number of devices allocated */

<------>short<->type;<-><------>/* type of tty driver */

<------>short<->subtype;<------>/* subtype of tty driver */

<------>struct ktermios init_termios; /* Initial termios */

<------>int<--->flags;<><------>/* tty driver flags */

<------>struct proc_dir_entry *proc_entry; /* /proc fs entry */

<------>struct tty_driver *other; /* only used for the PTY driver */

 

<------>/*

<------> * Pointer to the tty data structures

<------> */

<------>struct tty_struct **ttys;

<------>struct ktermios **termios;

<------>struct ktermios **termios_locked;

<------>void *driver_state;

 

<------>/*

<------> * Driver methods

<------> */

 

<------>const struct tty_operations *ops;

<------>struct list_head tty_drivers;

};

 

Вынесли const struct tty_operations *ops;.

 

Блин проще более ранний дистриб взять. Вопрос снят. Можно ветку удалить.

Link to comment

Установил на Fedora 8:

 

Linux linuxhost 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:55:12 EDT 2007 i686 i686 i386 GNU/Linux

npreal2_1.14_build_07062310

 

Установка прошла успешно.

Однако ttyr00 нет в /dev/.

 

Сконфигурировал:

 

cat npreal2d.cf

#=========================================================#

# This configuration file is created by Moxa NPort #

# Administrator Program automatically, please do not #

# modify this file by yourself. #

#=========================================================#

ttymajor=33

calloutmajor=38

#[Minor] [serverIP] [data] [cmd] [FIFO] [sSL] [ttyName] [coutName]

0 192.168.250.96 950 966 1 0 ttyr00 cur00

 

Запустил:

 

mxloadsvr 0

mknod -Z system_u:object_r:tty_device_t -m 666 ttyr00 c 33 0

mknod -Z system_u:object_r:tty_device_t -m 666 cur00 c 38 0

Complete.

 

ps -ef|grep npreal2|grep -v grep

root 1959 1 0 10:54 ? 00:00:00 /usr/lib/npreal2/driver/npreal2d -t 1

Как пользовать? Хотел чтобы Perl script опрашивал, так даже minicom не видит:

minicom -p ttyr00

minicom: WARNING: configuration file not found, using defaults

Device /dev/ttyr00 access failed: No such file or directory.

Link to comment

Ой, сорри, ошибся с файлом!

Ловите правильный!

 

 

А ядра из ветки 3.0 поддерживать планируется?

Сейчас, после обновления системы решил поставить драйвер. Не прокатило. Буду пробовать шаманить.

 

Сам спросил, сам отвечу.

Во первых, в Makefile нужно строку

ifeq	"$(findstring 2.6, $(shell uname -a))" "2.6"

Изменить под 3,0.

Честно говоря, не стал это делать, просто удалил все, что относится к 2,4.

 

Во-вторых, нужно собирать gcc не выше 4.4

 

Решение нашел тут.

 

apt-get install gcc-4.4
ln -sf /usr/bin/gcc-4.4 /usr/bin/gcc

и после установки возращаем назад:

ln -sf /usr/bin/gcc-4.6 /usr/bin/gcc

 

Драйвер собрался и работает. Пока подводных камней не вижу.

Link to comment

Добрый день,

 

По поводу ядер 3.0 - да, конечно, поддержка будет достаточно скоро. Вот только пока сроки назвать не можем, к сожалению.

Link to comment
  • 1 year later...

Добрый день,

 

По поводу ядер 3.0 - да, конечно, поддержка будет достаточно скоро. Вот только пока сроки назвать не можем, к сожалению.

 

Давненько не пользовался NPort - другие задачи были. А вот сейчас пришло время с ним поработать... Линукс за это время подрос, не уверен, что в лучшую сторону. Ядро уже 3.8.

И вот с ним опять не собирается драйвер. На машинке, где ядро 3.2 все нормально собирается и работает.

Хочется спросить, как обстоят дела с драйверами в наше быстротекущее время.

Link to comment

Здравствуйте!

 

Попробуйте, пожалуйста, драйвер, который я приложил к сообщению.

 

npreal2_1.18.11_Build_13073017.tgz

Собирается с варнингами, ставится и не работает :(

 

Это, если собирать gcc версии 4.7

А в 4.6 нормально собирается и работает. Спасибо.

Link to comment
  • 6 months later...

Нашел https://launchpad.net/~npreal2 .

Вроде бы все движется к внедрению npreal. Но там пока пакеты под ubuntu 13.10.

Вопрос номер раз - это проект энтузиастов или MOXA имеет к нему отношение?

Вопрос два - как с планами на развитие (вышла очередная LTS версия ubuntu (14.04), хотелось бы на нее перейти).

 

Ну и еще - может, есть посвежее драйверы, чем в сообщении выше (18.11).

Link to comment

Добрый день,

Нет, это не проект Moxa. Наверное, работают энтузиасты :)

Ловите последнюю версию драйвера во вложении - 1.18.25

С развитием - стараемся достаточно оперативно, как можем, делать драйверы для новых ядер Linux.

npreal2_1.18.25_build_14032010.tgz

VERSION.TXT

Link to comment

Добрый день,

Нет, это не проект Moxa. Наверное, работают энтузиасты :)

Ловите последнюю версию драйвера во вложении - 1.18.25

С развитием - стараемся достаточно оперативно, как можем, делать драйверы для новых ядер Linux.

 

Я уже где-то просил выкладывать свежие версии драйвера. Может, хоть в эту ветку будете выкладывать драйвера после обновления, а не после запросов пользователей? Так ведь и вопросов меньше будет и Вам попроще.

Link to comment

 

Я уже где-то просил выкладывать свежие версии драйвера. Может, хоть в эту ветку будете выкладывать драйвера после обновления, а не после запросов пользователей? Так ведь и вопросов меньше будет и Вам попроще.

Да, понимаю.

Проблема в том, что мы сами не получаем оповещения от R&D с Тайваня о выходе новых драйверов. Так что нам самим каждый раз приходится проверять по запросу.

Так что это некий "системный баг", который мы не в силах оперативно поправить :(

Но работаем и надеемся на лучшее!

 

Ещё раз, спасибо за Ваши идеи!

Link to comment
  • 2 weeks later...
[root@localhost moxa]# make
make -C /lib/modules/3.12.19-std-def-alt2/build SUBDIRS=/root/build/moxa modules
make[1]: Вход в каталог `/usr/src/linux-3.12.19-std-def-alt2'
 CC [M]  /root/build/moxa/npreal2.o
/root/build/moxa/npreal2.c: In function ‘tty_buffer_free’:
/root/build/moxa/npreal2.c:3556:17: error: incompatible types when assigning to type ‘struct tty_buffer *’ from type ‘struct llist_head’
/root/build/moxa/npreal2.c:3557:29: error: incompatible types when assigning to type ‘struct llist_head’ from type ‘struct tty_buffer *’
/root/build/moxa/npreal2.c: In function ‘npreal_flush_to_ldisc’:
/root/build/moxa/npreal2.c:3630:9: warning: passing argument 1 of ‘spinlock_check’ from incompatible pointer type [enabled by default]
In file included from include/linux/seqlock.h:35:0,
			 from include/linux/time.h:5,
			 from include/linux/stat.h:18,
			 from include/linux/module.h:10,
			 from /root/build/moxa/npreal2.c:42:
include/linux/spinlock.h:280:31: note: expected ‘struct spinlock_t *’ but argument is of type ‘struct mutex *’
/root/build/moxa/npreal2.c:3663:26: error: ‘struct tty_buffer’ has no member named ‘char_buf_ptr’
/root/build/moxa/npreal2.c:3664:26: error: ‘struct tty_buffer’ has no member named ‘flag_buf_ptr’
/root/build/moxa/npreal2.c:3669:17: warning: passing argument 1 of ‘spin_unlock_irqrestore’ from incompatible pointer type [enabled by default]
In file included from include/linux/seqlock.h:35:0,
			 from include/linux/time.h:5,
			 from include/linux/stat.h:18,
			 from include/linux/module.h:10,
			 from /root/build/moxa/npreal2.c:42:
include/linux/spinlock.h:346:20: note: expected ‘struct spinlock_t *’ but argument is of type ‘struct mutex *’
/root/build/moxa/npreal2.c:3679:17: warning: passing argument 1 of ‘spinlock_check’ from incompatible pointer type [enabled by default]
In file included from include/linux/seqlock.h:35:0,
			 from include/linux/time.h:5,
			 from include/linux/stat.h:18,
			 from include/linux/module.h:10,
			 from /root/build/moxa/npreal2.c:42:
include/linux/spinlock.h:280:31: note: expected ‘struct spinlock_t *’ but argument is of type ‘struct mutex *’
/root/build/moxa/npreal2.c:3691:9: warning: passing argument 1 of ‘spin_unlock_irqrestore’ from incompatible pointer type [enabled by default]
In file included from include/linux/seqlock.h:35:0,
			 from include/linux/time.h:5,
			 from include/linux/stat.h:18,
			 from include/linux/module.h:10,
			 from /root/build/moxa/npreal2.c:42:
include/linux/spinlock.h:346:20: note: expected ‘struct spinlock_t *’ but argument is of type ‘struct mutex *’
/root/build/moxa/npreal2.c: In function ‘npreal_net_open’:
/root/build/moxa/npreal2.c:3811:28: warning: unused variable ‘de’ [-Wunused-variable]
/root/build/moxa/npreal2.c: At top level:
/root/build/moxa/npreal2.c:3768:13: warning: ‘npreal_create_proc_entry’ defined but not used [-Wunused-function]
make[2]: *** [/root/build/moxa/npreal2.o] Ошибка 1
make[1]: *** [_module_/root/build/moxa] Ошибка 2
make[1]: Выход из каталога `/usr/src/linux-3.12.19-std-def-alt2'
make: *** [module] Ошибка 2
[root@localhost moxa]# uname -a
Linux localhost.localdomain 3.12.19-std-def-alt2 #1 SMP Mon May 12 05:46:44 UTC 2014 x86_64 GNU/Linux
[root@localhost moxa]# gcc -v
Using built-in specs.
COLLECT_GCC=x86_64-alt-linux-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alt-linux/4.8/lto-wrapper
Target: x86_64-alt-linux
Configured with: ../configure --host=x86_64-alt-linux --build=x86_64-alt-linux --target=x86_64-alt-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var/lib --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --disable-dependency-tracking --without-included-gettext --enable-shared --enable-bootstrap --program-suffix=-4.8 --with-slibdir=/lib64 --with-bugurl=http://bugzilla.altlinux.org --enable-__cxa_atexit --enable-threads=posix --enable-checking=release --with-system-zlib --without-included-gettext --enable-multilib --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,objc,obj-c++,java,ada,go,lto --enable-plugin --enable-java-awt=gtk --with-native-libdir=/usr/lib64/gcj-4.8 --with-ecj-jar=/usr/share/java/ecj.jar --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-1.5.0.0/jre --enable-libgcj-multifile --disable-libjava-multilib --enable-java-maintainer-mode --with-arch_32=i586 --with-tune_32=generic --with-multilib-list=m64,m32,mx32
Thread model: posix
gcc version 4.8.2 20140120 (ALT Linux 4.8.2-alt3) (GCC)

Link to comment
[root@localhost moxa]# make

make -C /lib/modules/3.12.19-std-def-alt2/build SUBDIRS=/root/build/moxa modules

make[1]: Вход в каталог `/usr/src/linux-3.12.19-std-def-alt2'

CC [M] /root/build/moxa/npreal2.o

Здравствуйте,

Если Вы этим хотели сказать, что существующие драйверы не компиллируются для Linux 3.12.19, то ловите новые драйверы ниже.

Если Вы имели ввиду что-то другое, то прокомментируйте, пожалуйста.

Link to comment

Теперь все замечательно собирается, есть варнинги:

[root@localhost moxa]# make
make -C /lib/modules/3.12.19-std-def-alt2/build SUBDIRS=/root/build/moxa modules
make[1]: Вход в каталог `/usr/src/linux-3.12.19-std-def-alt2'
 CC [M]  /root/build/moxa/npreal2.o
 Building modules, stage 2.
 MODPOST 1 modules
 CC	  /root/build/moxa/npreal2.mod.o
 LD [M]  /root/build/moxa/npreal2.ko
make[1]: Выход из каталога `/usr/src/linux-3.12.19-std-def-alt2'
cp -p npreal2.ko /lib/modules/3.12.19-std-def-alt2/kernel/drivers/char/
depmod -a
cc   -c npreal2d.c
cc npreal2d.o -o npreal2d
strip npreal2d
cc   -c redund_main.c
cc   -c redund.c
cc redund_main.o redund.o -lpthread -o npreal2d_redund
strip npreal2d_redund
cc   -o mxaddsvr mxaddsvr.c
mxaddsvr.c: In function ‘main’:
mxaddsvr.c:562:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&tmpstr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxaddsvr.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
strip mxaddsvr
cc   -o mxdelsvr mxdelsvr.c
mxdelsvr.c: In function ‘main’:
mxdelsvr.c:74:13: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
		 if (getline (&tmpstr, &len, f) < 0)
		 ^
In file included from nport.h:1:0,
			 from mxdelsvr.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
mxdelsvr.c:129:13: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
		 if (getline (&tmpstr, &len, f) < 0)
		 ^
In file included from nport.h:1:0,
			 from mxdelsvr.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
mxdelsvr.c:225:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&tmpstr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxdelsvr.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
strip mxdelsvr
cc   -o mxcfmat mxcfmat.c
mxcfmat.c: In function ‘main’:
mxcfmat.c:44:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&tmpstr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxcfmat.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
strip mxcfmat
cc   -o mxloadsvr mxloadsvr.c
mxloadsvr.c: In function ‘modify_script’:
mxloadsvr.c:149:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&filestr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxloadsvr.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
mxloadsvr.c:162:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&filestr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxloadsvr.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
mxloadsvr.c: In function ‘main’:
mxloadsvr.c:265:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&tmpstr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxloadsvr.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
strip mxloadsvr
cc   -o mxsetsec mxsetsec.c
mxsetsec.c: In function ‘main’:
mxsetsec.c:206:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&tmpstr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxsetsec.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
mxsetsec.c:298:9: warning: passing argument 2 of ‘getline’ from incompatible pointer type [enabled by default]
	 if (getline (&tmpstr, &len, f) < 0)
	 ^
In file included from nport.h:1:0,
			 from mxsetsec.c:1:
/usr/include/stdio.h:678:20: note: expected ‘size_t * __restrict__’ but argument is of type ‘int *’
extern _IO_ssize_t getline (char **__restrict __lineptr,
			    ^
strip mxsetsec

Link to comment

Но при этом работает корректно?

Я уточню у программистов, из-за чего могут возникать Warning.

Link to comment
  • 3 months later...

Добрый день. Пробую последнюю версию драйвера, выложенную в этой ветке.

Ядро 3.13, Ubuntu 14.04.1.

 

 

Copyright © 2002-2014 Moxa Inc.

All Rights Reserved.

 

MOXA NPort Server Real TTY Driver V1.18.27 Installation.

System Imformation: Kernel 3.13.0-24-generic; Machine x86_64.

===============================================================================

 

 

Tar files, please wait ... OK!

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].

y

libssl.so.x.x in /usr/lib/

make -C /lib/modules/3.13.0-24-generic/build SUBDIRS=/moxa modules

make[1]: Вход в каталог `/usr/src/linux-headers-3.13.0-24-generic'

Building modules, stage 2.

MODPOST 1 modules

WARNING: "mcount" [/moxa/npreal2.ko] undefined!

make[1]: Выход из каталога `/usr/src/linux-headers-3.13.0-24-generic'

cp -p npreal2.ko /lib/modules/3.13.0-24-generic/kernel/drivers/char/

depmod -a

cc -c -DSSL_ON -DOPENSSL_NO_KRB5 npreal2d.c -I/moxa/include

cc npreal2d.o -o npreal2d libssl.so

cc: libssl.so: Нет такого файла или каталога

make: *** [sSLnpreal2d] Ошибка 1

Check Driver...

FAILED !!!

 

Install Not Completed !

 

Подскажите, что можно сделать для нормальной установки.

Link to comment

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...