comp.lang.ada
 help / color / mirror / Atom feed
* Simple Producer/Consumer with Annex E
@ 2001-06-19 20:00 Frank
  2001-06-26 20:45 ` Frank
  0 siblings, 1 reply; 17+ messages in thread
From: Frank @ 2001-06-19 20:00 UTC (permalink / raw)


Hi!

I'm trying to create two "main" like procedures, one in each partition.
These two procedures shall communicate with a task in a package placed in a
third partition.
In a third partition I place a package that contains a task (called SERVER).
This server
initialize a buffer variable CURRENT_VALUE to 1000.

One of the procedures (P_SENDER) shall send two values to the server, and
change the CURRENT_VALUE.
The other procedure (P_RECEIVER) shall get the CURRENT_VALUE in the task.
The receiver has a loop that prints the value it get from the server, this
in order to see the progress.
As the code is now, I start the server (executable get the name:
PART_SERVER) first, and then I start the receiver (executable get the name:
PART_RECEIVER). The receiver starts printing 1000...1000...
Then I start the sender (executable get the name: PART_SENDER).

What I experience is that only the first of the values (123) I wish to send
is received at the receiver, and the next value is never passed.

In the configuration file; I have established the P_RECEIVER procedure as
the applications main procedure (which is placed in PART_RECEIVER), then I
have established P_SENDER as a 'Main for partition PART_SENDER.
I have done some experiments with this code, and have a hunch that it is the
sender that for some reason dosn't send the next value.

I wonder if this is caused by the "for PART_SENDER'Main use P_SENDER"
construction, that might not work as a believe?
I believed that the 'Main construction would give me another "main", in the
sense that if I switched the roles of the to (P_RECEIVER and P_SENDER) that
should give me the same functionality. Is this nonsense?

I have also considered the 'Task_Pool setting, but haven't quite succeded in
setting it. Does the compiler use some default values that gives me this
situation?

Does anyone have any suggestions?

(Makefile, P_SENDER, P_RECEIVER and PA_SERVER is added to this posting)

Frank


-----------------------------------------
configuration SENDER_SERVER_RECEIVER is

     PART_RECEIVER : Partition := (P_RECEIVER);
     for PART_RECEIVER'Host use "localhost";
     procedure P_RECEIVER is in PART_RECEIVER;


     PART_SENDER : Partition := (P_SENDER);
     for PART_SENDER'Host use "localhost";
     procedure P_SENDER;
     for PART_SENDER'Main use P_SENDER;

     PART_SERVER : Partition := (PA_SERVER);
     for PART_SERVER'Host use "localhost";

     pragma Starter (None);

end SENDER_SERVER_RECEIVER;
-----------------------------------------
with PA_SERVER;
with TEXT_IO;
procedure P_SENDER is

begin

  PA_SERVER.SEND (123);
  PA_SERVER.SEND (124);

end P_SENDER;
-----------------------------------------
with PA_SERVER;
with TEXT_IO;
procedure P_RECEIVER is
  RECEIVED : INTEGER;

begin
  PA_SERVER.START_SERVER;
  TEXT_IO.PUT_LINE ("Server has been started");
  loop
    PA_SERVER.RECEIVE (RECEIVED);
    TEXT_IO.PUT_LINE ("Received = " & RECEIVED'Img);
  end loop;

end P_RECEIVER;
-----------------------------------------
with TEXT_IO;
package body PA_SERVER is

  task type TYPE_TASK_SERVER is

    entry START_SERVER;

    entry RECEIVE ( P_RECEIVE : out INTEGER);
    entry SEND ( P_SEND : in INTEGER);

  end TYPE_TASK_SERVER;

  task body TYPE_TASK_SERVER is
    RUNNING : BOOLEAN := FALSE;

    CURRENT_VALUE : INTEGER;

  begin

    CURRENT_VALUE := 1000;


    accept START_SERVER do
      RUNNING := TRUE;

    end START_SERVER;

    while RUNNING loop
      select
       accept RECEIVE (P_RECEIVE : out INTEGER) do
          P_RECEIVE := CURRENT_VALUE;

        end RECEIVE;

      or
        accept SEND (P_SEND : in INTEGER) do
          CURRENT_VALUE := P_SEND;

        end SEND;

      end select;


    end loop;

  end TYPE_TASK_SERVER;

  SERVER : TYPE_TASK_SERVER;

  procedure RECEIVE (P_RECEIVE : out INTEGER)
  is
  begin
    SERVER.RECEIVE (P_RECEIVE);

  end RECEIVE;

  procedure SEND (P_SEND : in INTEGER)  is
  begin
    SERVER.SEND (P_SEND);
  end SEND;

  procedure START_SERVER is
  begin
    SERVER.START_SERVER;
  end START_SERVER;

end PA_SERVER;
-------------------------------------
package PA_SERVER is
  pragma Remote_Call_Interface;

  procedure RECEIVE (P_RECEIVE : out INTEGER);


  procedure SEND (P_SEND : in INTEGER);

  procedure START_SERVER;

end PA_SERVER;

-------------------------------------
Makefile
all:
 gnatdist -v sender_server_receiver.cfg `gtkada-config`

clean:
 rm -rf *.o *.ali dsa







^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-06-19 20:00 Simple Producer/Consumer with Annex E Frank
@ 2001-06-26 20:45 ` Frank
  2001-06-27  5:06   ` Wilhelm Spickermann
  0 siblings, 1 reply; 17+ messages in thread
From: Frank @ 2001-06-26 20:45 UTC (permalink / raw)


Hi! (sorry if this is posted many times :-| , problems with attachment of
files)

Mike Nowak and I have had the following e-mails (added to this posting)
regarding my issue Subject: "Simple Producer/Consumer with Annex E" on
19.jun-2001 in this newsgroup.

It seems to us that the files that are added here
works for Mike Nowak and not for me. Nowak has rewritten my example slightly
(as described in the emails), he has not added a Makefile, but use mine as
the source code of the original problem is added to this email also.

He has a RedHat 6.0 and I have RedHat 6.2 (versions og gnat's speciefied in
emails)
Could anyone try this source code on other configurations of Ada?
(Unless you see the problem of course :-)

Frank

-----------------------------------
Mail 1:(Mike Nowaks first mail)
>Hi!
>
>I'm trying to create two "main" like procedures, one in each partition.
>These two procedures shall communicate with a task in a package placed in a
>third partition.
>In a third partition I place a package that contains a task (called
SERVER).
>This server
>initialize a buffer variable CURRENT_VALUE to 1000.

Sorry for long lack of response, but I have exam session, work, lab
projects.
I hope you solved this problem, but if no, maybe this can be some help.
I'm also totally new to Ada (just two projects), but during vacation I want
to seriously get into it.

I compiled your sources and all went OK. I removed option 'gtkada-option'
from Makefile, because I don't have GtkAda installed (does this really
come from GtkAda?). Receiver is dropping fast all messages, so all I saw
was (1000...1000....1000...124...124...124). I put delays into Sender and
Receiver and saw 1000...1000...123...123...124...124...and so on.
I'm using gnat 3.12p on RedHat Lnux 6.0
Try with sources from attachment, try remove 'gtkada-option'.
For me tha code look OK, (but as I said, I'n newbie), so I'm wonder
if it will work on your environment. (Sorry, I replaced SEND with PUT
because I got a little confused, lack of sleep maybe)

Good luck

--------------------------
Mike Nowak
mailto: vinnie@inetia.pl
----------------------------------------------------------------------------
-----------------------------

Mail 2: (my response):
Hi!

I'm grateful for your test.
I unzipped your files and took my own Makefile and removed the
gtkada-option.
You are right, the gtkada has nothing to do with the distributed solution,
however, it is my intention to put some GUI on top of my partitions when I
get through
these kind of obstacles :-)

Sadly, your suggestion did not make any difference for me, I still had the
same problem, both with your version and my own.

> I'm using gnat 3.12p on RedHat Lnux 6.0
I'm using
gnat-3.13p-runtime-1-5
gnat-3.13p-1-5
gnat-glade3.13p-1-5
on Red Hat 6.2 (Kernel 2.2.14-5.0 i686)
Have you done some configuration on your Unix that might affect sockets/ipc
or similar?

Do you mind if I add these e-mails to the thread in comp.lang.ada so we can
get reactions from the audience in there?

Frank

----------------------------------------------------------------------------
-----------------------------

Mail 3: (Mike Nowaks second mail).
Welcome back!

>Sadly, your suggestion did not make any difference for me, I still had the
>same problem,
>both with your version and my own.
>I'm using
>gnat-3.13p-runtime-1-5
>gnat-3.13p-1-5
>gnat-glade3.13p-1-5
>on Red Hat 6.2 (Kernel 2.2.14-5.0 i686)
>Have you done some configuration on your Unix that might affect sockets/ipc
>or similar?

Really sorry to hear that. I have no idea what can cause this problem and it
is
now hard for me to solve it, because it worked on my machine...
Lookslike it is not a source code problem. I did no change to my systems'
starting  configuration, it is nearly the same as on install time.
About three month ago I installed MPI library (for concurrent computing,
I had laboratory project in it), and there was a note for RedHat 6.2 users.
There was special instllation proces required and I'm not sure, maybe it
concerned sockets. I cannot find this document now (I deinstalled MPI and
borrow my friend CD with it), but when I get it back, I will check. I hope
your problem will be solved by this time.

>Do you mind if I add these e-mails to the thread in comp.lang.ada so we can
>get
>reactions from the audience in there?

Yes, do it freely. I did not sen answer to group, because of attachment, and
I wasnt's sure if passing attachments is turned on. Today I saw somebody did
it,
so it works. I hope somebody will answer, although, as I remember, no one
passed an aswer to group by today :((. There is lot of professional Ada
programmers there, it is a bit strange, that nobody answered. It wolud be
good,
if somebody test the program on the same configuration as yours.

Good luck!
-Mike
----------------------------------------------------------------------------
-----------------------------

 -------------------------------------
 Makefile
 all:
  gnatdist -v sender_server_receiver.cfg
 clean:
  rm -rf *.o *.ali dsa


--------------------------------------------------------------------------
with PA_SERVER;
with TEXT_IO;
procedure P_RECEIVER is
  RECEIVED : INTEGER;

begin
  PA_SERVER.START_SERVER;
  TEXT_IO.PUT_LINE ("Server has been started");
  loop
    PA_SERVER.RECEIVE (RECEIVED);
    TEXT_IO.PUT_LINE ("Received = " & RECEIVED'Img);
    Delay(0.5);
  end loop;

end P_RECEIVER;
--------------------------------------------------------------------------
with PA_SERVER;
with TEXT_IO;
procedure P_SENDER is

begin

  PA_SERVER.PUT (123);
  Delay(2.0);
  PA_SERVER.PUT (124);

end P_SENDER;
--------------------------------------------------------------------------
with TEXT_IO; use TEXT_IO;
package body PA_SERVER is

  task type TYPE_TASK_SERVER is

    entry START_SERVER;

    entry RECEIVE ( P_RECEIVE : out INTEGER);
    entry PUT ( P_SEND : in INTEGER);

  end TYPE_TASK_SERVER;

  task body TYPE_TASK_SERVER is
    RUNNING : BOOLEAN := FALSE;

    CURRENT_VALUE : INTEGER;

  begin

    CURRENT_VALUE := 1000;


    accept START_SERVER do
      RUNNING := TRUE;

    end START_SERVER;

    while RUNNING loop
      select
       accept RECEIVE (P_RECEIVE : out INTEGER) do
          P_RECEIVE := CURRENT_VALUE;
        end RECEIVE;

      or
        accept PUT (P_SEND : in INTEGER) do
          CURRENT_VALUE := P_SEND;
          Put_Line("Value in task: " & CURRENT_VALUE'Img);
        end PUT;

      end select;


    end loop;

  end TYPE_TASK_SERVER;

  SERVER : TYPE_TASK_SERVER;

  procedure RECEIVE (P_RECEIVE : out INTEGER)
  is
  begin
    SERVER.RECEIVE (P_RECEIVE);

  end RECEIVE;

  procedure PUT (P_SEND : in INTEGER)  is
  begin
    Put_Line("Value in procedure: " & P_SEND'Img);
    SERVER.PUT (P_SEND);
  end PUT;

  procedure START_SERVER is
  begin
    SERVER.START_SERVER;
  end START_SERVER;

end PA_SERVER;
--------------------------------------------------------------------------
package PA_SERVER is
  pragma Remote_Call_Interface;

  procedure RECEIVE (P_RECEIVE : out INTEGER);


  procedure PUT (P_SEND : in INTEGER);

  procedure START_SERVER;

end PA_SERVER;
--------------------------------------------------------------------------
configuration SENDER_SERVER_RECEIVER is

     PART_RECEIVER : Partition := (P_RECEIVER);
     for PART_RECEIVER'Host use "localhost";
     procedure P_RECEIVER is in PART_RECEIVER;


     PART_SENDER : Partition := (P_SENDER);
     for PART_SENDER'Host use "localhost";
     procedure P_SENDER;
     for PART_SENDER'Main use P_SENDER;

     PART_SERVER : Partition := (PA_SERVER);
     for PART_SERVER'Host use "localhost";

     pragma Starter (None);

end SENDER_SERVER_RECEIVER;

-------------
Franks first posting  to comp.lang.ada regarding this issue:


Frank <franjoe@frisurf.no> wrote in message
news:ScOX6.2872$_96.122872@news3.oke.nextra.no...
> Hi!
>
> I'm trying to create two "main" like procedures, one in each partition.
> These two procedures shall communicate with a task in a package placed in
a
> third partition.
> In a third partition I place a package that contains a task (called
SERVER).
> This server
> initialize a buffer variable CURRENT_VALUE to 1000.
>
> One of the procedures (P_SENDER) shall send two values to the server, and
> change the CURRENT_VALUE.
> The other procedure (P_RECEIVER) shall get the CURRENT_VALUE in the task.
> The receiver has a loop that prints the value it get from the server, this
> in order to see the progress.
> As the code is now, I start the server (executable get the name:
> PART_SERVER) first, and then I start the receiver (executable get the
name:
> PART_RECEIVER). The receiver starts printing 1000...1000...
> Then I start the sender (executable get the name: PART_SENDER).
>
> What I experience is that only the first of the values (123) I wish to
send
> is received at the receiver, and the next value is never passed.
>
> In the configuration file; I have established the P_RECEIVER procedure as
> the applications main procedure (which is placed in PART_RECEIVER), then I
> have established P_SENDER as a 'Main for partition PART_SENDER.
> I have done some experiments with this code, and have a hunch that it is
the
> sender that for some reason dosn't send the next value.
>
> I wonder if this is caused by the "for PART_SENDER'Main use P_SENDER"
> construction, that might not work as a believe?
> I believed that the 'Main construction would give me another "main", in
the
> sense that if I switched the roles of the to (P_RECEIVER and P_SENDER)
that
> should give me the same functionality. Is this nonsense?
>
> I have also considered the 'Task_Pool setting, but haven't quite succeded
in
> setting it. Does the compiler use some default values that gives me this
> situation?
>
> Does anyone have any suggestions?
>
> (Makefile, P_SENDER, P_RECEIVER and PA_SERVER is added to this posting)
>
> Frank
>
>
> -----------------------------------------
> configuration SENDER_SERVER_RECEIVER is
>
>      PART_RECEIVER : Partition := (P_RECEIVER);
>      for PART_RECEIVER'Host use "localhost";
>      procedure P_RECEIVER is in PART_RECEIVER;
>
>
>      PART_SENDER : Partition := (P_SENDER);
>      for PART_SENDER'Host use "localhost";
>      procedure P_SENDER;
>      for PART_SENDER'Main use P_SENDER;
>
>      PART_SERVER : Partition := (PA_SERVER);
>      for PART_SERVER'Host use "localhost";
>
>      pragma Starter (None);
>
> end SENDER_SERVER_RECEIVER;
> -----------------------------------------
> with PA_SERVER;
> with TEXT_IO;
> procedure P_SENDER is
>
> begin
>
>   PA_SERVER.SEND (123);
>   PA_SERVER.SEND (124);
>
> end P_SENDER;
> -----------------------------------------
> with PA_SERVER;
> with TEXT_IO;
> procedure P_RECEIVER is
>   RECEIVED : INTEGER;
>
> begin
>   PA_SERVER.START_SERVER;
>   TEXT_IO.PUT_LINE ("Server has been started");
>   loop
>     PA_SERVER.RECEIVE (RECEIVED);
>     TEXT_IO.PUT_LINE ("Received = " & RECEIVED'Img);
>   end loop;
>
> end P_RECEIVER;
> -----------------------------------------
> with TEXT_IO;
> package body PA_SERVER is
>
>   task type TYPE_TASK_SERVER is
>
>     entry START_SERVER;
>
>     entry RECEIVE ( P_RECEIVE : out INTEGER);
>     entry SEND ( P_SEND : in INTEGER);
>
>   end TYPE_TASK_SERVER;
>
>   task body TYPE_TASK_SERVER is
>     RUNNING : BOOLEAN := FALSE;
>
>     CURRENT_VALUE : INTEGER;
>
>   begin
>
>     CURRENT_VALUE := 1000;
>
>
>     accept START_SERVER do
>       RUNNING := TRUE;
>
>     end START_SERVER;
>
>     while RUNNING loop
>       select
>        accept RECEIVE (P_RECEIVE : out INTEGER) do
>           P_RECEIVE := CURRENT_VALUE;
>
>         end RECEIVE;
>
>       or
>         accept SEND (P_SEND : in INTEGER) do
>           CURRENT_VALUE := P_SEND;
>
>         end SEND;
>
>       end select;
>
>
>     end loop;
>
>   end TYPE_TASK_SERVER;
>
>   SERVER : TYPE_TASK_SERVER;
>
>   procedure RECEIVE (P_RECEIVE : out INTEGER)
>   is
>   begin
>     SERVER.RECEIVE (P_RECEIVE);
>
>   end RECEIVE;
>
>   procedure SEND (P_SEND : in INTEGER)  is
>   begin
>     SERVER.SEND (P_SEND);
>   end SEND;
>
>   procedure START_SERVER is
>   begin
>     SERVER.START_SERVER;
>   end START_SERVER;
>
> end PA_SERVER;
> -------------------------------------
> package PA_SERVER is
>   pragma Remote_Call_Interface;
>
>   procedure RECEIVE (P_RECEIVE : out INTEGER);
>
>
>   procedure SEND (P_SEND : in INTEGER);
>
>   procedure START_SERVER;
>
> end PA_SERVER;
>
> -------------------------------------
> Makefile
> all:
>  gnatdist -v sender_server_receiver.cfg `gtkada-config`
>
> clean:
>  rm -rf *.o *.ali dsa
>
>
>
>





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-06-26 20:45 ` Frank
@ 2001-06-27  5:06   ` Wilhelm Spickermann
  2001-06-28  7:07     ` Frank
  0 siblings, 1 reply; 17+ messages in thread
