pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lang/guile configure fails on Darwin



The package lang/guile on the pkgsrc current branch fails in the
configure target for me on Darwin (Mac OS X 10.8.4).  A snippet of the
"bmake install clean clean-depends" output is as follows:

===
checking for i386-apple-darwin12-gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in 
`/pkgsrc/lang/guile/work/guile-1.8.8':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
*** Error code 1

Stop.
bmake: stopped in /pkgsrc/lang/guile
*** Error code 1

Stop.
bmake: stopped in /pkgsrc/lang/guile
===

Looking in work/guile-1.8.8/config.log, I see things like the following:

===
configure:4139: checking whether we are cross compiling
configure:4147: clang -o conftest -pipe -O2 -I/pkg/include -I/usr/include 
-D_REENTRANT -Dmacosx -I/pkg/include -I/usr/include -D_REENTRANT -L/pkg/lib 
-L/usr/lib conftest.c -lpthread >&5
In file included from conftest.c:9:
/usr/include/stdio.h:446:67: error: expected a platform name, e.g., 'macosx'
int     dprintf(int, const char * __restrict, ...) __printflike(2, 3) 
__OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3);
                                                                      ^
/usr/include/Availability.h:153:50: note: expanded from macro 
'__OSX_AVAILABLE_STARTING'
    #define __OSX_AVAILABLE_STARTING(_osx, _ios) __AVAILABILITY_INTERNAL##_osx
                                                 ^
<scratch space>:13:1: note: expanded from macro '__AVAILABILITY_INTERNAL'
__AVAILABILITY_INTERNAL__MAC_10_7
^
/usr/include/AvailabilityInternal.h:1095:100: note: expanded from macro 
'__AVAILABILITY_INTERNAL__MAC_10_7'
            #define __AVAILABILITY_INTERNAL__MAC_10_7                  
__attribute__((availability(macosx,introduced=10.7)))
                                                                                
                   ^
<command line>:2:16: note: expanded from macro 'macosx'
#define macosx 1
               ^
===

Based on this and some Web searches, it would seem that Darwin expects
the "macosx" macro to be set to a "platform name" rather than 1.  What's
setting macosx to 1?  The Makefile.  If I modify lang/guile/Makefile to
not set the macosx macro to 1, it configures (and builds and installs)
fine.

Attached is a trivial patch.  This fixes my problem, but it seems likely
the macosx macro was added for a reason at some point in the past.  So,
either it should just be removed, or maybe some kind of conditional test
on the Darwin version needs to be performed to keep it set for older
versions of Darwin (?).

Thanks,

Lewis
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/guile/Makefile,v
retrieving revision 1.101
diff -b -u -r1.101 Makefile
--- Makefile    15 Jul 2013 02:02:23 -0000      1.101
+++ Makefile    5 Sep 2013 21:24:32 -0000
@@ -53,8 +53,6 @@
 .endif
 
 .if ${OPSYS} == "Darwin"
-CPPFLAGS+=             -Dmacosx
-
 # Darwin does not use -rpath, so back out the patch that adds it.  It
 # is not clear that guile works properly if directories with modules
 # are not in LTDL_LIBRARY_PATH or LD_LIBRARY_PATH.  See the following


Home | Main Index | Thread Index | Old Index