From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Todd Newsgroups: gmane.lisp.guile.devel Subject: building cvs guile on Mac OS X 10.4 Date: Sun, 8 May 2005 02:36:01 -0500 Message-ID: <6B73DD52-DE68-457F-AFAA-A353CED78052@mac.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v728) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1115537935 1874 80.91.229.2 (8 May 2005 07:38:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 8 May 2005 07:38:55 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun May 08 09:38:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DUgNH-0007c1-1X for guile-devel@m.gmane.org; Sun, 08 May 2005 09:38:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUgVM-0002PU-0i for guile-devel@m.gmane.org; Sun, 08 May 2005 03:47:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DUgU3-00028P-5R for guile-devel@gnu.org; Sun, 08 May 2005 03:45:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DUgU1-00027j-G8 for guile-devel@gnu.org; Sun, 08 May 2005 03:45:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUgTm-0001nW-O6 for guile-devel@gnu.org; Sun, 08 May 2005 03:45:34 -0400 Original-Received: from [66.171.59.140] (helo=smtp.vzavenue.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DUgQf-0002zD-Au for guile-devel@gnu.org; Sun, 08 May 2005 03:42:22 -0400 Original-Received: from [10.0.1.3] (247.157.171.66.subscriber.vzavenue.net [66.171.157.247]) by smtp.vzavenue.net (MOS 3.4.8-GR) with ESMTP id CEL68579; Sun, 8 May 2005 03:36:03 -0400 (EDT) Original-To: guile-devel@gnu.org X-Mailer: Apple Mail (2.728) X-Junkmail-Status: score=0/50, host=smtp.vzavenue.net X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:4965 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4965 I hadn't built guile from CVS in many months, so I wanted to give it a try on my fresh new OS X install, to see how much pain there would be. Here were the issues I ran across. Sorry to say that most of my workarounds are just that--workarounds. Someone that understands automake/autoconf better than me would need to find better solutions. Problem 1: ****** ./autogen.sh says something upfront like "I'm not going to use gettext", but then I get a complaint about AM_GNU_GETTEXT not being in the m4 library. So, first I tried installing gettext, and adding -I/usr/local/share/ aclocal to the aclocal call. That got me past the AM_GNU_GETTEXT problem, but later I got a complaint that I was using gettext, but 'po' wasn't in SUBDIRS. I decided that, rather than try to fix this, I'll comment out the AM_GNU_GETTEXT from configure.in. Problem 2.***** Libtoolize not found. Turns out OS X calls it glibtoolize, but nothing in ./autogen.sh figured this out. My solution: export LIBTOOLIZE=glibtoolize I assume there is a better solution. Problem 3:****** Mac OS X does not support recursive mutexes. Guile uses them. Just in case guile didn't depend on them being recursive, I changed the #define for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP so that it mapped to a normal, non-recursive mutex. This compiled, but guile hung, and while I didn't bother looking, I assume it was deadlocked. So, I gave up and compiled out threading. temp. solution: ./configure --without-threads I looked around google, and other OS X ports have hit this problem. Looks like some of them may have implemented their own recursive locks. Problem 4:****** Lots of compile warnings, and by default guile is building with - Werror. I can't believe all of these are OS X-specific. But, maybe so... So, simply assuming that the code must be right, I added casts everywhere there was a complaint. I made a point of writing most of them down: gh_data.c line 131 cast to scm_t_int8 * hash.c line 114 cast first arg to const unsigned char * load.c 377 dropped the' >= 1' that seemed extraneous... rdelim.c 207 set slen to 0 so it wouldn't be uninitialized srfi-13.c 2476 cast return of scm_i_writable_chars to (unsigned char*) strports.c 109 cast dst to (unsigned char *) 297 changed cast to (unsigned char *) unif.c 2701 cast &rank to (ssize_t *) socket.c several more (most involving addr_len) Problem 5:****** OS X has a /usr/include/readline/readline.h which is not GNU readline, and is not source-compatible with GNU readline. So, I got compile errors. I installed GNU readline (had to make one change to their package which I emailed to their mailing list), and changed Makefile.am in guile-readline to point to /usr/local/include and /usr/local/lib. Obviously this isn't the right solution. I guess you would want ./ configure to figure out that the OS X version is not sufficient for guile to build. Problem 6.****** srfi/srfi-1.c line 1228 warning that elt may be used without being initialized. And indeed it looks like it could, if the 'goto' later in the function is invoked, but the for loop had never run. So, I made the declaration of 'SCM elt = 0' on the line above the for loop to make the compiler happy. If the case the compiler was worried about can actually happen, though, this change would not help any. END RESULT: I have built what appears to be a functional guile (minus threads). I haven't played with it much, but readline support does appear to work, and a couple scripts I tried ran without incident. If you need any more information, or would like me to try patches, I'd be happy to do that. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel