Mail Archives: cygwin-apps/2001/10/12/10:51:23
--Message-Boundary-17932
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body
> Gerrit P. Haase schrieb am 2001-10-12 14:08:
>But we will figure out how to build them:)
I attached my logfile, so the patches gets not damaged
because of wordwraps.
Gerrit
--
=^..^=
--Message-Boundary-17932
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'curl.comprex.leakbug.log'
Building cURL & libcurl plus leakbug & libcomprex on Cygwin
with shared libraries using libtool and recent autotools.
So I did it now:
================
I installed the current release of libtool (builds OOTB)
and I have installed the latest autoconf and automake versions
that come with cygwin's netrelease plus all the other recent
devel stuff like binutils.
In the curl-src topdir I started:
I modified some files:
======================
$ diff -ur curl-7.9-src curl-7.9
diff -ur curl-7.9-src/configure.in curl-7.9/configure.in
--- curl-7.9-src/configure.in Wed Sep 12 13:31:58 2001
+++ curl-7.9/configure.in Fri Oct 12 14:25:05 2001
@@ -37,7 +37,7 @@
dnl check for how to do large files
AC_SYS_LARGEFILE
-
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
dnl The install stuff has already been taken care of by the automake stuff
diff -ur curl-7.9-src/lib/Makefile.am curl-7.9/lib/Makefile.am
--- curl-7.9-src/lib/Makefile.am Tue Aug 28 10:58:27 2001
+++ curl-7.9/lib/Makefile.am Fri Oct 12 14:25:14 2001
@@ -16,7 +16,7 @@
INCLUDES = -I$(top_srcdir)/include
-libcurl_la_LDFLAGS = -version-info 2:2:0
+libcurl_la_LDFLAGS = -no-undefined -version-info 2:2:0
# This flag accepts an argument of the form current[:revision[:age]]. So,
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
# 1.
I run a bootstrap script:
=========================
#! /bin/sh
aclocal
autoheader
libtoolize --force --copy
automake --foreign --copy
autoconf
Then, as usual:
===============
./configure --prefix=/where/you/like/it 2>&1 | tee log.configure
make 2>&1 | tee log.make
make test 2>&1 | tee log.test
make install 2>&1 | tee log.install
Et voila, we get a shared libcurl:
==================================
$ ll
total 2374
drwxr-xr-x 2 Gerrit Administ 4096 Oct 12 14:44 ./
drwxr-xr-x 3 Gerrit Administ 4096 Oct 12 14:38 ../
-rwxr-xr-x 1 Gerrit Administ 104960 Oct 12 14:43 curl-nostrip.exe*
-rwxr-xr-x 1 Gerrit Administ 104960 Oct 12 14:44 curl.exe*
-rwxr-xr-x 1 Gerrit Administ 1522600 Oct 12 14:43 cygcurl-2-nostrip.dll*
-rwxr-xr-x 1 Gerrit Administ 688640 Oct 12 14:43 cygcurl-2.dll*
Now, to test it, I try to build a package which depends on it:
==============================================================
libcomprex is from here: http://www.gnupdate.org/
It seems to depend on some stuff from leakbug:
http://www.gnupdate.org/components/leakbug/index.xml
so I build this first:
======================
$ tar zxvf leakbug-0.1.3.tar.gz
Change here as well to get a .dll:
==================================
$ diff -ur leakbug-0.1.3-src/ leakbug-0.1.3/
diff -ur leakbug-0.1.3-src/configure.ac leakbug-0.1.3/configure.ac
--- leakbug-0.1.3-src/configure.ac Mon Aug 13 19:46:14 2001
+++ leakbug-0.1.3/configure.ac Fri Oct 12 15:33:33 2001
@@ -60,9 +60,9 @@
dnl # Check for some standard stuff.
dnl ################################################################
AC_LIBTOOL_DLOPEN
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_CC
-AC_ARG_PROGRAM
AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_LN_S
diff -ur leakbug-0.1.3-src/libleakbug/Makefile.am leakbug-0.1.3/libleakbug/Makefile.am
--- leakbug-0.1.3-src/libleakbug/Makefile.am Sun Mar 4 23:15:36 2001
+++ leakbug-0.1.3/libleakbug/Makefile.am Fri Oct 12 15:33:03 2001
@@ -9,7 +9,7 @@
libleakbug_la_LIBADD =
libleakbug_la_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
INCLUDES = \
-I$(top_srcdir) \
==================================ENDE PATCH
We only need one of 'configure.ac' or 'configure.in',
deleting the older one, as well the old 'missing' script:
=========================================================
$ rm configure.in
$ rm missing
Run bootstrap:
==============
$ ./autogen.sh --prefix=/where/you/like/it
Make:
=====
$ make 2>&1 | tee log.make
$ make check 2>&1 | tee log.check
$ cp tests/.libs/leak1.exe libleakbug/.libs
$ cd libleakbug/.libs
$ ./leak1
int_ptr1 = 42
int_ptr2 = 10
str1 = Hello World!
str2 = Hello World!
Reallocating str1 to 15 bytes...
str1 = Hello World!!
<LB> WARNING: Freeing unknown memory (0x22fea8) at leak1.c, line 61
<LB> Displaying leaked memory:
<LB> leak1.c:35 - 0x100c0198 (4 bytes)
<LB> leak1.c:48 - 0x100c0240 (13 bytes)
Wow, that looks nice:-) Lets install it:
$ cd ../..
$ make install 2>&1 | tee log.install
$ cd ..
Now build libcomprex:
=====================
$ tar zxvf libcomprex-0.1.0.tar.gz
I changed here also a little bit:
=================================
$ diff -ur libcomprex-0.1.0-src/ libcomprex-0.1.0/
diff -ur libcomprex-0.1.0-src/configure.ac libcomprex-0.1.0/configure.ac
--- libcomprex-0.1.0-src/configure.ac Thu Aug 23 23:16:46 2001
+++ libcomprex-0.1.0/configure.ac Fri Oct 12 15:06:52 2001
@@ -71,7 +71,7 @@
AM_ENABLE_SHARED
AC_LIBTOOL_DLOPEN
-
+AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_CONFIG_SUBDIRS(libltdl)
@@ -86,7 +86,6 @@
dnl # Check for some standard stuff.
dnl ################################################################
AC_PROG_CC
-AC_ARG_PROGRAM
AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_LN_S
diff -ur libcomprex-0.1.0-src/libcomprex/Makefile.am libcomprex-0.1.0/libcomprex/Makefile.am
--- libcomprex-0.1.0-src/libcomprex/Makefile.am Thu Aug 23 22:41:41 2001
+++ libcomprex-0.1.0/libcomprex/Makefile.am Fri Oct 12 15:07:04 2001
@@ -23,7 +23,7 @@
libcomprex_la_LIBADD = @DLLDFLAGS@ $(LIBLTDL)
libcomprex_la_LDFLAGS = \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
INCLUDES = \
-I$(top_srcdir) \
diff -ur libcomprex-0.1.0-src/modules/file/ar/Makefile.am libcomprex-0.1.0/modules/file/ar/Makefile.am
--- libcomprex-0.1.0-src/modules/file/ar/Makefile.am Thu Aug 23 23:16:46 2001
+++ libcomprex-0.1.0/modules/file/ar/Makefile.am Fri Oct 12 15:59:52 2001
@@ -9,7 +9,7 @@
ar.h \
gethead.c
-ar_la_LIBADD = -L$(top_builddir)/libcomprex/.libs -lcomprex
+ar_la_LIBADD = -L$(top_builddir)/libcomprex -lcomprex
ar_la_LDFLAGS = -no-undefined -module -avoid-version
INCLUDES = \
diff -ur libcomprex-0.1.0-src/modules/file/bzip2/Makefile.am libcomprex-0.1.0/modules/file/bzip2/Makefile.am
--- libcomprex-0.1.0-src/modules/file/bzip2/Makefile.am Thu Jun 14 06:35:39 2001
+++ libcomprex-0.1.0/modules/file/bzip2/Makefile.am Fri Oct 12 15:59:49 2001
@@ -5,7 +5,7 @@
file_LTLIBRARIES = bzip2.la
bzip2_la_SOURCES = bzip2.c
-bzip2_la_LIBADD = -L$(top_builddir)/libcomprex/.libs -lcomprex -lbz2
+bzip2_la_LIBADD = -L$(top_builddir)/libcomprex -lcomprex -lbz2
bzip2_la_LDFLAGS = -no-undefined -module -avoid-version
INCLUDES = \
diff -ur libcomprex-0.1.0-src/modules/file/zlib/Makefile.am libcomprex-0.1.0/modules/file/zlib/Makefile.am
--- libcomprex-0.1.0-src/modules/file/zlib/Makefile.am Sun Jun 3 11:47:36 2001
+++ libcomprex-0.1.0/modules/file/zlib/Makefile.am Fri Oct 12 15:59:46 2001
@@ -5,7 +5,7 @@
file_LTLIBRARIES = zlib.la
zlib_la_SOURCES = zlib.c
-zlib_la_LIBADD = -L$(top_builddir)/libcomprex/.libs -lcomprex -lz
+zlib_la_LIBADD = -L$(top_builddir)/libcomprex -lcomprex -lz
zlib_la_LDFLAGS = -no-undefined -module -avoid-version
INCLUDES = \
diff -ur libcomprex-0.1.0-src/modules/scheme/curl/Makefile.am libcomprex-0.1.0/modules/scheme/curl/Makefile.am
--- libcomprex-0.1.0-src/modules/scheme/curl/Makefile.am Sun Jun 3 11:47:38 2001
+++ libcomprex-0.1.0/modules/scheme/curl/Makefile.am Fri Oct 12 16:05:06 2001
@@ -5,7 +5,7 @@
scheme_LTLIBRARIES = curl.la
curl_la_SOURCES = curl.c
-curl_la_LIBADD = -L$(top_builddir)/libcomprex/.libs -lcomprex -lcurl
+curl_la_LIBADD = -L$(top_builddir)/libcomprex -lcomprex -lcurl
curl_la_LDFLAGS = -no-undefined -module -avoid-version
INCLUDES = \
==================================ENDE PATCH
$ cd libcomprex-0.1.0/
There are to configure templates, configure.in and configure.ac,
we don't need configure.in, so remove it:
$ rm configure.in
There comes a 'bootstrap' script with this piece of software, it is
called 'autogen.sh'. Call this, there will be executed configure at
last step of the bootstrap.
$ ./autogen.sh --prefix=/where/you/like/it
Now we are getting an error, I'm not sure about this, is it a bug
in libtool or what it is:
===
ltconfig: you must specify a host type if you use `--no-verify'
Try `ltconfig --help' for more information.
configure: error: libtool configure failed
===
Now remove '--no-verify' from configure (if you get this error too):
====================================================================
$ diff -ur configure.orig configure
--- configure.orig Fri Oct 12 15:11:19 2001
+++ configure Fri Oct 12 15:12:37 2001
@@ -2735,7 +2735,7 @@
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags $ac_aux_dir/ltmain.sh $lt_target \
|| { { echo "$as_me:2739: error: libtool configure failed" >&5
echo "$as_me: error: libtool configure failed" >&2;}
{ (exit 1); exit 1; }; }
=================================ENDE PATCH
Run configure again:
====================
$ ./configure --prefix=/where/you/like/it 2>&1 | tee log.configure
Now it goes on.
$ make 2>&1 | tee log.make
$ make install 2>&1 | tee log.install
To make sure this is working right, type:
$ cd tests/.libs
$ ./decomprex ../file2.txt.gz
---
Filename: file2.txt
---
Once upon a midnight dreary, while I
pondered, weak and weary,
Over many a quaint and curious volume
of forgotten lore--
While I nodded, nearly napping,
suddenly there came a tapping,
As of some one gently rapping, rapping
at my chamber door.
"'Tis some visitor," I muttered,
"tapping at my chamber door--
Only this and nothing more."
Ah, distinctly I remember it was in the
bleak December;
And each separate dying ember wrought
its ghost upon the floor.
Eagerly I wished the morrow; --vainly I
had sought to borrow
From my books surcease of sorrow--
sorrow for the lost Lenore--
For the rare and radiant maiden whom
the angels name Lenore--
Nameless here for evermore.
And the silken, sad, uncertain rustling
of each purple curtain
Thrilled me--filled me with fantastic
terrors never felt before;
So that now, to still the beating of my
heart, I stood repeating
"'Tis some visitor entreating entrance
at my chamber door--
Some late visitor entreating entrance
at my chamber door; --
This it is and nothing more."
Done.
Gerrit P. Haase, <gerrit at familiehaase.de>, 2001-10-12
--Message-Boundary-17932--
- Raw text -