First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 27392
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Mamoru KOMACHI (RETIRED) <usata@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Matthew Kennedy (RETIRED) <mkennedy@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 27392 depends on: 27064 Show dependency tree
Show dependency graph
Bug 27392 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-08-26 22:28 0000
the problem is that binaries on the root filesystem should only link to /lib
(which is also in the root filesysem) and not /usr/lib as /usr is sometimes not
available (especially during system maintenance). not really a big issue, but
other distros take care to avoid this kind of messy thing and so should we

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

------- Comment #1 From Mamoru KOMACHI (RETIRED) 2003-08-26 23:01:24 0000 -------
Yeah, I think we should look into this issue, too.  Does anyone have
an idea to fix the problem other than installing libpcre to /lib?  Or,
what distributions do you have in mind that cope with it, Matthew?
For the time being you may want to build zsh with USE="static" to
avoid linking libraries in /usr/lib dynamically.

------- Comment #2 From Matthew Kennedy (RETIRED) 2003-08-26 23:06:06 0000 -------
there nothing to prevent us installing zsh into /usr/bin. 

distro wise, debian. but i'll have to verify that for sure tomorrow

------- Comment #3 From Mr. Bones. 2003-08-26 23:06:35 0000 -------
This bug could probably be combined with 27064

------- Comment #4 From Spider (RETIRED) 2003-08-27 04:12:40 0000 -------
linking zsh statically will probably ruin it since it has a module based design
(zftp, zshle and other such modules) 

I think that we should either move zsh out of /bin, or move libpcre + deps into
/lib.