From: Wilhelm Spickermann @ 2001-06-27  5:06 UTC (permalink / raw)
  To: comp.lang.ada

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1357 bytes --]


On 26-Jun-01 Frank wrote:
> Mike Nowak and I have had the following e-mails (added to this posting)
> regarding my issue Subject: "Simple Producer/Consumer with Annex E" on
> 19.jun-2001 in this newsgroup.
> 
> It seems to us that the files that are added here
> works for Mike Nowak and not for me. Nowak has rewritten my example slightly
> (as described in the emails), he has not added a Makefile, but use mine as
> the source code of the original problem is added to this email also.
> 
> He has a RedHat 6.0 and I have RedHat 6.2 (versions og gnat's speciefied in
> emails)
> Could anyone try this source code on other configurations of Ada?
> (Unless you see the problem of course :-)
> 

Hi,
sorry for not answering earlier. I�ve tried the code of your first mail, added 
the delay too and removed the "gtkada"-option too and the problem persisted --
then I put it aside to take a closer look later when I have more time (just
wait until I�m 65 :-)) ). So the situation now is: it doesn�t work (the "124"
doesn�t show up) and I don�t know why.

I�m using SuSE 7.1 (Kernel 2.4.2-suse) and the ALT-packages:
gnat                             Version: 3.13p            Release: 5   
gnat-3.13p-runtime               Version: 1                Release: 5   
gnat-glade                       Version: 3.13p            Release: 5   

