shunwang / openpgm

Automatically exported from code.google.com/p/openpgm
0 stars 0 forks source link

openpgm on Ubuntu 12.04 does not work #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

I've faced a problem using Openpgm library, and I would be grateful if anyone 
could help me on this problem.

I want to use Openpgm on Ubuntu 12.04. according to this link: 
"https://code.google.com/p/openpgm/wiki/OpenPgm5CReferenceBuildLibrary" Openpgm 
was tested on Ubuntu 8.04 to 10.10.

I downloaded latest version of Openpgm(5.2.122) and compiled it with "scons" 
without error. According to the link I should see a compiled example named 
"pgmrecv" and "pgmsend" in path "*./ref/debug/examples/" but there isn't such 
example, Instead there was "purinrecv" and "purinsend". I run receiver first 
like this : "./purinrecv -lp 3065" then sender like this : "./purinsend -lp 
3065 please work" , there was no error message in both , but the receiver 
didn't receive anything. Any help would be appreciated!

Original issue reported on code.google.com by d.evans1...@gmail.com on 13 Oct 2013 at 8:19

GoogleCodeExporter commented 9 years ago
Turn on debug and trace and try again, its highly likely a non-active interface 
is being chosen due to host configuration.

https://code.google.com/p/openpgm/wiki/OpenPgm5CReferenceErrorHandling

Original comment by fnjo...@gmail.com on 15 Oct 2013 at 12:59

GoogleCodeExporter commented 9 years ago
With thanks to your response, there is some problems with that. As it said in 
"https://code.google.com/p/openpgm/wiki/OpenPgm5CReferenceErrorHandling" we 
should add "pgm_log_set_handler (log_handler, NULL);" in "purinsend.c" and 
"purinrecv.c" then use "scons" again. We expected that "pgm_log_set_handler" 
function was definded in "log.h", but there isn't such function. So, we can't 
compile this new code. There is two questions:
1. Why "pgmsend" and "pgmrecv" is not created when we make "openpgm" with 
"scons"?
2. Why "pgm_log_set_handler" function is not defined or declared or used in 
anywhere in "openpgm"?
Because of above problems I can't use "openpgm" and can't see traces and logs 
to find out what is the problem. Please say where and what should be added to 
code.

Original comment by d.evans1...@gmail.com on 17 Oct 2013 at 5:47

GoogleCodeExporter commented 9 years ago
The GLIB examples are not built by default, try:

scons WITH_GLIB=true

pgm_log_set_handler is declared: 

https://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/include/pgm/me
ssages.h#63

and is defined:

https://code.google.com/p/openpgm/source/browse/trunk/openpgm/pgm/messages.c#136

Original comment by fnjo...@gmail.com on 17 Oct 2013 at 7:52

GoogleCodeExporter commented 9 years ago
I have had the same issue, with default building but somehow could overcome 
with some examples.

could you kindly check if the build was successful??

And also, few pointers >>>
once its built, try with 
1. open a terminal and go to the directory where purinsend and purinrecv is 
located
in one of the terminal  use this
./purinrecv -lp 7500 -n "eth2;239.192.0.1"
and in second terminal use this
./purinsend -lp 7500 -n "eth0;239.192.0.1" <"some message">
You should be able to get the output..
Currently this is run over UDP, while I am trying it on IP and facing issues at 
the receiving side.

Original comment by ravi.zom...@gmail.com on 21 Oct 2013 at 9:28

GoogleCodeExporter commented 9 years ago
Solved:
May be this would work.,..

1. try making changes in file SConscript.autoconf
at location where it checks for fail cases for host order for raw IP sockets.
def CheckIpLengthHostOrder (context):
----
int
main ()
{
#if defined( __APPLE__ ) || defined( __NetBSD__ ) || defined( __FreeBSD__ )
    return 0;   #fail fail fail #RAVI_CHECK_CHANGES
#endif
    fail fail fail #RAVI_CHECK_CHANGES
}

2. build with GLIB flag true
> scons -c   # cleaning at first, for the previous builds
> scons WITH_GLIB=true

3. after building,
the example files would be at location  ./ref/debug..../examples/

4. Open two terminals, in one of the terminal, run pgmsend and in other pgmrecv

for PGM over UDP
> ./pgmsend -lp 7500  -n "eth1;239.192.0.1"

in the other terminal
> ./pgmrecv -lp 7500 -n "eth1;239.192.0.1"

NOTE: check for the interface type (I had eth1 active) thro > ./pgmsend -i 
(this would give list of active interfaces)
for PGM over IP
use sudo  or set permissions for the file
> sudo ./pgmsend -ls 7500  -n "eth1;239.192.0.1"

in the other terminal
> sudo ./pgmrecv -ls 7500 -n "eth1;239.192.0.1"

type 2.
>sudo setcap cap_net_raw=ep <filename>  # in this its pgmsend and pgmrecv

>sudo setcap cap_net_raw=ep pgmsend
>sudo setcap cap_net_raw=ep pgmrecv
(else would face  error for raw IP sockets capability)

Thanks a ton to this post...: - 
http://code.google.com/p/openpgm/issues/detail?id=27

Hope this is useful info.....

Regards,
Ravi

Original comment by ravi.zom...@gmail.com on 23 Oct 2013 at 9:12