On 25/01/11 8:29 PM, Neel Mehta wrote:
> Hi.
>
> 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
>
I saw your post on stackoverflow, too.
The string "compilation error" is output in the routine My_Spawn in
ghdldrv/ghdldrv.adb
grep My_Spawn *
ghdldrv.adb: procedure My_Spawn (Program_Name : String; Args : Argument_List)
ghdldrv.adb: end My_Spawn;
ghdldrv.adb: My_Spawn (Compiler_Path.all, Args (1 .. P + 3));
ghdldrv.adb: My_Spawn (Post_Processor_Path.all, Args (1 .. P + 3));
ghdldrv.adb: My_Spawn (Assembler_Path.all, Args (1 .. P + 3));
ghdldrv.adb: My_Spawn (Linker_Path.all, Args (1 .. P));
ghdldrv.adb: My_Spawn ('.' & Directory_Separator & Base_Name.all,
ghdldrv.adb: My_Spawn ('.' & Directory_Separator & Output_File.all,
You can see it's called to invoked the compiler, the assembler, the linker
and two direct instances for elaborated run of the model. That the model
manually fails with "Permission denied" as well as getting the "compilation
error" says something is failing external to ghdl.
Check your dynamic libraries.
ldd hello_world
linux-gate.so.1 => (0x00d21000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00aa8000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00b9f000)
libgnat-4.3.so.1 => /usr/lib/libgnat-4.3.so.1 (0x00360000)
libz.so.1 => /lib/libz.so.1 (0x00110000)
libcd gcc_s.so.1 => /lib/libgcc_s.so.1 (0x00dbd000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00637000)
/lib/ld-linux.so.2 (0x0022e000)
(on kubuntu 9.10, ghdl-0.28)
The string "Permission denied" is found in several libraries for example
/lib/tls/i686/cmov/libc.so.6
It's worth using ldd on all the libraries you find above. You may find a
library containing "Permission denied" you're dependent on with the wrong
permissions.
The moral of the story is that there are more permissions than just on the
executable.
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss