From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20130 invoked by alias); 22 Oct 2014 07:38:09 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 20118 invoked by uid 89); 22 Oct 2014 07:38:08 -0000 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 Received: from mail-vc0-f193.google.com (HELO mail-vc0-f193.google.com) (209.85.220.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 22 Oct 2014 07:38:06 +0000 Received: by mail-vc0-f193.google.com with SMTP id hq12so497295vcb.4 for ; Wed, 22 Oct 2014 00:38:04 -0700 (PDT) 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) Received: by 10.31.1.136 with HTTP; Wed, 22 Oct 2014 00:38:03 -0700 (PDT) Date: Wed, 22 Oct 2014 07:38:00 -0000 Message-ID: Subject: Question about porting eCAP From: DongMing Huang To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00327.txt.bz2 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