Wilhelm




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-06-27  5:06   ` Wilhelm Spickermann
@ 2001-06-28  7:07     ` Frank
  0 siblings, 0 replies; 17+ messages in thread
From: Frank @ 2001-06-28  7:07 UTC (permalink / raw)


Hi!

Thank you for response.

Frank






^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
       [not found] <E15F7Ws-00038J-00@beatrice.spick.nowhdus>
@ 2001-07-03 17:02 ` Michal Nowak
  2001-07-07  9:13   ` Frank
  0 siblings, 1 reply; 17+ messages in thread
From: Michal Nowak @ 2001-07-03 17:02 UTC (permalink / raw)
  To: comp.lang.ada

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 615 bytes --]

>I´m using SuSE 7.1 (Kernel 2.4.2-suse) and the ALT-packages:
>gnat                             Version: 3.13p            Release: 5
>gnat-3.13p-runtime               Version: 1                Release: 5
>gnat-glade                       Version: 3.13p            Release: 5

I was forced to make upgrade to my system, and now I'm running on
RedHat 7.0 (Guinnes). Gnat, and glade however stayed - I use 3.12p.
The problem does not exist on my new system. I wonder - is it
SuSE - RedHat difference or gnat versions difference.

Mike

------------------------
Mike Nowak
mailto: vinnie@inetia.pl




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-03 17:02 ` Michal Nowak
@ 2001-07-07  9:13   ` Frank
  2001-07-10  7:52     ` Frank
  0 siblings, 1 reply; 17+ messages in thread
From: Frank @ 2001-07-07  9:13 UTC (permalink / raw)


Hi!

Michal Nowak was so kind to send me the executables from my code, generated
by the compiler on his installation.

His executables works as I/we expect on my Linux installation also.

One difference that we at the moment notice, is that we have linked the
runtime libraries dynamically so far, meaning that my executables that have
not worked, have been dynamically linked.
Once he shipped the executables we linked it statically and these are the
executable that worked.
(I guess that Nowak have linked dynamically all the time up until these last
executables)
One last check I could do, is to link statically on my installation to see
if something happens.

Any thoughts from anyone?

Frank





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-07  9:13   ` Frank
@ 2001-07-10  7:52     ` Frank
  2001-07-10 12:02       ` Wilhelm Spickermann
  0 siblings, 1 reply; 17+ messages in thread
