[squid-users] Question about compiling and loading ecap-adapter module on windows

lionxyes at gmail.com lionxyes at gmail.com
Tue Oct 21 08:38:16 UTC 2014


There are some other message that may be helpful.
I used to configure squid to load ecap-adapter module as following on windows.

-------------------configure---------------------------
ecap_enable on 
adaptation_send_client_ip on 

loadable_modules /usr/local/lib/ecap_adapter_modifying.so 
ecap_service ecapModifier respmod_precache \ 
uri=ecap://e-cap.org/ecap/services/sample/modifying \ 
victim=the \ 
replacement=a 
adaptation_access ecapModifier allow all
-----------------configure end ------------------------

then, when I run squid, i surely failed. Here is the error messages.

--------------------error message------------------------------
$ ./squid.exe -N -C -d1 
2014/10/20 23:33:26| WARNING cache_mem is larger than total disk cache space! 
2014/10/20 23:33:26| Starting Squid Cache version 3.3.3 for i686-pc-cygwin... 
2014/10/20 23:33:26| Process ID 3200 
2014/10/20 23:33:26| Process Roles: master worker 
2014/10/20 23:33:26| With 3072 file descriptors available 
2014/10/20 23:33:26| Initializing IP Cache... 
2014/10/20 23:33:26| DNS Socket created at [::], FD 4 
2014/10/20 23:33:26| DNS Socket created at 0.0.0.0, FD 5 
2014/10/20 23:33:26| Adding nameserver 8.8.8.8 from squid.conf 
2014/10/20 23:33:26| Logfile: opening log daemon:/var/log/squid/access.log 
2014/10/20 23:33:26| Logfile Daemon: opening log /var/log/squid/access.log 
2014/10/20 23:33:26| WARNING: no_suid: setuid(0): (22) Invalid argument 
2014/10/20 23:33:26| WARNING: no_suid: setuid(0): (22) Invalid argument 
2014/10/20 23:33:27| Unlinkd pipe opened on FD 11 
2014/10/20 23:33:27| Store logging disabled 
2014/10/20 23:33:27| Swap maxSize 102400 + 262144 KB, estimated 28041 objects 
2014/10/20 23:33:27| Target number of buckets: 1402 
2014/10/20 23:33:27| Using 8192 Store buckets 
2014/10/20 23:33:27| Max Mem size: 262144 KB 
2014/10/20 23:33:27| Max Swap size: 102400 KB 
2014/10/20 23:33:27| Rebuilding storage in /var/cache/squid (dirty log) 
2014/10/20 23:33:27| Using Least Load store dir selection 
2014/10/20 23:33:27| Set Current Directory to /var/cache/squid 
2014/10/20 23:33:27| Loaded Icons. 
2014/10/20 23:33:27| HTCP Disabled. 
2014/10/20 23:33:27| Loading Squid module from '/usr/local/lib/ecap_adapter_modifying.so' 
2014/10/20 23:33:27| FATAL: dying from an unhandled exception: %1 is not a valid Win32 application. 
terminate called after throwing an instance of 'TextException' 
what(): %1 is not a valid Win32 application. 
Aborted (core dumped) 
--------------------error message end-------------------------

So, I think that it is running natively on windows.

HDM1991


lionxyes at gmail.com
 
From: Amos Jeffries
Date: 2014-10-21 16:19
To: squid-users
Subject: Re: [squid-users] Question about compiling and loading ecap-adapter module on windows
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
On 21/10/2014 8:52 p.m., lionxyes at gmail.com wrote:
> 
> Hi.  I‘m coming again.
> 
> Now, I have compiled squid-3.3.3 with --enable-ecap option
> successfully on cygwin and run it successfully on windows. But,
> there are another question about compiling ecap-adapter module?
> 
> I'm not sure that I should ask this question here, maybe I should
> ask eCAP developer. but I think that I should try it firstly.
 
Probably. But I'll give this a try at answering...
 
> 
> OK! Question 1:  Does it need compile ecap-adapter module as .dll
> file if I want use ecap-adapter module on windows.
 
