The Secret Diary of Han, Aged 0x29

twitter.com/h4n

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/shobj-conf.new	2007-12-26 18:30:39.000000000 +0900
@@ -142,7 +142,7 @@
;;


# Darwin/MacOS X
-darwin8*)
+darwin89*)
SHOBJ_STATUS=supported
SHLIB_STATUS=supported


@@ -171,7 +171,7 @@
SHLIB_LIBSUFF='dylib'


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.

Advertisements

Written by Han

December 26, 2007 at 18:29

Posted in Uncategorized

Tagged with