From: Frank @ 2001-07-10  7:52 UTC (permalink / raw)


Hi!

I have noe sent my executables (generated in the same way as Nowak did-
static linking),
to and Nowak has tested them. The result is that they do not work on his
installation.

Frank





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-10  7:52     ` Frank
@ 2001-07-10 12:02       ` Wilhelm Spickermann
  2001-07-10 15:04         ` Frank
  0 siblings, 1 reply; 17+ messages in thread
From: Wilhelm Spickermann @ 2001-07-10 12:02 UTC (permalink / raw)
  To: comp.lang.ada


On 10-Jul-01 Frank wrote:
> Hi!
> 
> I have noe sent my executables (generated in the same way as Nowak did-
> static linking),
> to and Nowak has tested them. The result is that they do not work on his
> installation.

Ok. So now look at the libraries which were used. For the dynamically linked
version you can do it as shown below (this is for my version under SuSE 7.1
with the present ALT-RPMs and it behaves like your one):

wilhelm@beatrice:~/scratch/cla_glade_problem_2 > ldd part_receiver
        libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x40025000)
        libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x40100000)
        libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40130000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402a0000)
        libc.so.6 => /lib/libc.so.6 (0x402b6000)
        libz.so.1 => /lib/libz.so.1 (0x403c9000)
        libm.so.6 => /lib/libm.so.6 (0x403d8000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
wilhelm@beatrice:~/scratch/cla_glade_problem_2 > ldd part_sender  
        libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x40025000)
        libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x40100000)
        libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40130000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402a0000)
        libc.so.6 => /lib/libc.so.6 (0x402b6000)
        libz.so.1 => /lib/libz.so.1 (0x403c9000)
        libm.so.6 => /lib/libm.so.6 (0x403d8000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
wilhelm@beatrice:~/scratch/cla_glade_problem_2 > ldd part_server
        libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x40025000)
        libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x40100000)
        libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40130000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x402a0000)
        libc.so.6 => /lib/libc.so.6 (0x402b6000)
        libz.so.1 => /lib/libz.so.1 (0x403c9000)
        libm.so.6 => /lib/libm.so.6 (0x403d8000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf /lib/libc.so.6
glibc-2.2-7
wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf /lib/libz.so.1
libz-1.1.3-284
wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf /lib/libm.so.6
glibc-2.2-7
wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf /lib/libpthread.so.0
glibc-2.2-7

Wilhelm








^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-10 12:02       ` Wilhelm Spickermann
@ 2001-07-10 15:04         ` Frank
  2001-07-15 12:45           ` Michal Nowak
  0 siblings, 1 reply; 17+ messages in thread
