I get the following error when building against kernel 2.6.25:
gcc -I/var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0 -I/var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/include -I/var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/include -Wp,-MD,/var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/hp_82341/.hp_82341_read.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.4/include -D__KERNEL__ -Iinclude -include include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -fno-stack-protector -m64 -march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hp_82341_read)" -D"KBUILD_MODNAME=KBUILD_STR(hp_82341)" -c -o /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/hp_82341/hp_82341_read.o /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/hp_82341/hp_82341_read.c (cat /dev/null; echo kernel//var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/agilent_82357a/agilent_82357a.ko;) > /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/agilent_82357a/modules.order /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c: In function ‘one_char’: /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:168:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, buf, strlen(buf)); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:315:3: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("\n *** %s *** Read Error - %s\n", NAME, ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:169:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, "\r", 1); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:315:3: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("\n *** %s *** Read Error - %s\n", NAME, ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c: In function ‘usb_gpib_attach’: /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:168:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, buf, strlen(buf)); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:407:3: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("%s:%s - %s is not a valid usb->gpib adapter.\n", ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:169:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, "\r", 1); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:407:3: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("%s:%s - %s is not a valid usb->gpib adapter.\n", ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:168:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, buf, strlen(buf)); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:445:2: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("Module '%s' has been succesfully configured\n", NAME); ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:169:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, "\r", 1); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:445:2: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("Module '%s' has been succesfully configured\n", NAME); ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c: In function ‘usb_gpib_detach’: /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:168:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, buf, strlen(buf)); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:484:2: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("Module '%s' has been detached\n", NAME); ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:169:16: error: ‘struct tty_driver’ has no member named ‘ops’ tty->driver->ops->write (tty, "\r", 1); \ ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:484:2: note: in expansion of macro ‘TTY_LOG’ TTY_LOG ("Module '%s' has been detached\n", NAME); ^ /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c: In function ‘usb_gpib_interface_clear’: /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.c:583:6: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable] int retval=0; ^ make[6]: *** [scripts/Makefile.build:220: /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib/lpvo_usb_gpib.o] Error 1 make[5]: *** [scripts/Makefile.build:348: /var/tmp/portage/sci-libs/linux-gpib-4.1.0/work/linux-gpib-4.1.0/drivers/gpib/lpvo_usb_gpib] Error 2 make[5]: *** Waiting for unfinished jobs....
The build failure is due to the "struct tty_operations ops" which has been created only with kernel 2.6.26. I am attaching a proposal patch to successfully compile the driver.
Hi Fabio,Thanks for the patch. I committed it to SVN -
Cheers,
-Dave
lpvo patch for struct tty_operations in pre 2.6.26 kernels
View Changes https://sourceforge.net/p/linux-gpib/code/1719/
On Wed, Jan 17, 2018 at 3:27 PM, Fabio Rossi [email protected] wrote:
Related
Bugs: #63