* Guile 1.8.4 build difficulties on old Linux
@ 2008-04-26 13:11 Alain Guibert
2008-04-26 19:58 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Alain Guibert @ 2008-04-26 13:11 UTC (permalink / raw)
To: bug-guile
[-- Attachment #1: Type: text/plain, Size: 4561 bytes --]
Hello gentlemen,
On my old Linux box (Intel Pentium 200 MMX, Debian Bo 1.3.1,
kernel 2.0.40, gcc 2.7.2.1, libc 5.4.33, GNU ld cygnus-2.7.1,
libiconv 1.12, pth 2.0.7, gettext 0.17, i586-pc-linux-gnulibc1,
autoconf 2.62, fileutils 3.16, Make 3.75, bash 2.0.0(1)), gmp 4.2.2,
there were some difficulties while building guile 1.8.4:
| $ ./configure
| [...]
| checking for __gmpz_init in -lgmp... no
| configure: error: GNU MP not found, see README
Indeed this distribution has its original old gmp 2.0.2 as
/usr/lib/libgmp.so.2.0.2, which has no __gmpz_init (but a mpz_init).
The gmp 4.2.2 built from source as /usr/local/lib/libgmp.so.3.4.2 is not
checked automatically. Problem workaround by presetting LDFLAGS.
| $ LDFLAGS="-L/usr/local/lib" ./configure
| $ make
| [...]
| gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -g -O2 -Wall -Wmissing-prototypes -Werror -c alist.c -Wp,-MD,.deps/libguile_la-alist.TPlo -fPIC -DPIC -o .libs/libguile_la-alist.o
| cc1: warnings being treated as errors
| In file included from ../libguile/pthread-threads.h:28,
| from ../libguile/threads.h:33,
| from ../libguile/gc.h:28,
| from ../libguile/_scm.h:50,
| from alist.c:20:
| /usr/local/include/pthread.h:194: warning: empty declaration
| make[3]: *** [libguile_la-alist.lo] Error 1
| make[3]: Leaving directory `/tmp/guile-1.8.4/libguile'
| make[2]: *** [all] Error 2
| make[2]: Leaving directory `/tmp/guile-1.8.4/libguile'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/tmp/guile-1.8.4'
| make: *** [all] Error 2
Line 194 of pthread.h (of Gnu PTH 2.0.7) is "typedef int socklen_t;",
the platform doesn't have socklen_t otherwise. Problem workaround by
--disable-error-on-warning.
| $ LDFLAGS="-L/usr/local/lib" ./configure --disable-error-on-warning
| $ make
| [...]
| gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -g -O2 -Wall -Wmissing-prototypes -c read.c -Wp,-MD,.deps/libguile_la-read.TPlo -fPIC -DPIC -o .libs/libguile_la-read.o
| In file included from ../libguile/pthread-threads.h:28,
| from ../libguile/threads.h:33,
| from ../libguile/gc.h:28,
| from ../libguile/_scm.h:50,
| from read.c:33:
| /usr/local/include/pthread.h:194: warning: empty declaration
| read.c: In function `scm_read_sexp':
| read.c:321: parse error before `static'
| read.c:329: `terminating_char' undeclared (first use this function)
| read.c:329: (Each undeclared identifier is reported only once
| read.c:329: for each function it appears in.)
| read.c:390: `line' undeclared (first use this function)
| read.c:390: `column' undeclared (first use this function)
| make[3]: *** [libguile_la-read.lo] Error 1
| make[3]: Leaving directory `/tmp/guile-1.8.4/libguile'
| make[2]: *** [all] Error 2
| make[2]: Leaving directory `/tmp/guile-1.8.4/libguile'
| make[1]: *** [all-recursive] Error 1
| make[1]: Leaving directory `/tmp/guile-1.8.4'
| make: *** [all] Error 2
Line 320 of libguile/read.c ends by two semi-colons, the attached
bug-double-semicolon.patch should fix it.
At this stage Guile builds and passes the tests succesfully. However
there is an incompatibility between --without-threads and "make check":
| $ LDFLAGS="-L/usr/local/lib" ./configure --disable-error-on-warning --without-threads
| $ make
| $ make check
| [...]
| gcc -I../../test-suite/standalone -I../.. -g -O2 -Wall -Wmissing-prototypes -o .libs/test-with-guile-module test_with_guile_module-test-with-guile-module.o -L/usr/local/lib ../../libguile/.libs/libguile.so /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lc /usr/local/lib/libgmp.so -lm /usr/local/lib/libltdl.so -ldl -Wl,--rpath -Wl,/usr/local/lib
| test_with_guile_module-test-with-guile-module.o: In function `do_join':
| /tmp/guile-1.8.4/test-suite/standalone/test-with-guile-module.c:32: undefined reference to `pthread_join'
| test_with_guile_module-test-with-guile-module.o: In function `inner_main':
| /tmp/guile-1.8.4/test-suite/standalone/test-with-guile-module.c:41: undefined reference to `pthread_create'
| make[4]: *** [test-with-guile-module] Error 1
| make[4]: Leaving directory `/tmp/guile-1.8.4/test-suite/standalone'
| make[3]: *** [check-am] Error 2
| make[3]: Leaving directory `/tmp/guile-1.8.4/test-suite/standalone'
| make[2]: *** [check] Error 2
| make[2]: Leaving directory `/tmp/guile-1.8.4/test-suite/standalone'
| make[1]: *** [check-recursive] Error 1
| make[1]: Leaving directory `/tmp/guile-1.8.4/test-suite'
| make: *** [check-recursive] Error 1
Alain.
[-- Attachment #2: bug-double-semicolon.patch --]
[-- Type: text/plain, Size: 464 bytes --]
--- guile-1.8.4.orig/libguile/read.c Thu Feb 7 10:13:17 2008
+++ guile-1.8.4/libguile/read.c Sat Apr 26 12:06:38 2008
@@ -317,7 +317,7 @@ scm_read_sexp (int chr, SCM port)
register int c;
register SCM tmp;
register SCM tl, ans = SCM_EOL;
- SCM tl2 = SCM_EOL, ans2 = SCM_EOL, copy = SCM_BOOL_F;;
+ SCM tl2 = SCM_EOL, ans2 = SCM_EOL, copy = SCM_BOOL_F;
static const int terminating_char = ')';
/* Need to capture line and column numbers here. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Guile 1.8.4 build difficulties on old Linux
2008-04-26 13:11 Guile 1.8.4 build difficulties on old Linux Alain Guibert
@ 2008-04-26 19:58 ` Ludovic Courtès
2008-05-01 9:11 ` Neil Jerram
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2008-04-26 19:58 UTC (permalink / raw)
To: bug-guile
Hi Alain,
Alain Guibert <alguibert+bts@free.fr> writes:
> | $ ./configure
> | [...]
> | checking for __gmpz_init in -lgmp... no
> | configure: error: GNU MP not found, see README
>
> Indeed this distribution has its original old gmp 2.0.2 as
> /usr/lib/libgmp.so.2.0.2, which has no __gmpz_init (but a mpz_init).
> The gmp 4.2.2 built from source as /usr/local/lib/libgmp.so.3.4.2 is not
> checked automatically. Problem workaround by presetting LDFLAGS.
It's not a workaround, it's the proper way to let `configure' know. :-)
> Line 194 of pthread.h (of Gnu PTH 2.0.7) is "typedef int socklen_t;",
> the platform doesn't have socklen_t otherwise. Problem workaround by
> --disable-error-on-warning.
Isn't that a GNU Pth problem (that its header contains an "empty
declaration")?
> Line 320 of libguile/read.c ends by two semi-colons, the attached
> bug-double-semicolon.patch should fix it.
Thanks, applied.
> | $ make check
> | [...]
> | gcc -I../../test-suite/standalone -I../.. -g -O2 -Wall -Wmissing-prototypes -o .libs/test-with-guile-module test_with_guile_module-test-with-guile-module.o -L/usr/local/lib ../../libguile/.libs/libguile.so /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lc /usr/local/lib/libgmp.so -lm /usr/local/lib/libltdl.so -ldl -Wl,--rpath -Wl,/usr/local/lib
> | test_with_guile_module-test-with-guile-module.o: In function `do_join':
> | /tmp/guile-1.8.4/test-suite/standalone/test-with-guile-module.c:32: undefined reference to `pthread_join'
> | test_with_guile_module-test-with-guile-module.o: In function `inner_main':
> | /tmp/guile-1.8.4/test-suite/standalone/test-with-guile-module.c:41: undefined reference to `pthread_create'
> | make[4]: *** [test-with-guile-module] Error 1
> | make[4]: Leaving directory `/tmp/guile-1.8.4/test-suite/standalone'
> | make[3]: *** [check-am] Error 2
> | make[3]: Leaving directory `/tmp/guile-1.8.4/test-suite/standalone'
> | make[2]: *** [check] Error 2
> | make[2]: Leaving directory `/tmp/guile-1.8.4/test-suite/standalone'
> | make[1]: *** [check-recursive] Error 1
> | make[1]: Leaving directory `/tmp/guile-1.8.4/test-suite'
> | make: *** [check-recursive] Error 1
I've fixed it as well: this test is no longer built when pthread support
is disabled.
Thanks!
Ludovic.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Guile 1.8.4 build difficulties on old Linux
2008-04-26 19:58 ` Ludovic Courtès
@ 2008-05-01 9:11 ` Neil Jerram
0 siblings, 0 replies; 3+ messages in thread
From: Neil Jerram @ 2008-05-01 9:11 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: bug-guile
ludo@gnu.org (Ludovic Courtès) writes:
>> Line 194 of pthread.h (of Gnu PTH 2.0.7) is "typedef int socklen_t;",
>> the platform doesn't have socklen_t otherwise. Problem workaround by
>> --disable-error-on-warning.
>
> Isn't that a GNU Pth problem (that its header contains an "empty
> declaration")?
How is "typedef int socklen_t;" an empty declaration, anyway? It
looks like a normal typedef to me.
Regards,
Neil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-01 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-26 13:11 Guile 1.8.4 build difficulties on old Linux Alain Guibert
2008-04-26 19:58 ` Ludovic Courtès
2008-05-01 9:11 ` Neil Jerram
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).