From: Frank @ 2001-07-10 15:04 UTC (permalink / raw)


Hi!

Done.

Frank

[frank@localhost svar1]$ ldd part_receiver
        libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x4001b000)
        libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x400f6000)
        libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40126000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40296000)
        libc.so.6 => /lib/libc.so.6 (0x402aa000)
        libz.so.1 => /usr/lib/libz.so.1 (0x4039f000)
        libm.so.6 => /lib/libm.so.6 (0x403ae000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[frank@localhost svar1]$ ldd part_sender
        libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x4001b000)
        libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x400f6000)
        libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40126000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40296000)
        libc.so.6 => /lib/libc.so.6 (0x402aa000)
        libz.so.1 => /usr/lib/libz.so.1 (0x4039f000)
        libm.so.6 => /lib/libm.so.6 (0x403ae000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[frank@localhost svar1]$ ldd part_server
        libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x4001b000)
        libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x400f6000)
        libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40126000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x40296000)
        libc.so.6 => /lib/libc.so.6 (0x402aa000)
        libz.so.1 => /usr/lib/libz.so.1 (0x4039f000)
        libm.so.6 => /lib/libm.so.6 (0x403ae000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[frank@localhost svar1]$



Wilhelm Spickermann <Wilhelm.Spickermann@t-online.de> wrote in message
news:mailman.994766713.27331.comp.lang.ada@ada.eu.org...
>
> On 10-Jul-01 Frank wrote:
> > Hi!
> >
> > I have noe sent my executables (generated in the same way as Nowak did-
> > static linking),
> > to and Nowak has tested them. The result is that they do not work on his
> > installation.
>
> Ok. So now look at the libraries which were used. For the dynamically
linked
> version you can do it as shown below (this is for my version under SuSE
7.1
> with the present ALT-RPMs and it behaves like your one):
>
> wilhelm@beatrice:~/scratch/cla_glade_problem_2 > ldd part_receiver
>         libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x40025000)
>         libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x40100000)
>         libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40130000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x402a0000)
>         libc.so.6 => /lib/libc.so.6 (0x402b6000)
>         libz.so.1 => /lib/libz.so.1 (0x403c9000)
>         libm.so.6 => /lib/libm.so.6 (0x403d8000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> wilhelm@beatrice:~/scratch/cla_glade_problem_2 > ldd part_sender
>         libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x40025000)
>         libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x40100000)
>         libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40130000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x402a0000)
>         libc.so.6 => /lib/libc.so.6 (0x402b6000)
>         libz.so.1 => /lib/libz.so.1 (0x403c9000)
>         libm.so.6 => /lib/libm.so.6 (0x403d8000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> wilhelm@beatrice:~/scratch/cla_glade_problem_2 > ldd part_server
>         libgarlic-3.13p.so.1 => /usr/lib/libgarlic-3.13p.so.1 (0x40025000)
>         libgnarl-3.13p.so.1 => /usr/lib/libgnarl-3.13p.so.1 (0x40100000)
>         libgnat-3.13p.so.1 => /usr/lib/libgnat-3.13p.so.1 (0x40130000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x402a0000)
>         libc.so.6 => /lib/libc.so.6 (0x402b6000)
>         libz.so.1 => /lib/libz.so.1 (0x403c9000)
>         libm.so.6 => /lib/libm.so.6 (0x403d8000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf /lib/libc.so.6
> glibc-2.2-7
> wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf /lib/libz.so.1
> libz-1.1.3-284
> wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf /lib/libm.so.6
> glibc-2.2-7
> wilhelm@beatrice:~/scratch/cla_glade_problem_2 > rpm -qf
/lib/libpthread.so.0
> glibc-2.2-7
>
> Wilhelm
>
>
>
>
>





^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
       [not found] <E15JwDj-00077I-00@beatrice.spick.nowhdus>
@ 2001-07-11 17:27 ` Michal Nowak
  0 siblings, 0 replies; 17+ messages in thread
From: Michal Nowak @ 2001-07-11 17:27 UTC (permalink / raw)
  To: comp.lang.ada

>Ok. So now look at the libraries which were used. For the dynamically linked
>version you can do it as shown below (this is for my version under SuSE 7.1
>with the present ALT-RPMs and it behaves like your one):

I did it also. If it may be helpful, here is what I got:

[vinnie@gemini problem]$ ldd part_receiver
        libgarlic-3.12p.so.1 => /usr/lib/libgarlic-3.12p.so.1 (0x40022000)
        libgnarl-3.12p.so.1 => /usr/lib/libgnarl-3.12p.so.1 (0x400f5000)
        libgnat-3.12p.so.1 => /usr/lib/libgnat-3.12p.so.1 (0x40122000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4027a000)
        libc.so.6 => /lib/libc.so.6 (0x40290000)
        libz.so.1 => /usr/lib/libz.so.1 (0x403b5000)
        libm.so.6 => /lib/libm.so.6 (0x403c3000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[vinnie@gemini problem]$ ldd part_server
        libgarlic-3.12p.so.1 => /usr/lib/libgarlic-3.12p.so.1 (0x40022000)
        libgnarl-3.12p.so.1 => /usr/lib/libgnarl-3.12p.so.1 (0x400f5000)
        libgnat-3.12p.so.1 => /usr/lib/libgnat-3.12p.so.1 (0x40122000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4027a000)
        libc.so.6 => /lib/libc.so.6 (0x40290000)
        libz.so.1 => /usr/lib/libz.so.1 (0x403b5000)
        libm.so.6 => /lib/libm.so.6 (0x403c3000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
[vinnie@gemini problem]$ ldd part_sender
        libgarlic-3.12p.so.1 => /usr/lib/libgarlic-3.12p.so.1 (0x40022000)
        libgnarl-3.12p.so.1 => /usr/lib/libgnarl-3.12p.so.1 (0x400f5000)
        libgnat-3.12p.so.1 => /usr/lib/libgnat-3.12p.so.1 (0x40122000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4027a000)
        libc.so.6 => /lib/libc.so.6 (0x40290000)
        libz.so.1 => /usr/lib/libz.so.1 (0x403b5000)
        libm.so.6 => /lib/libm.so.6 (0x403c3000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

- Mike

------------------------
Mike Nowak
mailto: vinnie@inetia.pl



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
       [not found] <200107111927240390.00071225@smtp-po.inetia.pl>
@ 2001-07-11 18:26 ` Wilhelm Spickermann
  0 siblings, 0 replies; 17+ messages in thread
From: Wilhelm Spickermann @ 2001-07-11 18:26 UTC (permalink / raw)
  To: comp.lang.ada

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1402 bytes --]


On 11-Jul-01 Michal Nowak wrote:
>>Ok. So now look at the libraries which were used. For the dynamically linked
>>version you can do it as shown below (this is for my version under SuSE 7.1
>>with the present ALT-RPMs and it behaves like your one):
> 
> I did it also. If it may be helpful, here is what I got:
> 
> [vinnie@gemini problem]$ ldd part_receiver
>         libgarlic-3.12p.so.1 => /usr/lib/libgarlic-3.12p.so.1 (0x40022000)
>         libgnarl-3.12p.so.1 => /usr/lib/libgnarl-3.12p.so.1 (0x400f5000)
>         libgnat-3.12p.so.1 => /usr/lib/libgnat-3.12p.so.1 (0x40122000)
>         libpthread.so.0 => /lib/libpthread.so.0 (0x4027a000)
>         libc.so.6 => /lib/libc.so.6 (0x40290000)
>         libz.so.1 => /usr/lib/libz.so.1 (0x403b5000)
>         libm.so.6 => /lib/libm.so.6 (0x403c3000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

I think this helps as there is no difference in the system libraries between
the working program and the failing one. This seems to be a difference between
GNAT 3.12p and 3.13p. The problem may lie within gnat3.13p, but the problem may
also be in the program. I didn�t see any problem in the program but I didn�t
look very closely. 

I�m sorry, but in the next few weeks I�ll be far away from any computer problem
(canoeing in Sweden) and I have to stop contributing now. Good luck!

Med v�nliga h�lsningar
  Vilhelm




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
       [not found] <E15KOgZ-0001Jc-00@beatrice.spick.nowhdus>
@ 2001-07-11 20:13 ` Michal Nowak
  0 siblings, 0 replies; 17+ messages in thread
From: Michal Nowak @ 2001-07-11 20:13 UTC (permalink / raw)
  To: comp.lang.ada

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 703 bytes --]

>I think this helps as there is no difference in the system libraries between
>the working program and the failing one. This seems to be a difference between
>GNAT 3.12p and 3.13p. The problem may lie within gnat3.13p, but the problem may
>also be in the program. I didn´t see any problem in the program but I didn´t
>look very closely.

I'm planning to install gant 3.13p on this weekend, so this should shed some
light on this problem.


>I´m sorry, but in the next few weeks I´ll be far away from any computer problem
>(canoeing in Sweden) and I have to stop contributing now. Good luck!

Happy vacation!


-Mike

------------------------
Mike Nowak
mailto: vinnie@inetia.pl



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-10 15:04         ` Frank
@ 2001-07-15 12:45           ` Michal Nowak
  2001-07-16 17:26             ` Ted Dennison
  0 siblings, 1 reply; 17+ messages in thread
From: Michal Nowak @ 2001-07-15 12:45 UTC (permalink / raw)
  To: comp.lang.ada

Hi!

I removed from my system gnat and glade 3.12p and
installed gnat 3.13p. Then I built from sources 
glade 3.13p. 

I started your program and it does not work (I mean
it works, but just as on your system). Lookslike it
is gnat 3.13p problem. 

However, I have one doubt. I read in INSTALL file, that
for Linux platform I should use native threads library,
not FSU one. How to get to know which thread library
am I using? Maybe here lies te problem?

-Mike

------------------------
Mike Nowak
mailto: vinnie@inetia.pl



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-15 12:45           ` Michal Nowak
@ 2001-07-16 17:26             ` Ted Dennison
  2001-07-16 21:16               ` David C. Hoos
       [not found]               ` <094701c10e3c$917512c0$453ab4d8@sy.com>
  0 siblings, 2 replies; 17+ messages in thread
From: Ted Dennison @ 2001-07-16 17:26 UTC (permalink / raw)


In article <mailman.995200942.18355.comp.lang.ada@ada.eu.org>, Michal Nowak
says...
>I removed from my system gnat and glade 3.12p and
>installed gnat 3.13p. Then I built from sources 
..
>not FSU one. How to get to know which thread library
>am I using? Maybe here lies te problem?

It depends on where you got Gnat. The ACT binary distribution uses FSU. The ALT
distribution uses native.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-16 17:26             ` Ted Dennison
@ 2001-07-16 21:16               ` David C. Hoos
  2001-07-16 21:41                 ` Ted Dennison
       [not found]               ` <094701c10e3c$917512c0$453ab4d8@sy.com>
  1 sibling, 1 reply; 17+ messages in thread
From: David C. Hoos @ 2001-07-16 21:16 UTC (permalink / raw)
  To: comp.lang.ada


----- Original Message -----
From: "Ted Dennison" <dennison@telepath.com>
Newsgroups: comp.lang.ada
To: <comp.lang.ada@ada.eu.org>
Sent: Monday, July 16, 2001 12:26 PM
Subject: Re: Simple Producer/Consumer with Annex E


> In article <mailman.995200942.18355.comp.lang.ada@ada.eu.org>, Michal
Nowak
> says...
> >I removed from my system gnat and glade 3.12p and
> >installed gnat 3.13p. Then I built from sources
> ..
> >not FSU one. How to get to know which thread library
> >am I using? Maybe here lies te problem?
>
> It depends on where you got Gnat. The ACT binary distribution uses FSU.
The ALT
> distribution uses native.
>
Not exactly true.  The ACT binary distribution uses the FSU by default, but
a simple
switch of two symbolic links will switch it to the native threads.

The readme.tasking file describes this.

> ---
> T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
>           home email - mailto:dennison@telepath.com
> _______________________________________________
> comp.lang.ada mailing list
> comp.lang.ada@ada.eu.org
> http://ada.eu.org/mailman/listinfo/comp.lang.ada
>




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
  2001-07-16 21:16               ` David C. Hoos
@ 2001-07-16 21:41                 ` Ted Dennison
  0 siblings, 0 replies; 17+ messages in thread
From: Ted Dennison @ 2001-07-16 21:41 UTC (permalink / raw)


In article <mailman.995318196.13233.comp.lang.ada@ada.eu.org>, David C. Hoos
says...
>From: "Ted Dennison" <dennison@telepath.com>
>> In article <mailman.995200942.18355.comp.lang.ada@ada.eu.org>, Michal
>Nowak
>> says...
>> >not FSU one. How to get to know which thread library
>> >am I using? Maybe here lies te problem?
>>
>> It depends on where you got Gnat. The ACT binary distribution uses FSU.
>> The ALT distribution uses native.
>>
>Not exactly true.  The ACT binary distribution uses the FSU by default, but
>a simple switch of two symbolic links will switch it to the native threads.

Perhaps, but if he doesn't know which one he's using, I seriously doubt he has
gone in and switched the links already. :-)

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Simple Producer/Consumer with Annex E
       [not found]               ` <094701c10e3c$917512c0$453ab4d8@sy.com>
@ 2001-07-17 18:33                 ` Michal Nowak
  0 siblings, 0 replies; 17+ messages in thread
From: Michal Nowak @ 2001-07-17 18:33 UTC (permalink / raw)
  To: comp.lang.ada

On 01-07-16, at 16:16, David C. Hoos wrote:

>From: "Ted Dennison" <dennison@telepath.com>

>> In article <mailman.995200942.18355.comp.lang.ada@ada.eu.org>, Michal
>Nowak
>> says...
>> >I removed from my system gnat and glade 3.12p and
>> >installed gnat 3.13p. Then I built from sources
>> ..
>> >not FSU one. How to get to know which thread library
>> >am I using? Maybe here lies te problem?
>>
>> It depends on where you got Gnat. The ACT binary distribution uses FSU.
>The ALT
>> distribution uses native.
>>
>Not exactly true.  The ACT binary distribution uses the FSU by default, but
>a simple
>switch of two symbolic links will switch it to the native threads.
>
>The readme.tasking file describes this.

Thank you for pointer. It's my fault, I should read more readmes...

I switched gnat to native threads, recompiled glade, than compiled
Frank's program one more time.
It still does not work. To me it looks like gnat/glade error.
I got no idea what else can cause it.

-Mike

------------------------
Mike Nowak
mailto: vinnie@inetia.pl



^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2001-07-17 18:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-19 20:00 Simple Producer/Consumer with Annex E Frank
2001-06-26 20:45 ` Frank
2001-06-27  5:06   ` Wilhelm Spickermann
2001-06-28  7:07     ` Frank
     [not found] <E15F7Ws-00038J-00@beatrice.spick.nowhdus>
2001-07-03 17:02 ` Michal Nowak
2001-07-07  9:13   ` Frank
2001-07-10  7:52     ` Frank
2001-07-10 12:02       ` Wilhelm Spickermann
2001-07-10 15:04         ` Frank
2001-07-15 12:45           ` Michal Nowak
2001-07-16 17:26             ` Ted Dennison
2001-07-16 21:16               ` David C. Hoos
2001-07-16 21:41                 ` Ted Dennison
     [not found]               ` <094701c10e3c$917512c0$453ab4d8@sy.com>
2001-07-17 18:33                 ` Michal Nowak
     [not found] <E15JwDj-00077I-00@beatrice.spick.nowhdus>
2001-07-11 17:27 ` Michal Nowak
     [not found] <200107111927240390.00071225@smtp-po.inetia.pl>
2001-07-11 18:26 ` Wilhelm Spickermann
     [not found] <E15KOgZ-0001Jc-00@beatrice.spick.nowhdus>
2001-07-11 20:13 ` Michal Nowak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox