Hi Monks,
I am working on a small linux distro for use on compact flash cards. I want have a full working perl interpreter in it so that I can script the distro easily. So I took a gentoo linux machine, installed perl and the modules that I need. I then copied the perl5.8.5 binary into my distro's root filesystem, and also the entire contents of /usr/lib/perl5 to the /usr/lib/perl5 directory of my distro. When I boot it (or chroot into for that matter), everything seems to work just fine, except for one thing. It seems that when I use the IO::Socket modules, or POE::Component::Server::TCP for that matter, it doesnt work when I use the following line of code:
$server = IO::Socket::INET->new(LocalPort=>$config{'port'},
Type=>SOCK_STREAM,
Proto=>'tcp',
Reuse=>1,
Listen=>1)
or die "Fatal Error opening the socket! $! : $@\n";
it errors, telling me this:
Fatal Error opening the socket! No such file or directory : IO::Socket::INET: Bad protocol 'tcp'
This only happens when I am chroot'ed into the root filesystem of my distro, not the gentoo distro that it originated from. Wierd huh? To reword my question, how can I take an existing perl interpreter, along with all of the modules installed, and transfer it from one system to another? Also, what libraries are needed for the whole thing to work? I did "ldd perl5.8.5" and made sure that my distro included all of the libs that it reported. Thanks in advance.
holli - added code tags