[Privoxy-devel] Improving Privoxy packages for Windows

Lee ler762 at gmail.com
Mon Jan 11 19:57:45 UTC 2021


On 1/11/21, Fabian Keil <fk at fabiankeil.de> wrote:
> Lee <ler762 at gmail.com> wrote on 2021-01-07:
>
>> On 1/7/21, Fabian Keil <fk at fabiankeil.de> wrote:
>> > Lee <ler762 at gmail.com> wrote on 2020-12-27:
>> >
>> >> On 12/14/20, Lee <ler762 at gmail.com> wrote:
>> >> > On 12/13/20, Fabian Keil <fk at fabiankeil.de> wrote:
>> >> >> Lee <ler762 at gmail.com> wrote on 2020-12-12:
>> >> >>
>> >> >>> On 12/12/20, Fabian Keil <fk at fabiankeil.de> wrote:
>> >> >>> > Fabian Keil <fk at fabiankeil.de> wrote on 2020-11-19:
>> >> >>> >
>> >> >>> > Maybe we should try to get Privoxy into the MSYS2 distribution.
>> >> >>>
>> >> >>> I can give it a try.
>> >> >>
>> >> >> Awesome.
>> >> >
>> >> > It isn't going to be a trivial port :(
>> >>
>> >> To close out this thread, I gave up on porting Privoxy to MSYS2 & went
>> >> back to Cygwin.
>> >
>> > I'm sorry to hear that. It looked so promising. Oh well ...
>>
>> Yes, MSYS2 looks really good.  But it has a learning curve -- which
>> maybe might not be too bad, but it also seems to be missing some bits
>> for processing docbook.  If I have to keep the cygwin build system
>> around for docbook the MSYS2 build system looks a lot less attractive.
>>
>> My latest puzzler with a cygwin build is why I get a bunch of errors with
>>   ./configure --with-brotli
>>
>> O got the brotli source code from from
>>   https://github.com/google/brotli/releases/tag/v1.0.9
>> and built with
>>
>> ./bootstrap
>> autoconf
>> export CFLAGS="-O2"
>> ./configure  --host=i686-w64-mingw32 \
>>              --prefix=/usr/local/i686-w64-mingw32 \
>>              --enable-static   \
>>              --disable-shared  \
>>              --with-gnu-ld     \
>>              --disable-silent-rules \
>>   && make
>
> Why do you disable shared libraries?

Because I don't know how to build them.

If I make both shared and static libraries the build complains about

/bin/sh ./libtool  --tag=CC   --mode=link i686-w64-mingw32-gcc
-I./c/include -O2  -version-info 1:9:0   -o libbrotlienc.la -rpath
/usr/local/i686-w64-mingw32/lib c/enc/backward_references.lo
c/enc/backward_references_hq.lo c/enc/bit_cost.lo
c/enc/block_splitter.lo c/enc/brotli_bit_stream.lo c/enc/cluster.lo
c/enc/command.lo c/enc/compress_fragment.lo
c/enc/compress_fragment_two_pass.lo c/enc/dictionary_hash.lo
c/enc/encode.lo c/enc/encoder_dict.lo c/enc/entropy_encode.lo
c/enc/fast_log.lo c/enc/histogram.lo c/enc/literal_cost.lo
c/enc/memory.lo c/enc/metablock.lo c/enc/static_dict.lo
c/enc/utf8_util.lo  libbrotlicommon.la -lm

*** Warning: This system cannot link to static lib archive libbrotlicommon.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.
libtool: warning: undefined symbols not allowed in i686-w64-mingw32
shared libraries; building static only

and if I try to build just the shared libraries:

./configure  --host=i686-w64-mingw32 \
             --prefix=/usr/local/i686-w64-mingw32 \
             --disable-static   \
             --enable-shared   \
             --with-gnu-ld     \
             --disable-silent-rules \
  && make

the build errors out:

/bin/sh ./libtool  --tag=CC   --mode=link i686-w64-mingw32-gcc
-I./c/include -O2  -version-info 1:9:0   -o libbrotlicommon.la -rpath
/usr/local/i686-w64-mingw32/lib c/common/constants.lo
c/common/context.lo c/common/dictionary.lo c/common/platform.lo
c/common/transform.lo
libtool:   error: can't build i686-w64-mingw32 shared library unless
-no-undefined is specified
make: *** [Makefile:695: libbrotlicommon.la] Error 1

Lee


>> The privoxy build dies with lots of errors like
>> i686-w64-mingw32-gcc -fstack-protector-strong -Wl,--nxcompat
>> -Wl,--dynamicbase,--export-all-symbols -L/source/pcre-8.44/.libs
>> -L/source/mbedtls-2.16.9/library -L/source/brotli-1.0.9/.libs -static
>> -mwindows -o privoxy.exe actions.o cgi.o cgiedit.o cgisimple.o
>> deanimate.o encode.o errlog.o filters.o gateway.o jbsockets.o jcc.o
>> list.o loadcfg.o loaders.o miscutil.o parsers.o ssplit.o urlmatch.o
>> client-tags.o  w32log.o w32taskbar.o win32.o w32svrapi.o w32.res
>> pcrs.o   ssl_common.o ssl.o  -lmbedtls -lmbedx509 -lmbedcrypto
>> -lws2_32  -lz -lpcre -lpcreposix -lbrotlidec -lwsock32 -lcomctl32
>> /usr/lib/gcc/i686-w64-mingw32/10/../../../../i686-w64-mingw32/bin/ld:
>> /source/brotli-1.0.9/.libs/libbrotlidec.a(decode.o):decode.c:(.text+0x831):
>> undefined reference to `_kBrotliPrefixCodeRanges'
>> /usr/lib/gcc/i686-w64-mingw32/10/../../../../i686-w64-mingw32/bin/ld:
>> /source/brotli-1.0.9/.libs/libbrotlidec.a(decode.o):decode.c:(.text+0x839):
>> undefined reference to `_kBrotliPrefixCodeRanges'
>>
>> but no errors if I do
>> $ git diff configure.in
>> diff --git a/configure.in b/configure.in
>> index 38a1bc07..b6101c69 100644
>> --- a/configure.in
>> +++ b/configure.in
>> @@ -1217,6 +1218,7 @@ AC_HELP_STRING([--without-brotli], [Disable
>> Brotli detection]),
>>  if test X"$WITH_BROTLI" != Xno; then
>>
>>    LIBS="$LIBS -lbrotlidec"
>> +  LIBS="$LIBS -lbrotlicommon -lbrotlienc"
>>
>>    AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress)
>>
>> Why does it seem like it's just me that needs to add "-lbrotlicommon
>> -lbrotlienc" ?
>
> I don't know either. I suppose we could add a:
>
>   if test $target_type = mingw; then
>     LIBS="$LIBS -lbrotlicommon -lbrotlienc"
>   fi
>
> block until this is solved.
>
> Fabian
>


More information about the Privoxy-devel mailing list