PDA

View Full Version : developing a tcp server being used in knoppix



dkennedy
10-21-2004, 12:34 AM
I'm having some pretty interesting issues. I can put up code on request, but it doesnt seem to be a code issue.

I've built a process that uses a C++ server and a PHP client (hosted via apache) that communicate via localhost Tcp. On my Gentoo dev machine, they work great. Moving things to Knoppix, the accept() call in the server returns "Invalid Argument".

I do have slightly different versions of apache, gcc, etc...as apt-get and emerge rab slightly different things by default. But i did a little cross-testing, heres where things get interesting..

When I boot IN KNOPPIX and chroot into my gentoo partition, I run my server executable. I run the client in the a regular Knoppix web browser (ie my knoppix apache) and it works.

I boot IN KNOPPIX, re-configure and re-make the server code that is IN MY GENTOO PARTITION (so I'm using Knoppix gcc, libs, etc). I run that executable from a Knoppix shell, it fails. I chroot into my gentoo partition and run that new executable, built from the knoppix shell, and run it..and the whole process works.

Boy oh boy am i lost. I am totally willing to put together a stripped down version of this issue if someone wants to see it. But I'm thinking/hoping its something to do with the way Knoppix is put together, and i dont really know much about its trickery..

thanks, dave

OErjan
10-21-2004, 04:13 PM
have you tried compiling it statically? might be some lib's missing...

dkennedy
10-21-2004, 10:11 PM
but that sounds like it could be the right track..
how does knoppix interwork with various architectures? ie is there specific C flags i should be passing in to the compiler if im developing for knoppix? right now im jus tpassing in -O0 and -g3 for debug info...plus -static now...

firebyrd10
10-22-2004, 12:17 AM
but that sounds like it could be the right track..
how does knoppix interwork with various architectures? ie is there specific C flags i should be passing in to the compiler if im developing for knoppix? right now im jus tpassing in -O0 and -g3 for debug info...plus -static now...

Unless your working on a differnt Physical architecture with knoppix, the flags should be the same.