Mail Archives: cygwin/2014/10/22/03:38:26
X-Recipient: | archive-cygwin AT delorie DOT com
|
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:mime-version:date:message-id:subject:from:to
|
| :content-type; q=dns; s=default; b=OwGsjOwJuBnPxzpADwtPnJnadHzVV
|
| sZsAdeQ2InHI9I1kv+NBUIw7nthmy6o7xoLAikgpS7DndFKoxSk8khyiTWA9pvqq
|
| ndWK4WAO6CH4PcHR1e7qi/tA4fyX+3CyBEhtaxluFjYFxWXWPyM5oTK/A4Q3GG2X
|
| 6ttK9hSBBN9itY=
|
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
|
| :list-unsubscribe:list-subscribe:list-archive:list-post
|
| :list-help:sender:mime-version:date:message-id:subject:from:to
|
| :content-type; s=default; bh=j3upscGI6niSSDqqR8Ha7PaTbEQ=; b=XaN
|
| KPFOMw9FzhhbTMSJoB7Cr5AZefTMuw6qQRhcweMGoso8NFl20x90mVU8OIHdUAgv
|
| 6PgW1QsO5gjYxyALFZ95yY4FCUHu9z5zevOyMB8rq9BW/pvsi7FBaOT7w34Ev23p
|
| ks+ehBY0lzgGaORNY9MBVXzVkIvDj13/6yhbB0ZQ=
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
Authentication-Results: | sourceware.org; auth=none
|
X-Virus-Found: | No
|
X-Spam-SWARE-Status: | No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
|
X-HELO: | mail-vc0-f193.google.com
|
MIME-Version: | 1.0
|
X-Received: | by 10.52.78.5 with SMTP id x5mr28486561vdw.18.1413963483853; Wed, 22 Oct 2014 00:38:03 -0700 (PDT)
|
Date: | Wed, 22 Oct 2014 15:38:03 +0800
|
Message-ID: | <CAOzykZSxVNqgDW61CPx+Q5DaKvSyyDKhR0G1P5vv4oRdH4J_Og@mail.gmail.com>
|
Subject: | Question about porting eCAP
|
From: | DongMing Huang <lionxyes AT gmail DOT com>
|
To: | cygwin AT cygwin DOT com
|
X-IsSubscribed: | yes
|
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 AT DDD-PC /usr/local/lib
$ ls
libecap.a libecap.la pkgconfig
DDD AT DDD-PC /usr/local/lib
$ cd pkgconfig/
DDD AT DDD-PC /usr/local/lib/pkgconfig
$ ls
libecap.pc
HDM AT 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 AT 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 AT gmail DOT 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
- Raw text -