[elinks-users] Unable to compile ELinks v0.9.2 under MacOS X 10.2.8.

Jonas Fonseca fonseca at diku.dk
Thu Oct 14 07:44:32 PDT 2004


Phillip Pi <ant at zimage.com> wrote Mon, Oct 11, 2004:
> Hello.

Hello Phillip and sorry for the long delay.

> I am having problems compiling ELinks v0.9.2 with make command in MacOS X
> 10.2.8 (all updates):
> 
> gcc: unrecognized option `-rdynamic'
> ld: warning empty table of contents: scripting/libscripting.a (can't load 
> from it)
> ld: warning empty table of contents: scripting/guile/libscriptingguile.a 
> (can't load from it)
> ld: warning empty table of contents: scripting/lua/libscriptinglua.a 
> (can't load from it)

I assume these warnings do not pose a problem. Anyway they are fixed in
the unstable 0.10 branch.

> ld: Undefined symbols:
> _BZ2_bzRead
> _BZ2_bzReadClose
> _BZ2_bzReadOpen

I kind of realized this after releasing 0.9.2 but did everything I could
to ignore it ;-) and the stupid thing is that it was fixed ages ago in
the 0.10 branch. I have attached a patch that should fix the link
failure.

-- 
Jonas Fonseca
-------------- next part --------------
? next.patch
Index: src/encoding/encoding.c
===================================================================
RCS file: /home/cvs/elinks/elinks/src/encoding/encoding.c,v
retrieving revision 1.27.2.1
diff -u -d -p -r1.27.2.1 encoding.c
--- src/encoding/encoding.c	29 Jul 2004 10:25:49 -0000	1.27.2.1
+++ src/encoding/encoding.c	14 Oct 2004 14:34:51 -0000
@@ -94,7 +94,7 @@ static struct decoding_backend dummy_dec
   Gzip encoding (ENCODING_GZIP)
 *************************************************************************/
 
-#ifdef HAVE_ZLIB_H
+#ifdef HAVE_LIBZ
 
 static int
 gzip_open(struct stream_encoded *stream, int fd)
@@ -143,7 +143,7 @@ static struct decoding_backend gzip_deco
   Bzip2 encoding (ENCODING_BZIP2)
 *************************************************************************/
 
-#ifdef HAVE_BZLIB_H
+#ifdef HAVE_LIBBZ2
 
 struct bz2_enc_data {
 	FILE *file;
@@ -231,12 +231,12 @@ static struct decoding_backend bzip2_dec
 
 static struct decoding_backend *decoding_backends[] = {
 	&dummy_decoding_backend,
-#ifdef HAVE_ZLIB_H
+#ifdef HAVE_LIBZ
 	&gzip_decoding_backend,
 #else
 	&dummy_decoding_backend,
 #endif
-#ifdef HAVE_BZLIB_H
+#ifdef HAVE_LIBBZ2
 	&bzip2_decoding_backend,
 #else
 	&dummy_decoding_backend,
Index: src/modules/version.c
===================================================================
RCS file: /home/cvs/elinks/elinks/src/modules/version.c,v
retrieving revision 1.28
diff -u -d -p -r1.28 version.c
--- src/modules/version.c	1 Jan 2004 16:34:41 -0000	1.28
+++ src/modules/version.c	14 Oct 2004 14:34:51 -0000
@@ -96,10 +96,10 @@ get_dyn_full_version(struct terminal *te
 #ifdef IPV6
 		comma, "IPv6",
 #endif
-#ifdef HAVE_ZLIB_H
+#ifdef HAVE_LIBZ
 		comma, "gzip",
 #endif
-#ifdef HAVE_BZLIB_H
+#ifdef HAVE_LIBBZ2
 		comma, "bzip2",
 #endif
 #ifndef CONFIG_MOUSE
Index: src/protocol/http/http.c
===================================================================
RCS file: /home/cvs/elinks/elinks/src/protocol/http/http.c,v
retrieving revision 1.233.2.2
diff -u -d -p -r1.233.2.2 http.c
--- src/protocol/http/http.c	22 Sep 2004 15:48:45 -0000	1.233.2.2
+++ src/protocol/http/http.c	14 Oct 2004 14:34:51 -0000
@@ -487,15 +487,15 @@ http_send_header(struct connection *conn
 	add_to_string(&header, "Accept: */*\r\n");
 
 	/* TODO: Make this encoding.c function. */
-#if defined(HAVE_BZLIB_H) || defined(HAVE_ZLIB_H)
+#if defined(HAVE_LIBBZ2) || defined(HAVE_LIBZ)
 	add_to_string(&header, "Accept-Encoding: ");
 
-#ifdef HAVE_BZLIB_H
+#ifdef HAVE_LIBBZ2
 	add_to_string(&header, "bzip2");
 #endif
 
-#ifdef HAVE_ZLIB_H
-#ifdef HAVE_BZLIB_H
+#ifdef HAVE_LIBZ
+#ifdef HAVE_LIBBZ2
 	add_to_string(&header, ", ");
 #endif
 	add_to_string(&header, "gzip");
@@ -1386,12 +1386,12 @@ http_error:
 		/* If the content is encoded, we want to preserve the encoding
 		 * if it is implied by the extension, so that saving the URI
 		 * will leave the saved file with the correct encoding. */
-#ifdef HAVE_ZLIB_H
+#ifdef HAVE_LIBZ
 		if ((!strcasecmp(d, "gzip") || !strcasecmp(d, "x-gzip"))
 		    && file_encoding != ENCODING_GZIP)
 			conn->content_encoding = ENCODING_GZIP;
 #endif
-#ifdef HAVE_BZLIB_H
+#ifdef HAVE_LIBBZ2
 		if ((!strcasecmp(d, "bzip2") || !strcasecmp(d, "x-bzip2"))
 		    && file_encoding != ENCODING_BZIP2)
 			conn->content_encoding = ENCODING_BZIP2;


More information about the elinks-users mailing list