[Vm-dev] Fwd: [Pharo-project] Networking on images running on 64
bit OSes.
Damien Cassou
damien.cassou at gmail.com
Mon Aug 24 07:39:18 UTC 2009
---------- Forwarded message ----------
From: Miguel Enrique Cobá Martinez <miguel.coba at gmail.com>
Date: 2009/8/24
Subject: Re: [Pharo-project] Networking on images running on 64 bit OSes.
To: Pharo <pharo-project at lists.gforge.inria.fr>
El dom, 23-08-2009 a las 18:40 -0500, Miguel Enrique Cobá Martinez
escribió:
> Is someone working on issues:
>
> http://code.google.com/p/pharo/issues/detail?id=1031
> http://code.google.com/p/pharo/issues/detail?id=961
> http://code.google.com/p/pharo/issues/detail?id=794
>
> Without them fixed the in-image network doesn't work.
>
> CPU: intel
> CPU arch: x86
> OS: Debian GNU/Linux i386
> OS arch: 32 bits
> works: YES
>
> CPU: intel
> CPU arch: x86_64
> OS: Debian GNU/Linux amd64
> OS arch: 64 bits
> works: NO
>
> CPU: amd
> CPU arch: x86_64
> OS: Debian GNU/Linux i386
> OS arch: 32 bits
> works: YES
>
> CPU: amd
> CPU arch: x86_64
> OS: Debian GNU/Linux amd64
> OS arch: 64 bits
> works: NO
>
> In short it doesn't work on a 64 bit OS.
>
> I tried to see the source code for the squeak vm because it is the
> primitives that are failing but I got confused and gave up.
>
> The interesting part that I found was this:
>
> static char localHostName[MAXHOSTNAMELEN];
> static u_long localHostAddress; /* GROSS IPv4 ASSUMPTION! */
>
> assigned in:
>
> /* start a new network session */
>
> sqInt sqNetworkInit(sqInt resolverSemaIndex)
> {
> if (0 != thisNetSession)
> return 0; /* already initialised */
> gethostname(localHostName, MAXHOSTNAMELEN);
> localHostAddress= nameToAddr(localHostName);
> thisNetSession= clock() + time(0);
> if (0 == thisNetSession)
> thisNetSession= 1; /* 0 => uninitialised */
> resolverSema= resolverSemaIndex;
> return 0;
> }
>
> by means of:
>
> static int nameToAddr(char *hostName)
> {
> struct hostent *he;
>
> lastError= 0; /* ditto */
> if ((he= gethostbyname(hostName)))
> return ntohl(*(long *)(he->h_addr_list[0]));
> lastError= h_errno; /* and one more ditto */
> return 0;
> }
>
> there it appears to call a system function (gethostbyname)
> and to convert the result struct first entry on array h_addr_list.
>
> Well the point is, this is for someone with more experience with the
> socket plugin in squeak.
>
> So, it is someone trying to fix this? Are there any news here?
> It is a structural problem, because before this I could connect to the network in
> my 64 bit OS on my x86_64 architecture without the ia32libs on debian. For these test
> I installed the ia32libs package of debian in order load and start the closure vm.
>
> Maybe Jose Luis Redrejo has a hint about how to build the vm in order to having
> a full networking vm/image.
>
> Or someone more involved with the internals of the vm.
>
I forgot to mention, this happens with the pharo recommended vm on:
pharo-vm-0.15.2d-linux.zip
but also with the squeak closure vm on:
Squeak-3.10-6.i686-pc-linux-gnu.tar.gz
that gives the following messages (the last one is the important) on
trying to open a repository with monticello on my 64 bit OS.
miguel at laptop:~/Squeak-3.10-6/i686-pc-linux-gnu/usr/local/lib/squeak/3.10-6$
./squeak /home/miguel/azteca/magma.image
ioLoadModule(./UUIDPlugin):
libuuid.so.1: cannot open shared object file: No such file or
directory
ioLoadModule(UUIDPlugin):
UUIDPlugin: cannot open shared object file: No such file or directory
getaddrinfo: Name or service not known
--
Miguel Cobá
http://miguel.leugim.com.mx
_______________________________________________
Pharo-project mailing list
Pharo-project at lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
--
Damien Cassou
http://damiencassou.seasidehosting.st
"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry
More information about the Vm-dev
mailing list