0
votes

I have installed ghdl in Ubuntu 10.10 (using apt-get from the repository) and used the hello_world example available in the ghdl manual. I can analyze (-a) and elaborate (-e) successfully but when I try to run/execute (-r) it, I get the following error:
/usr/lib/ghdl/bin/ghdl: compilation error

To elaborate my problem, I have mentioned the vhdl code at the end and the sequence of commands that I follow below:

$ ghdl -a hello.vhdl
$ ghdl -e hello_world
$ ./hello_world
bash: ./hello_world: Permission denied
$ ghdl -r hello_world
/usr/lib/ghdl/bin/ghdl: compilation error

I have tried working as root too but without success. The permissions are perfect, the execute bit is set. Everything seems to be fine, but still it doesnt work. I have even tried reinstalling the ghdl package.

Can someone please tell me what could be the source of problem?

Thanks in advance.

hello.vhdl (Vhdl code)

-- Hello world program.
use std.textio.all; -- Imports the standard textio package.
-- Defines a design entity, without any ports.
entity hello_world is
end hello_world;
architecture behaviour of hello_world is
begin
process
variable l : line;
begin
write (l, String'("Hello world!"));
writeline (output, l);
wait;
end process;
end behaviour;

3

3 Answers

2
votes

Is your filesystem mounted noexec? What does mount say about the filesystem that your working area is one?

1
votes

I can reproduce the problem if the execute bit is not set.

Are you absolutely sure there is no problem with permissions?

0
votes

Just had the same problem, and my solution which seemed to have fixed everything was to chmod the /usr/local/bin/ghdl folder with 777 mod.