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

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.
DDD@DDD-PC /usr/local/lib
$ ls
libecap.a pkgconfig

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

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

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.
src_compile() {
cd ${S}
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/ \
--enable-ecap \      # Here. --enable-ecap option is
--enable-ssl \
--enable-esi \
--enable-disk-io="AIO,Blocking,DiskThreads,IpcIo,Mmapped" \
--enable-auth-ntlm='fake,smb_lm' \
--enable-auth-negotiate='kerberos,wrapper' \
----------------------------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_passthru.a libecap.a pkgconfig
---------------------------ecap-adapter sample

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, FD 5
2014/10/20 23:33:26| Adding nameserver 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
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

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
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 -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 -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 -rpath
/usr/local/lib adapter_minimal.lo

*** Warning: This system can not link to static lib archive
*** 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 "" && ln
-s "../" "" )
--------------------------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 ?


Problem reports:
Unsubscribe info:

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