------- Comment #5 From Matthew Kennedy (RETIRED) 2003-08-27 09:56:34 0000 -------
usata, for interests sake: yep on debian they avoided the issue by not using
pcre at all (and they don't link into /usr/lib)

i'm not a full time admin, so not the best judge of this, but it seems that a
fancy shell like zsh is not so critical for maintenance when /usr is offline. 
Maybe /usr/bin/zsh is the better option? either way...

------- Comment #6 From Mamoru KOMACHI (RETIRED) 2003-08-27 12:35:43 0000 -------
Thanks for the comment, spider.  I added zsh-4.1.1-r1 which links
all modules statically (when USE="static").

I googled zsh packages on Debian and found
http://packages.debian.org/unstable/shells/zsh-beta.html
It says zsh-beta (4.1.1) links to libpcre3 which is installed into
/usr/lib while zsh-beta is installed to /bin/zsh. Surely they install 
zsh (4.0.7) without libpcre, which is also true on Gentoo
(zsh-4.0.7.ebuild doesn't require libpcre).  I can't verify Debian's
zsh-beta is really compiled with libpcre because I have no Debian box,
but I don't think they regard it as a problem since they have
zsh-static package as we have static USE flag.

I'm reluctant to move zsh into /usr/bin because all the other shells
are installed into /bin and I myself sometimes use statically compiled
zsh without mounting /usr (fortunately not on Gentoo box ;-p), so I
prefer moving libpcre to /lib rather than installing zsh to /usr/bin.

------- Comment #7 From Reporter 2003-08-27 17:59:10 0000 -------
Sorry for interrupting this dev-only discussion, but is zsh really that
essential that it justifies bloating up "/" with libraries that no other 
program in /bin or /sbin needs? Not to mention the size of zsh itself with
all the plugins compiled in. I've recently seen gentoo running on a stock 
sparcstation ipc with a very small local harddisk (i think it was ~100MB, 
and that was including /boot and /tmp, everything else nfs). If the trend
continues to move more and more stuff to "/", that wouldn't work anymore 
without upgrading. (a bigger disk would probably be more expensive than 
the whole box) And don't forget people that don't use zsh, libpcre would 
be in "/" for no reason then.

------- Comment #8 From Reporter 2003-08-27 18:16:05 0000 -------
Come to think of it, there's even a possibility to save space by linking 
bash against shared libreadline, after all there's still sash if dynamic 
linking is broken. (in which case bash would't work anyway because it 
still needs libdl)

------- Comment #9 From Mamoru KOMACHI (RETIRED) 2003-08-28 03:27:20 0000 -------
Okay, so I suggest the third option.  We can link zsh to libpcre
statically, and all the other libraries dynamically.  It will look
like this:


rico% ldd /bin/zsh
        libcap.so.1 => /lib/libcap.so.1 (0x40012000)
	libdl.so.2 => /lib/libdl.so.2 (0x41145000)
	libnsl.so.1 => /lib/libnsl.so.1 (0x40015000)
	libm.so.6 => /lib/libm.so.6 (0x412a4000)
	libc.so.6 => /lib/libc.so.6 (0x41016000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x41000000)


Does that make sense?  If everyone is happy with it, I'll commit it
later.  Hans, you can save / disk space on the one hand, and still be
able to use zsh without mounting /usr on the other hand (and, most
importantly, in this case we will not install libpcre into /lib).
However, you will get errors with loadling modules and not able to use
most features including tab-completion when you umount /usr unless you
compile whole zsh statically.

------- Comment #10 From Spider (RETIRED) 2003-08-28 09:17:39 0000 -------
this sounds as a better idea. And if /usr is unmounted I think there are more
important issues than the tab completion of zsh in mind.

------- Comment #11 From Charlton Harrison 2003-08-28 12:58:31 0000 -------
I think this is a zsh development issue that the zsh developers need to decide.
If they want their shell to be in /bin (which I think it should be),  and depend on a library typically installed in /usr/lib,  then they should rewrite zsh to not depend on libpcre.  This would be ideal,  but if it's too impractical to rewrite all these functions within zsh itself (I don't know the answer to this),  then I think Mamoru's idea is the best;  to statically link to this particular library to the binary - and the zsh developers should do this in their make process as well.

Again,  to me this isn't really a Gentoo issue,  since potentially every distro has/will have this problem.  The zsh folks should make these decisions.

------- Comment #12 From Matthew Kennedy (RETIRED) 2003-08-28 13:33:19 0000 -------
wrt comment #6 debian install zsh-beta into /usr/bin and

$ ldd /usr/bin/zsh-beta
        libpcre.so.3 => /usr/lib/libpcre.so.3 (0x40021000)
        libcap.so.1 => /lib/libcap.so.1 (0x4002f000)
        libdl.so.2 => /lib/libdl.so.2 (0x40033000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40036000)
        libncurses.so.5 => /lib/libncurses.so.5 (0x4004a000)
        libm.so.6 => /lib/libm.so.6 (0x40086000)
        libc.so.6 => /lib/libc.so.6 (0x400a8000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

The solution in comment #9 sounds great though

------- Comment #13 From Mamoru KOMACHI (RETIRED) 2003-08-29 14:07:05 0000 -------
I agree with Charlton about the issue.  However, Zsh developers don't
seem to change not to link zsh against libpcre (thought they like zsh
binary to be libpcre-free).  See "PATCH: zsh/pcre module building"
http://www.zsh.org/mla/workers/2002/msg00447.html thread.  It was
posted on 15 Mar 2002.  They were asked again about the patch on 23
Jun 2003 in http://www.zsh.org/mla/workers/2003/msg00445.html but
nobody replied.  I think they will change it, but I don't know when.

------- Comment #14 From Mamoru KOMACHI (RETIRED) 2003-08-31 15:45:10 0000 -------
Hi.  I've just committed zsh-4.1.1-r2.ebuild, which links libpcre statically.
If you find any problem please report it back.  Charlton: I think it is a
workaround for the problem since zsh developers will rewrite build process to
not depend on libpcre in the future.

------- Comment #15 From Mamoru KOMACHI (RETIRED) 2003-10-27 23:10:58 0000 -------
zsh-4.1.1-r2 seems fairly stable (and solve the issue discussed above),
so I close this bug.

First Last Prev Next    No search results available      Search page      Enter new bug