Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!usc!snorkelwacker!bloom-beacon!bloom-beacon!athena.mit.edu!chekmate From: chekmate@athena.mit.edu (Adam Kao) Newsgroups: comp.sys.hp Subject: Problem using C/Starbase example from Lisp Message-ID: <1990Jan5.224210.26103@athena.mit.edu> Date: 5 Jan 90 22:42:10 GMT Sender: news@athena.mit.edu (News system) Reply-To: chekmate@athena.mit.edu (Adam Kao) Organization: Massachusetts Institute of Technology Lines: 80 Hi, I'm trying to use some C/Starbase code from HP Common Lisp II by way of the foreign function interface. Here's what happens: ------- ;;; HP COMMON LISP II Development Environment Rev A.02.01 02/08/88 ;;; ;;; Copyright (c) Hewlett-Packard Co. 1988. All Rights Reserved. ;;; Copyright (c) Lucid, Inc. 1987. All Rights Reserved. ;;; ;;; RESTRICTED RIGHTS LEGEND ;;; Use, duplication, or disclosure by the Government ;;; is subject to restrictions set forth in ;;; subdivision (b)(3)(ii) of the ;;; Rights in Technical Data and Computer Software ;;; Clause at 52.227-7013. ;;; Hewlett-Packard Company ;;; 3000 Hanover Street, Palo Alto, Ca 94303 > (define-c-function (shadecube "_main") () ) SHADECUBE > (load-foreign-files '("/skipjack/adamk/test/shadecube.o") '("-ldd98721" "-lsb1" "-lsb2" "-lm" "-lc")) ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _ftod. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _dtof. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _itofl. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _fltoi. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _rndfl. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _fmulf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _fdivf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _faddf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _fsubf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _ffadd. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _ffsub. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _ffmul. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _ffdiv. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _afaddf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _afsubf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _afmulf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _afdivf. ;;; Warning: In /lib/libc.a:fpshorts.o/ - redefining foreign-symbol _fcmpf. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _float. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _fix. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _fadd. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _fsub. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _fmul. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _fdiv. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _afadd. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _afsub. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _afmul. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _afdiv. ;;; Warning: In /lib/libc.a:fpsupport.o/ - redefining foreign-symbol _fcmp. ;;; Warning: In /lib/libc.a:ldiv.o/ - redefining foreign-symbol _ldiv. ;;; Warning: In /lib/libc.a:lrem.o/ - redefining foreign-symbol _lrem. ;;; Warning: In /lib/libc.a:uldiv.o/ - redefining foreign-symbol _uldiv. ;;; Warning: The following foreign-symbols are undefined: (asm_strlenfieldwidth) NIL > (shadecube) Starbase error 19: Cannot map frame buffer into user space. Procedure name: gopen File descriptor: 3 Device file name: /dev/crtren Library location: HP98721 driver (115) Process lisp exited abnormally with code 255 -------- As you can see, my lisp process died completely. The file shadecube.c is essentially the example from chapter 13 of the Starbase Tutorial manuals. It runs fine when I compile and run it from the command line. Does anyone know what happened here? Why do I get "error 19"? It seems to be dying on the first call to Starbase. Has anyone successfully run Starbase code from Lisp? Thanks in advance, Adam