PDA

Bekijk de volledige versie : How can I compile with shared library ?



Jean-Fabrice
25-08-2004, 14:10
Hi,

I try to compile a socks server (dante from www.inet.no/dante) in order to run it on my wl500g. Using all the documentation found on this forum plus browsing oleg source for inspiration ,'m able to compile it statically. The size after stripping is arount 980KB, which produce a firmware (linux.trx) to big (17KB too much, snif...), even when discarding samba and Bigpond.

I would like to know if someone could give me some tips in order to compile it with shared library beacuse today, when shared-compiled, it still reference libc.so.6 which is on the compile host and I have the - normal - error :
"./sockd: error while loading shared libraries: ./sockd: symbol socketpair, version GLIBC_2.0 not defined in file libc.so.6 with link time reference" when I try to launch it on the wl500.

Any help would be appreciate.

Jean-Fabrice

Oleg
25-08-2004, 14:17
Use mipsel-uclibc-gcc instead mipsel-linux-gcc. Most packages are allowing passing CC=mipsel-uclibc-gcc to conigure or make - i.e.


CC=mipsel-uclibc-gcc ./configure bal-bla-bla

or


make CC=mipsel-uclibc-gcc

Regards,
Oleg.

Jean-Fabrice
25-08-2004, 14:42
Great thanx Oleg !

It works like a charm ! : After compiling and stripping, sockd is now 260K !

Many thanks again.
Have now to test it and see if wl500 supports the load...

Jean-Fabrice

Styno
25-08-2004, 15:00
What is your purpose with Dante? Just the logging possibilities or does is have other capabilities that iptables can't provide? I'm just curious...

Will you consider making a WIKI page on this if you have it running?

Jean-Fabrice
25-08-2004, 15:54
Well, I use dante as a socks v4/v5 server because.....hum...
my compagny is blocking TCP port for MSN and HTTP doesn't work because of http stream antivirus filter... Messenger cannot connect :(

I found that some port are not filtered out, neither proxyfied (like TCP 443), so I run dante on 443 and then configure Messenger to use my wl500g as socks proxy.

I still don't know if this is stable or not... Still want a wiki page ?

Jean-Fabrice

Jean-Fabrice
25-08-2004, 15:58
@Oleg,

BTW my fully compiled firmware is 3837952 bytes; I read in an other post that you've said max size is around 380... How is this size calculated ?

Samba is really big ... :( will have to discard it.

Jean-fabrice

Styno
25-08-2004, 16:14
Haha, hacking your way through the company's policy are you? Right. :cool:

There are some other users here who wondered if proxy functionality was/is possible. If you get it working I think a WIKI page would be greatly appreciated... Personally I don't have any plans on using a proxy of some sort.

Oleg
25-08-2004, 18:04
@Oleg,

BTW my fully compiled firmware is 3837952 bytes; I read in an other post that you've said max size is around 380... How is this size calculated ?

Samba is really big ... :( will have to discard it.

Jean-fabrice
0x3a000 bytes (256k is pmon, 64k nvram, 64k nothing - flashfs now, total 4M)

erik_bies
26-08-2004, 01:18
The way I solved my company restrictions are maybe also working for you.
Also they have some open ports, and I'm able to connect to SSH (over http proxy.. nice in putty) to my WL500g

With portforwarding I than connect to the service I need (e.g. proxy of internet provider). MSN (chatting) is workin in this mode. (voice not)

Jean-Fabrice
26-08-2004, 09:27
The way I solved my company restrictions are maybe also working for you.
Also they have some open ports, and I'm able to connect to SSH (over http proxy.. nice in putty) to my WL500g

With portforwarding I than connect to the service I need (e.g. proxy of internet provider). MSN (chatting) is workin in this mode. (voice not)

but you need to pre-establish a ssh connection, and keep it up and running, no ?

Jean-Fabrice

Jean-Fabrice
26-08-2004, 09:40
Well, dante compile file, shared linked to uclibc.

I can launch it with no error but cannot connect :(

In fact I have the following network error while connecting a socket :

got accept(): x.x.x.x.50660
recv_negotiate(): getpeername(): Bad file descriptor

call to getpeername() in source code is:

if (getpeername(neg->s, &from, &len) != 0) {
slog(LOG_DEBUG, "%s: getpeername(): %s", function, strerror(errno));
return 1;
}


Does any1 knows if this function, getpeername, is particular in uclibc ?


Thanks.

Jean-Fabrice

monnier
26-08-2004, 18:15
Well, I use dante as a socks v4/v5 server because.....

So you use it like a sort of VPN to access your home network.
Reading the docs I can't seem to figure out in what way it's different from something
like OpenVPN.
Can anyone enlighten me (or point me to an enlightening webpage) about such differences?

Jean-Fabrice
26-08-2004, 22:04
So you use it like a sort of VPN to access your home network.
Reading the docs I can't seem to figure out in what way it's different from something
like OpenVPN.
Can anyone enlighten me (or point me to an enlightening webpage) about such differences?

As far as I understand it, VPN works at low level and tunnel all the stream to a single point.
My need is to still be able to communicate with the local network or compagny network and for some softwares which support it, to use a proxy.

Don't now if I'm right and clear ;)
Jean-Fabrice

Maxiller
20-08-2010, 21:52
Sorry for continuing this topic back from trash. Has anyone compiled dante? I don't see it in packages.