Building GHDL on Cygwin

P

Phil Tomson

I managed to get GHDL to build on Cygwin using the following arguments to
the configure script:

../configure --enable-languages=vhdl --enable-nls=no

However when I tried to
elaborate ('ghdl -e') it complained about ld not being able to find libdl.
Since there isn't a libdl on cygwin, I created a dummy libdl.a in
/usr/lib (I suspect this could problems for vhpi extentions, but I don't
really need them at this point anyway). After that I was able to
elaborate and create an .exe. Now I notice that for the hello.vhd example
I get the following:


$ ./hello_world.exe
./hello_world:internal error: process in timeoutHello world!

Hello world!


I'm thinking that that internal error is wrong.




Also, for the adder_tb example, I get:

$ ./adder_tb
./adder_tb./adder_tb:internal error: :error: process in timeoutwait
statement in a sensitized process

Other simpler testbenches that I've created yield the same message.

Has anyone gotten ghdl to build & run successfully under cygwin?
(I built from the ghdl-0.15 sources ).

Phil
 
P

Phil Tomson

FYI: I managed to get a good build under cygwin by making sure that
win32.o is linked instead of pthread.o

Edit the Makefile.in in the gcc/vhdl subdirectory, the secion you want to
change looks like:

ifeq ($(filter-out i%86-pc-mingw32,$(target)),)
GRT_TARGET_OBJS=win32.o clock.o
endif
#added next line!
GRT_TARGET_OBJS=win32.o clock.o
# Fall-back: use a generic implementation based on pthreads.
ifndef GRT_TARGET_OBJS
GRT_TARGET_OBJS=pthread.o times.o
GRT_EXTRA_LIB=-lpthread
endif


Add the line after the #added next line! comment and it should be happy.
Probably another 'ifeq' should be added to the Makefile.in to check for
cygwin.

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top