OSXians,

as you all might know, readline is not existant on your OSX box. At least it looks like that. Apple supplies libedit and by default symlinks it to readline in /usr/lib thereby triggering our collision protect when emerging readline:

% la /usr/lib/libreadline.dylib
lrwxr-xr-x 1 root wheel 13 Aug 20 14:17 /usr/lib/libreadline.dylib -> libedit.dylib

Not very interesting are this link and the libedit library, as they don't seem to care to link some readline.h file in /usr/include/readline/readline.h too. So far, no big news I guess. However:

% locate readline.h
/Developer/SDKs/MacOSX10.2.8.sdk/usr/include/mysql/readline.h
/Developer/SDKs/MacOSX10.4.0.sdk/usr/include/readline/readline.h
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/readline/readline.h

This output looked very interesting, and scanning the readline.h file in MacOSX10.4u.sdk it gave me the impression that this was dealing with an up-to-date version of libedit: one that has a compatibility layer with readline. At least the rl_* functions are declared out there. So I stepped into those shoes and decided to patch up libxml to use readline from /Developer/SDKs/MacOSX10.4u.sdk/. Well, ok, because the configure script seems to plainly ignore whatever you tell it I just compiled the single file that failed due to a readline dep by hand, and it was a success, that is after that running make again, everything finished happily to compile. "make check" was pretty happy too. Running:

% ./.libs/tester --shell test/slashdot.xml
/ >

even gave me an editable prompt with history (!).


Moral of the story: GNU is not Linux.  Ehm, no.
- libedit appears to be a 'good enough' replacement for some tools, good enough to make >=readline-4.1 applications compile
- libedit is in portage
- libedit is supplied with OSX
- libedit is even completer (with readline.h) supplied with Apple's SDKs.
- there unfortunately is no virtual/readline in town, so emerging libedit doesn't give you readline, while in fact it does. - assumming we would just lie some more to portage about what it has and what it doesn't have, we would have to add the readline.h file to /usr/include and make a package.provided.

I think all is dirty, but not being able to compile libxml because the testing program -- which a regular user will never use -- uses readline for its --shell mode which it doesn't even use in make check stinks too.

Besides that I'd like to go a bit broader here for a sec. GPL is considered to be a virus by many people, and shouldn't this virtual/readline be a part of portage instead of assuming you use GNU's readline?

Feel free to tell me I should just wait till we can simply install readline. (then still I'd like to use libedit I think)


--
Fabian Groffen
eBuild && Porting
Gentoo for Mac OS X
--
[email protected] mailing list

Reply via email to