[ruby] #54: build on Leopard fails on readline
#54: build on Leopard fails on readline ---------------------------------+------------------------------------------ Reporter: edarocket@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: readline ---------------------------------+------------------------------------------ I am running Leopard 10.5.2. I have readline5.2 installed in /usr/local with patch #12 added to allow for Darwin9. I configured MacRuby0.1 with the following command: ./configure --enable-framework --enable-fat-binary --program-prefix=mac --prefix=/usr/local --with-readline-dir=/usr/local I get the following error during make: compiling readline gcc -I. -I../../.ext/include/universal-darwin9.0 -I..//.././include -I..//.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -I/usr/include/libxml2 -g -O2 -arch ppc -arch i386 -fno-common -pipe -fno-common -arch ppc -arch i386 -o readline.o -c readline.c readline.c: In function ‘filename_completion_proc_call’: readline.c:669: error: ‘filename_completion_function’ undeclared (first use in this function) readline.c:669: error: (Each undeclared identifier is reported only once readline.c:669: error: for each function it appears in.) readline.c:669: warning: assignment makes pointer from integer without a cast readline.c: In function ‘username_completion_proc_call’: readline.c:694: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:694: warning: assignment makes pointer from integer without a cast readline.c: In function ‘filename_completion_proc_call’: readline.c:669: error: ‘filename_completion_function’ undeclared (first use in this function) readline.c:669: error: (Each undeclared identifier is reported only once readline.c:669: error: for each function it appears in.) readline.c:669: warning: assignment makes pointer from integer without a cast readline.c: In function ‘username_completion_proc_call’: readline.c:694: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:694: warning: assignment makes pointer from integer without a cast lipo: can't open input file: /var/folders/qi/qiRsmsrKFyGifWoVhWoCz++++TM/-Tmp-//ccyYzZ4h.out (No such file or directory) make[1]: *** [readline.o] Error 1 make: *** [all] Error 1 This is similar to Ticket #5, which was closed with a "wontfix" status. I tried this on several machines with a similar /usr/local set-up, several build attempts, and several Google searches. I'm running out of ideas. Thanks, RyanR> -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/54> ruby <http://ruby.macosforge.org/>
#54: build on Leopard fails on readline ---------------------------------+------------------------------------------ Reporter: edarocket@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: readline | ---------------------------------+------------------------------------------ Comment (by eloy.de.enige@gmail.com): This is most probably a problem that your readline isn't build as a fat binary and so you can't build fat binaries that link against it. These problems are always easily recognizable by: {{{ lipo: can't open input file: /var/folders/qi/qiRsmsrKFyGifWoVhWoCz++++TM/-Tmp-//ccyYzZ4h.out (No such file or directory) }}} You can check this yourself with `file`. If I use it on the default readline: {{{ % file /usr/lib/libreadline.dylib /usr/lib/libreadline.dylib: Mach-O universal binary with 4 architectures /usr/lib/libreadline.dylib (for architecture ppc7400): Mach-O dynamically linked shared library ppc /usr/lib/libreadline.dylib (for architecture ppc64): Mach-O 64-bit dynamically linked shared library ppc64 /usr/lib/libreadline.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /usr/lib/libreadline.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 }}} As you can see there's support for the archs ppc & i386 which are necessary to build macruby as a fat binary. Long story short: Either recompile your readline as a fat binary OR don't use --enable-fat-binary and only build for your native arch. -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/54#comment:1> ruby <http://ruby.macosforge.org/>
#54: build on Leopard fails on readline ---------------------------------+------------------------------------------ Reporter: edarocket@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Resolution: Keywords: readline | ---------------------------------+------------------------------------------ Comment (by edarocket@gmail.com): That was most certainly it, Eloy! Thanks a ton. I configured MacRuby without the --enable-fat-binary flag and pointed it to my single architecture readline build --with-readline-dir=/usr/local, and now I'm running MacRuby! Now I just need to figure out where my project templates went... Thanks again! RyanR> -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/54#comment:2> ruby <http://ruby.macosforge.org/>
#54: build on Leopard fails on readline ---------------------------------+------------------------------------------ Reporter: edarocket@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: readline | ---------------------------------+------------------------------------------ Changes (by lsansonetti@apple.com): * status: new => closed * resolution: => invalid Comment: Okay, I assume this problem is fixed then. Thanks Eloy for the help! -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/54#comment:3> macruby <http://ruby.macosforge.org/>
#54: build on Leopard fails on readline ---------------------------------+------------------------------------------ Reporter: edarocket@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: readline | ---------------------------------+------------------------------------------ Comment (by encytemedia@gmail.com): Just wanted to add a comment on this. I ran into the exact same issue. Compiling readline myself and specifying the directory didn't help. However, I just decided to go with the macports version. It turned out I needed to install readline and sqlite3 and configure: {{{ sudo port -f uninstall readline sudo port -f uninstall sqlite3 sudo port install readline sudo port install sqlite3 autoconf ./configure --enable-framework --program-prefix=mac --with-readline- dir=/opt/local sudo make install }}} -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/54#comment:4> macruby <http://ruby.macosforge.org/>
#54: build on Leopard fails on readline ---------------------------------+------------------------------------------ Reporter: edarocket@gmail.com | Owner: lsansonetti@apple.com Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: invalid Keywords: readline | ---------------------------------+------------------------------------------ Comment (by edarocket@gmail.com): Now that MacRuby is built using Rake, I am not sure how to specify build options. Therefore, I am getting the exact same error that Eloy picked up on previously: {{{ lipo: can't open input file: /var/folders/qi/qiRsmsrKFyGifWoVhWoCz++++TM/-Tmp-//ccNzT4hX.out (No such file or directory) }}} Rather than bother you immediately, I tried his initial suggestion, i.e. I tried to recompile readline-5.2 as a fat binary: {{{ $ pwd /usr/local/src/readline-5.2 $ make distclean $ ./configure --prefix=/usr/local --enable-fat-binary }}} I then went back to MacRuby, ran 'rake clean' and 'rake', but still received the same error. So then I ran his check suggestion: {{{ $ file /usr/local/lib/libreadline.dylib /usr/local/lib/libreadline.dylib: Mach-O dynamically linked shared library i386 }}} So apparently I did not successfully rebuild readline as a fat binary. Can someone assist me with this problem? -- Ticket URL: <http://ruby.macosforge.org/trac/ticket/54#comment:5> macruby <http://ruby.macosforge.org/>
participants (2)
-
macruby
-
ruby