The Secret Diary of Han, Aged 0x29

Posts Tagged ‘readline leopard

Building readline 5.2 on OS X Leopard

Readline 5.2 does not build properly on OS X Leopard. It fails with a  -compatibility_version only allowed with -dynamiclib error. I ran into this problem when trying to build ruby, using GNU readline instead of the default editline. The problem is easily fixed though. Readline explicitly checks for the darwin version, but does not include 9 (Leopard) in this check. Patch support/shobj-conf using the following:

 --- support/shobj-conf	2007-12-26 18:30:46.000000000 +0900
+++ support/	2007-12-26 18:30:39.000000000 +0900
@@ -142,7 +142,7 @@

# Darwin/MacOS X

@@ -171,7 +171,7 @@

case "${host_os}" in
-	darwin[78]*)	SHOBJ_LDFLAGS=''
+	darwin[789]*)	SHOBJ_LDFLAGS=''
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
*)		SHOBJ_LDFLAGS='-dynamic'

and rerun configure and make.


Written by Han

December 26, 2007 at 18:29

Posted in Uncategorized

Tagged with