[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AF_INET error with sockets on Linux
From: |
Martin Helm |
Subject: |
Re: AF_INET error with sockets on Linux |
Date: |
Wed, 28 Jul 2010 20:31:08 +0200 |
User-agent: |
KMail/1.12.4 (Linux/2.6.31.12-0.2-desktop; KDE/4.3.5; x86_64; ; ) |
Am Mittwoch, 28. Juli 2010 19:07:50 schrieb Martin Helm:
> Am Mittwoch, 28. Juli 2010 18:40:50 schrieb George Nychis:
> > I am attempting to get the sockets library working on Ubuntu 10.04, with
> > Octave 3.2.3 (current version packaged for Ubuntu).
> >
> > I found the source code for the socket package here:
> > http://octave.sourceforge.net/sockets/index.html
> >
> > When trying to run "test_octave_sockets" I get the following:
> > error: `AF_INET' undefined near line 12 column 17
> > error: evaluating argument list element number 1
> > error: evaluating argument list element number 1
> > error: called from:
> > error: dotest at line 12, column 8
> > error: ./test_octave_sockets at line 95, column 6
> >
> > I found that this was a similar error previously discussed, that seemed
> > to have had a fix for:
> > http://old.nabble.com/Sockets-error-td25230848.html
> >
> > I'm not sure what exactly the fix was, and where it went. I checked the
> > newest version of Octave to see if it had socket support built in, but I
> > couldn't seem to find it in there. So I'm assuming the sourceforge
> > package I downloaded is the newest socket code?
> >
> > I could simply replace it with its numeric value:
> > #define AF_INET 2 /* Internet IP Protocol */
> >
> > But... I'd rather figure out what the core problem is.
> >
> > Thanks!
> > George
>
> Simple reason:
>
> The package sockets is not automatically loaded on octave startup.
> Fix: Start octave and invoke
> pkg rebuild -auto sockets
>
> Exit octave.
>
> Now the test_octave_sockets script will run (tested on opensuse 11.2, 64
> bit, octave 3.2.4).
>
> - mh
>
I forgot to mention the alternative. If you do not want the package to
autoload on startup but still use it:
Add the line
pkg load sockets
to every script which needs the sockets package.
(In your case add it to the test_octave_sockets script.
- mh