[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Error Compiling fileio3.6 with iverilog-vpi



Hi,

There are two problems here, I have commented inline about them.

On Sun, 2005-10-16 at 05:23 -0400, david@xxxxxxxxxxxxx wrote:
> Hi
>  
> I've set up iverilog on Windows and am tring to add Chris Spear's FileIO
> PLI.
>  
> I've dowloaded fileio3.6 and have installed MinGW but when I run
> iverilog-vpi I get the following errors:
>  
> C:\mingw\bin>iverilog-vpi c:\iverilog\lib\fileio3.6\fileio.c
> info:  C:\MinGW will be used as the MinGW root directory.
> info:  C:\iverilog will be used as the Icarus Verilog root directory.
> gcc -c -o c:\iverilog\lib\fileio3.6\fileio.o -O -IC:\iverilog\include
> c:\iverilo
> g\lib\fileio3.6\fileio.c
> c:/iverilog/lib/fileio3.6/fileio.c:236:1: warning: "SEEK_SET" redefined
> In file included from c:/iverilog/lib/fileio3.6/fileio.c:223:
> C:/MinGW/include/stdio.h:120:1: warning: this is the location of the
> previous de
> finition
> c:/iverilog/lib/fileio3.6/fileio.c:237:1: warning: "SEEK_CUR" redefined
> C:/MinGW/include/stdio.h:124:1: warning: this is the location of the
> previous de
> finition
> c:/iverilog/lib/fileio3.6/fileio.c:238:1: warning: "SEEK_END" redefined
> C:/MinGW/include/stdio.h:128:1: warning: this is the location of the
> previous de
> finition

These don't look like fatal errors, they look like re-definitions of
system things that are supposed to be defined in stdio.h.  You can
probably safely remove the duplicate definitions, as you mention below.
They are used as arguments to fseek() and friends.

> gcc -o c:\iverilog\lib\fileio3.6\fileio.vpi -shared
> -Wl,--enable-auto-image-base
>  c:\iverilog\lib\fileio3.6\fileio.o -LC:\iverilog\lib -lveriuser -lvpi
> c:\iverilog\lib\fileio3.6\fileio.o(.text+0xba9):fileio.c: undefined
> reference to
>  `tf_sizep'
> c:\iverilog\lib\fileio3.6\fileio.o(.text+0xbc2):fileio.c: undefined
> reference to
>  `tf_sizep'

Now, these are more fatal.  Although Icarus' coverage of VPI is fairly
complete. The PLI interface is not. There are a certain number of PLI
shim functions implemented in libveriuser, unfortunately `tf_sizep()' is
not among them.  If you feel adventurous, I am sure Steve would accept
patches to implement this function.  The place to patch is probably in
the libveriuser subdirectory of the distribution.

If you just want to get it to work, you should be able to fake the call
to tf_sizep() if you already know the size of the thing it's refering
to.  

This function returns the value size in bits of the argument number you
pass it.  If the argument is a string, it returns the string length
instead of the number of bits.  The argument number starts at 1 for the
first argument.

>  
> I tried commenting out lines 236-238 of fileio.c but I still got the errors
> in fileio.o.
>  
> I have reinstalled MinGW but it makes no difference.
>  
> I'm sure I've missed out doing something very basic here, but I'd really
> appreciate any advice.
>  
> Cheers
>  
> Dave
> 
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> 
>