<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }body { font-size: 10.5pt; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">There are some other message that may be helpful.</span><span></span></div><div>I used to configure squid to load ecap-adapter module as following on windows.</div><div><br></div><div>-------------------configure---------------------------</div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">ecap_enable on
<br>adaptation_send_client_ip on
<br>
<br>loadable_modules /usr/local/lib/ecap_adapter_modifying.so
<br>ecap_service ecapModifier respmod_precache \
<br> uri=ecap://e-cap.org/ecap/services/sample/modifying \
<br> victim=the \
<br> replacement=a
<br>adaptation_access ecapModifier allow all</span></div><div>-----------------configure end ------------------------</div><div><br></div><div>then, when I run squid, i surely failed. Here is the error messages.</div><div><br></div><div>--------------------error message------------------------------</div><div><span style="font-family: "" microsoft="" yahei="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="">$ ./squid.exe -N -C -d1
<br>2014/10/20 23:33:26| WARNING cache_mem is larger than total disk cache space!
<br>2014/10/20 23:33:26| Starting Squid Cache version 3.3.3 for i686-pc-cygwin...
<br>2014/10/20 23:33:26| Process ID 3200
<br>2014/10/20 23:33:26| Process Roles: master worker
<br>2014/10/20 23:33:26| With 3072 file descriptors available
<br>2014/10/20 23:33:26| Initializing IP Cache...
<br>2014/10/20 23:33:26| DNS Socket created at [::], FD 4
<br>2014/10/20 23:33:26| DNS Socket created at 0.0.0.0, FD 5
<br>2014/10/20 23:33:26| Adding nameserver 8.8.8.8 from squid.conf
<br>2014/10/20 23:33:26| Logfile: opening log daemon:/var/log/squid/access.log
<br>2014/10/20 23:33:26| Logfile Daemon: opening log /var/log/squid/access.log
<br>2014/10/20 23:33:26| WARNING: no_suid: setuid(0): (22) Invalid argument
<br>2014/10/20 23:33:26| WARNING: no_suid: setuid(0): (22) Invalid argument
<br>2014/10/20 23:33:27| Unlinkd pipe opened on FD 11
<br>2014/10/20 23:33:27| Store logging disabled
<br>2014/10/20 23:33:27| Swap maxSize 102400 + 262144 KB, estimated 28041 objects
<br>2014/10/20 23:33:27| Target number of buckets: 1402
<br>2014/10/20 23:33:27| Using 8192 Store buckets
<br>2014/10/20 23:33:27| Max Mem size: 262144 KB
<br>2014/10/20 23:33:27| Max Swap size: 102400 KB
<br>2014/10/20 23:33:27| Rebuilding storage in /var/cache/squid (dirty log)
<br>2014/10/20 23:33:27| Using Least Load store dir selection
<br>2014/10/20 23:33:27| Set Current Directory to /var/cache/squid
<br>2014/10/20 23:33:27| Loaded Icons.
<br>2014/10/20 23:33:27| HTCP Disabled.
<br>2014/10/20 23:33:27| Loading Squid module from '/usr/local/lib/ecap_adapter_modifying.so'
<br>2014/10/20 23:33:27| FATAL: dying from an unhandled exception: %1 is not a valid Win32 application.
<br>terminate called after throwing an instance of 'TextException'
<br> what(): %1 is not a valid Win32 application.
<br>Aborted (core dumped) <br></span></div><div>--------------------error message end-------------------------</div><div><br></div><div>So, I think that it is running natively on windows.</div><div><br></div><div>HDM1991</div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>lionxyes@gmail.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:squid3@treenet.co.nz">Amos Jeffries</a></div><div><b>Date:</b> 2014-10-21 16:19</div><div><b>To:</b> <a href="mailto:squid-users@lists.squid-cache.org">squid-users</a></div><div><b>Subject:</b> Re: [squid-users] Question about compiling and loading ecap-adapter module on windows</div></div></div><div><div>-----BEGIN PGP SIGNED MESSAGE-----</div>
<div>Hash: SHA1</div>
<div> </div>
<div>On 21/10/2014 8:52 p.m., lionxyes@gmail.com wrote:</div>
<div>> </div>
<div>> Hi. I‘m coming again.</div>
<div>> </div>
<div>> Now, I have compiled squid-3.3.3 with --enable-ecap option</div>
<div>> successfully on cygwin and run it successfully on windows. But,</div>
<div>> there are another question about compiling ecap-adapter module?</div>
<div>> </div>
<div>> I'm not sure that I should ask this question here, maybe I should</div>
<div>> ask eCAP developer. but I think that I should try it firstly.</div>
<div> </div>
<div>Probably. But I'll give this a try at answering...</div>
<div> </div>
<div>> </div>
<div>> OK! Question 1: Does it need compile ecap-adapter module as .dll</div>
<div>> file if I want use ecap-adapter module on windows.</div>
<div> </div>
<div>If it is running natively on Windows, the answer is yes. If it is</div>
<div>running inside the cygwin environment (I suspect so) then the answer</div>
<div>might be no. The cygwin people maybe could help there.</div>
<div> </div>
<div> </div>
<div>> Question 2: If it need, How to do it and do I shoud ask eCAP</div>
<div>> developer? Now, when I compile ecap-adapter</div>
<div>> module(ecap_adapter_sample-0.2.1.tar.gz) directly on cygwin. I just</div>
<div>> get .a .la file. Here is some output message when I make it.</div>
<div> </div>
<div>IF its necessary the .dll parts should be done by your compiler tools</div>
<div>automatically. The error it produced gives a few obscure hints...</div>
<div> </div>
<div>> </div>
<div>> ------------------------------------------------------output</div>
<div>> message----------------------------------------------------------- </div>
<div>> Making all in src make[1]: Entering directory</div>
<div>> '/usr/src/ecap_adapter_sample-0.2.1/src' make all-am make[2]:</div>
<div>> Entering directory '/usr/src/ecap_adapter_sample-0.2.1/src' /bin/sh</div>
<div>> ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I../src</div>
<div>> -I/usr/local/include -g -O3 -Wall -Wwrite-strings</div>
<div>> -Woverloaded-virtual -pipe -MT adapter_minimal.lo -MD -MP -MF</div>
<div>> .deps/adapter_minimal.Tpo -c -o adapter_minimal.lo</div>
<div>> adapter_minimal.cc libtool: compile: g++ -DHAVE_CONFIG_H -I../src</div>
<div>> -I/usr/local/include -g -O3 -Wall -Wwrite-strings</div>
<div>> -Woverloaded-virtual -pipe -MT adapter_minimal.lo -MD -MP -MF</div>
<div>> .deps/adapter_minimal.Tpo -c adapter_minimal.cc -DDLL_EXPORT -DPIC</div>
<div>> -o .libs/adapter_minimal.o libtool: compile: g++ -DHAVE_CONFIG_H</div>
<div>> -I../src -I/usr/local/include -g -O3 -Wall -Wwrite-strings</div>
<div>> -Woverloaded-virtual -pipe -MT adapter_minimal.lo -MD -MP -MF</div>
<div>> .deps/adapter_minimal.Tpo -c adapter_minimal.cc -o</div>
<div>> adapter_minimal.o >/dev/null 2>&1 mv -f .deps/adapter_minimal.Tpo</div>
<div>> .deps/adapter_minimal.Plo /bin/sh ../libtool --tag=CXX --mode=link</div>
<div>> g++ -g -O3 -Wall -Wwrite-strings -Woverloaded-virtual -pipe -module</div>
<div>> -avoid-version -L/usr/local/lib -lecap -o ecap_adapter_minimal.la</div>
<div>> -rpath /usr/local/lib adapter_minimal.lo</div>
<div>> </div>
<div>> *** Warning: This system can not link to static lib archive</div>
<div>> /usr/local/lib/libecap.la. *** I have the capability to make that</div>
<div>> library automatically link in when *** you link to this library.</div>
<div>> But I can only do this if you have a *** shared version of the</div>
<div>> library, which you do not appear to have. *** But as you try to</div>
<div>> build a module library, libtool will still create *** a static</div>
<div>> module, that should work as long as the dlopening application ***</div>
<div>> is linked with the -dlopen flag to resolve symbols at runtime.</div>
<div> </div>
<div>So, what its saying is that the libecap.la was built with -static</div>
<div>compiler flag. But the app now being built requires it to be dynamic</div>
<div>instead.</div>
<div> </div>
<div>If Squid is also built with the -dlopen flag (Squid should be) then</div>
<div>the above warning does not matter.</div>
<div> </div>
<div> </div>
<div>> libtool: link: warning: undefined symbols not allowed in</div>
<div>> i686-pc-cygwin shared libraries</div>
<div> </div>
<div>This warning might be more problematic, but given its just a warning</div>
<div>and the earlier one said it was okay... in your place I would test the</div>
<div>run-time behaviour to see if its really broken.</div>
<div> </div>
<div>HTH</div>
<div>Amos</div>
<div>-----BEGIN PGP SIGNATURE-----</div>
<div>Version: GnuPG v2.0.22 (MingW32)</div>
<div> </div>
<div>iQEcBAEBAgAGBQJURhceAAoJELJo5wb/XPRjVcwIAJOmEMfuKIDltB4sZPvZaakH</div>
<div>t77AwURtHd7R/zO4yAWVchrxUlaLOGyx9u2lykwA+zH28e9rPd3ukNND6v/43F9U</div>
<div>xIzQtpW5BoGnYPWtviod8bVqkDqs7sueyxtdcn+AOuG4UXLAh+SD/6EF9c97/7h/</div>
<div>gZHyAHg08C0hQPokCTtXKhI9CiLzdh94cN7poWcQV//XZib4HL/NNC1e2fBZirZm</div>
<div>ab4aEt+e8Asr53T278pMZ5AriawUiIi4N6wIQbSB6+1r90JVjcuf3ISbnTBS7IN7</div>
<div>u1epMhVnMsZx8KhzCsmIvQC/aLXZD3uUpkzaSgXzZ5lQy+Hr5/M9Y6iB+QLmcpY=</div>
<div>=PnXT</div>
<div>-----END PGP SIGNATURE-----</div>
<div>_______________________________________________</div>
<div>squid-users mailing list</div>
<div>squid-users@lists.squid-cache.org</div>
<div>http://lists.squid-cache.org/listinfo/squid-users</div>
</div></blockquote>
</body></html>