Gentoo Archives: gentoo-osx

From: Grobian <grobian@g.o>
To: gentoo-osx@l.g.o
Subject: [gentoo-osx] Readline issues
Date: Sat, 20 Aug 2005 15:26:08
Message-Id: 43074B5B.10607@gentoo.org
1 OSXians,
2
3 as you all might know, readline is not existant on your OSX box. At
4 least it looks like that. Apple supplies libedit and by default
5 symlinks it to readline in /usr/lib thereby triggering our collision
6 protect when emerging readline:
7
8 % la /usr/lib/libreadline.dylib
9 lrwxr-xr-x 1 root wheel 13 Aug 20 14:17 /usr/lib/libreadline.dylib
10 -> libedit.dylib
11
12 Not very interesting are this link and the libedit library, as they
13 don't seem to care to link some readline.h file in
14 /usr/include/readline/readline.h too. So far, no big news I guess.
15 However:
16
17 % locate readline.h
18 /Developer/SDKs/MacOSX10.2.8.sdk/usr/include/mysql/readline.h
19 /Developer/SDKs/MacOSX10.4.0.sdk/usr/include/readline/readline.h
20 /Developer/SDKs/MacOSX10.4u.sdk/usr/include/readline/readline.h
21
22 This output looked very interesting, and scanning the readline.h file in
23 MacOSX10.4u.sdk it gave me the impression that this was dealing with
24 an up-to-date version of libedit: one that has a compatibility layer
25 with readline. At least the rl_* functions are declared out there. So
26 I stepped into those shoes and decided to patch up libxml to use
27 readline from /Developer/SDKs/MacOSX10.4u.sdk/. Well, ok, because the
28 configure script seems to plainly ignore whatever you tell it I just
29 compiled the single file that failed due to a readline dep by hand, and
30 it was a success, that is after that running make again, everything
31 finished happily to compile. "make check" was pretty happy too. Running:
32
33 % ./.libs/tester --shell test/slashdot.xml
34 / >
35
36 even gave me an editable prompt with history (!).
37
38
39 Moral of the story: GNU is not Linux. Ehm, no.
40 - libedit appears to be a 'good enough' replacement for some tools, good
41 enough to make >=readline-4.1 applications compile
42 - libedit is in portage
43 - libedit is supplied with OSX
44 - libedit is even completer (with readline.h) supplied with Apple's SDKs.
45 - there unfortunately is no virtual/readline in town, so emerging
46 libedit doesn't give you readline, while in fact it does.
47 - assumming we would just lie some more to portage about what it has and
48 what it doesn't have, we would have to add the readline.h file to
49 /usr/include and make a package.provided.
50
51 I think all is dirty, but not being able to compile libxml because the
52 testing program -- which a regular user will never use -- uses readline
53 for its --shell mode which it doesn't even use in make check stinks too.
54
55 Besides that I'd like to go a bit broader here for a sec. GPL is
56 considered to be a virus by many people, and shouldn't this
57 virtual/readline be a part of portage instead of assuming you use GNU's
58 readline?
59
60 Feel free to tell me I should just wait till we can simply install
61 readline. (then still I'd like to use libedit I think)
62
63
64 --
65 Fabian Groffen
66 eBuild && Porting
67 Gentoo for Mac OS X
68 --
69 gentoo-osx@g.o mailing list

Replies

Subject Author
Re: [gentoo-osx] Readline issues "Mike Z." <shootingstar@×××××××××.au>