Bug #957
closedCannot build in OSX 10.5.6 using gcc4.0.1 or gcc4.2 due to issue with readline.h
Description
=begin
This is a duplicate of issue #902 but I can confirm my system state for Kouji.
using:
source from tarball for ruby-1.9.1-rc1
./configure --prefix=/usr/local --program-suffix=1.9 --enable-shared
or
./configure CC=gcc-4.2 --prefix=/usr/local --program-suffix=1.9 --enable-shared
XCode 3.1.2
OSX 10.5.6
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5490)
or
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc_42/gcc_42-5566~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5566)
Hardware Overview:
Model Name: MacBook
Model Identifier: MacBook5,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 3 MB
Memory: 2 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MB51.0073.B06
SMC Version: 1.32f8
local:ruby-1.9.1-rc1$ cat /usr/include/editline/readline.h
/* $NetBSD: readline.h,v 1.18 2006/08/21 12:45:30 christos Exp $ */
--snip--
char *tilde_expand(char *);
char *filename_completion_function(const char *, int);
char *username_completion_function(const char *, int);
int rl_complete(int, int);
int rl_read_key(void);
char **completion_matches(const char *, CPFunction *);
void rl_display_match_list(char **, int, int);
--snip--
cc -dynamic -bundle -undefined suppress -flat_namespace -o ../../.ext/i386-darwin9.6.0/openssl.bundle openssl_missing.o ossl.o ossl_asn1.o ossl_bio.o ossl_bn.o ossl_cipher.o ossl_config.o ossl_digest.o ossl_engine.o ossl_hmac.o ossl_ns_spki.o ossl_ocsp.o ossl_pkcs12.o ossl_pkcs5.o ossl_pkcs7.o ossl_pkey.o ossl_pkey_dh.o ossl_pkey_dsa.o ossl_pkey_ec.o ossl_pkey_rsa.o ossl_rand.o ossl_ssl.o ossl_ssl_session.o ossl_x509.o ossl_x509attr.o ossl_x509cert.o ossl_x509crl.o ossl_x509ext.o ossl_x509name.o ossl_x509req.o ossl_x509revoked.o ossl_x509store.o -L. -L../.. -L. -lruby1.9 -lssl -lcrypto -lpthread -ldl -lobjc
compiling pty
gcc-4.2 -I. -I../../.ext/include/i386-darwin9.6.0 -I../.././include -I../.././ext/pty -DRUBY_EXTCONF_H="extconf.h" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o pty.o -c pty.c
pty.c: In function ‘getDevice’:
pty.c:425: warning: ‘return’ with a value, in function returning void
cc -dynamic -bundle -undefined suppress -flat_namespace -o ../../.ext/i386-darwin9.6.0/pty.bundle pty.o -L. -L../.. -L. -lruby1.9 -lutil -lpthread -ldl -lobjc
compiling racc/cparse
gcc-4.2 -I. -I../../../.ext/include/i386-darwin9.6.0 -I../../.././include -I../../.././ext/racc/cparse -DRUBY_EXTCONF_H="extconf.h" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o cparse.o -c cparse.c
cc -dynamic -bundle -undefined suppress -flat_namespace -o ../../../.ext/i386-darwin9.6.0/racc/cparse.bundle cparse.o -L. -L../../.. -L. -lruby1.9 -lpthread -ldl -lobjc
compiling readline
gcc-4.2 -I. -I../../.ext/include/i386-darwin9.6.0 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H="extconf.h" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o readline.o -c readline.c
readline.c: In function ‘filename_completion_proc_call’:
readline.c:1130: warning: implicit declaration of function ‘completion_matches’
readline.c:1131: error: ‘filename_completion_function’ undeclared (first use in this function)
readline.c:1131: error: (Each undeclared identifier is reported only once
readline.c:1131: error: for each function it appears in.)
readline.c:1131: warning: assignment makes pointer from integer without a cast
readline.c: In function ‘username_completion_proc_call’:
readline.c:1156: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:1156: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make: *** [exts] Error 1
=end