This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about porting eCAP


Hi.
Recently, I want run squid with eCAP feature on windows.

Now, I have compiled eCAP-0.2.0 on cygwin. As a result, I some files as follow.
--------------------------eCAP-----------------------------------------
DDD@DDD-PC /usr/local/lib
$ ls
libecap.a libecap.la pkgconfig

DDD@DDD-PC /usr/local/lib
$ cd pkgconfig/

DDD@DDD-PC /usr/local/lib/pkgconfig
$ ls
libecap.pc

HDM@HDM-PC /usr/local/lib/pkgconfig
$
--------------------------eCAP end-----------------------------------------

Then, I compiled squid-3.3.3-2 with --enable-ecap option successfuly
on cygwin by editing squid.cygport.
----------------------------squid.cygport------------------------------
src_compile() {
cd ${S}
./bootstrap.sh
lndirs
cd ${B}
cygconf \
--sysconfdir=/etc/squid \
--datadir=/usr/share/squid \
--libexecdir=/usr/lib/squid \
--disable-strict-error-checking \
--with-logdir=/var/log/squid \
--with-swapdir=/var/cache/squid \
--with-pidfile=/var/run/squid.pid \
--enable-ecap \      # Here. --enable-ecap option is
--enable-ssl \
--enable-esi \
--enable-disk-io="AIO,Blocking,DiskThreads,IpcIo,Mmapped" \
--enable-auth-basic="DB,LDAP,MSNT,MSNT-multi-domain,NCSA,POP3,RADIUS,SASL,SMB,fake,getpwnam"
\
--enable-auth-ntlm='fake,smb_lm' \
--enable-auth-negotiate='kerberos,wrapper' \
--enable-external-acl-helpers='LDAP_group,SQL_session,eDirectory_userip,file_userip,kerberos_ldap_group,session,time_quota,unix_group,wbinfo_group'
\
----------------------------squid.cygport end------------------------------

But, when I compile ecap-adapter sample, I just get some files as following.
---------------------------ecap-adapter sample--------------------------------
HDM@HDM-PC /usr/local/lib
$ ls
ecap_adapter_minimal.a ecap_adapter_minimal.la
ecap_adapter_modifying.a ecap_adapter_modifying.la
ecap_adapter_passthru.a ecap_adapter_passthru.la libecap.a libecap.la
libecap.so.2.0.0 pkgconfig
---------------------------ecap-adapter sample
end--------------------------------

Of couse, Squid can't load it. When I configure Squid to load it, I
just these error message.
--------------------------Squid 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)
--------------------------Squid error
message---------------------------------------

There are some output message when I compile ecap-adapter sample.
--------------------------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.
libtool: link: warning: undefined symbols not allowed in
i686-pc-cygwin shared libraries
libtool: link: /usr/bin/ar cru .libs/ecap_adapter_minimal.a adapter_minimal.o
libtool: link: ranlib .libs/ecap_adapter_minimal.a
libtool: link: ( cd ".libs" && rm -f "ecap_adapter_minimal.la" && ln
-s "../ecap_adapter_minimal.la" "ecap_adapter_minimal.la" )
--------------------------output message end------------------------------------

I think a .dll is neccessary. Naturally, There are some work of
porting need to do.
I have readed the Building and Using Dll chapter of document. But, I'm
still confused.
I think that this port maybe is similar to some package that have
ported sucesullfy.

Does anybody can give me some advices ?

HDM1991
lionxyes@gmail.com

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]