If it is running natively on Windows, the answer is yes. If it is
running inside the cygwin environment (I suspect so) then the answer
might be no. The cygwin people maybe could help there.
 
 
> Question 2:  If it need, How to do it and do I shoud ask eCAP
> developer? Now, when I compile ecap-adapter
> module(ecap_adapter_sample-0.2.1.tar.gz) directly on cygwin. I just
> get .a .la file. Here is some output message when I make it.
 
IF its necessary the .dll parts should be done by your compiler tools
automatically. The error it produced gives a few obscure hints...
 
> 
> ------------------------------------------------------output
> message----------------------------------------------------------- 
> Making all in src make[1]: Entering directory
> '/usr/src/ecap_adapter_sample-0.2.1/src' make all-am make[2]:
> Entering directory '/usr/src/ecap_adapter_sample-0.2.1/src' /bin/sh
> ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I../src
> -I/usr/local/include -g -O3 -Wall -Wwrite-strings
> -Woverloaded-virtual -pipe -MT adapter_minimal.lo -MD -MP -MF
> .deps/adapter_minimal.Tpo -c -o adapter_minimal.lo
> adapter_minimal.cc libtool: compile: g++ -DHAVE_CONFIG_H -I../src
> -I/usr/local/include -g -O3 -Wall -Wwrite-strings
> -Woverloaded-virtual -pipe -MT adapter_minimal.lo -MD -MP -MF
> .deps/adapter_minimal.Tpo -c adapter_minimal.cc -DDLL_EXPORT -DPIC
> -o .libs/adapter_minimal.o libtool: compile: g++ -DHAVE_CONFIG_H
> -I../src -I/usr/local/include -g -O3 -Wall -Wwrite-strings
> -Woverloaded-virtual -pipe -MT adapter_minimal.lo -MD -MP -MF
> .deps/adapter_minimal.Tpo -c adapter_minimal.cc -o
> adapter_minimal.o >/dev/null 2>&1 mv -f .deps/adapter_minimal.Tpo
> .deps/adapter_minimal.Plo /bin/sh ../libtool --tag=CXX --mode=link
> g++ -g -O3 -Wall -Wwrite-strings -Woverloaded-virtual -pipe -module
> -avoid-version -L/usr/local/lib -lecap -o ecap_adapter_minimal.la
> -rpath /usr/local/lib adapter_minimal.lo
> 
> *** Warning: This system can not link to static lib archive
> /usr/local/lib/libecap.la. *** I have the capability to make that
> library automatically link in when *** you link to this library.
> But I can only do this if you have a *** shared version of the
> library, which you do not appear to have. *** But as you try to
> build a module library, libtool will still create *** a static
> module, that should work as long as the dlopening application ***
> is linked with the -dlopen flag to resolve symbols at runtime.
 
So, what its saying is that the libecap.la was built with -static
compiler flag. But the app now being built requires it to be dynamic
instead.
 
If Squid is also built with the -dlopen flag (Squid should be) then
the above warning does not matter.
 
 
> libtool: link: warning: undefined symbols not allowed in
> i686-pc-cygwin shared libraries
 
This warning might be more problematic, but given its just a warning
and the earlier one said it was okay... in your place I would test the
run-time behaviour to see if its really broken.
 
HTH
Amos
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
 
iQEcBAEBAgAGBQJURhceAAoJELJo5wb/XPRjVcwIAJOmEMfuKIDltB4sZPvZaakH
t77AwURtHd7R/zO4yAWVchrxUlaLOGyx9u2lykwA+zH28e9rPd3ukNND6v/43F9U
xIzQtpW5BoGnYPWtviod8bVqkDqs7sueyxtdcn+AOuG4UXLAh+SD/6EF9c97/7h/
gZHyAHg08C0hQPokCTtXKhI9CiLzdh94cN7poWcQV//XZib4HL/NNC1e2fBZirZm
ab4aEt+e8Asr53T278pMZ5AriawUiIi4N6wIQbSB6+1r90JVjcuf3ISbnTBS7IN7
u1epMhVnMsZx8KhzCsmIvQC/aLXZD3uUpkzaSgXzZ5lQy+Hr5/M9Y6iB+QLmcpY=
=PnXT
-----END PGP SIGNATURE-----
_______________________________________________
squid-users mailing list
squid-users at lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20141021/1273c849/attachment-0001.html>


More information about the squid-users mailing list