[gentoo-user] static nano - how to?

2012-01-31 Thread Helmut Jarausch
Hi,

from time to time I need to boot in 'single' mode.
I'd like to use the nano editor in this case.
But unfortunately it doesn't run since it cannot resolve the dynamic 
library libmagic.so.1

How can I build a static version of nano?

Many thanks for a hint,
Helmut.



Re: [gentoo-user] static nano - how to?

2012-01-31 Thread Alex Schuster
Helmut Jarausch writes:

 from time to time I need to boot in 'single' mode.
 I'd like to use the nano editor in this case.
 But unfortunately it doesn't run since it cannot resolve the dynamic 
 library libmagic.so.1

Probably because you have a separate /usr partition that is not mounted
in single user mode? In this case, copy /usr/lib/libmagic.so.1 to /lib/.

 How can I build a static version of nano?

There is a utility that can convert static binaries from dynamic ones:
http://www.magicermine.com/

It's not free, though. But there is a 15-day evaluation version you could
use. They state that they support Free Software and OSS, so I guess they
would be okay with this. The author also seems to be a nice guy, I
exchanged some mails with him years ago because I looked for such a
utility. But I did not buy it because the price (300€) was higher than my
need for it.

Another utility is ELF STATIFIER (http://statifier.sourceforge.net/).
It's free, but it seems to have some problems with stack or VDSO
randomization.

Wonko



Re: [gentoo-user] static nano - how to?

2012-01-31 Thread Florian Philipp
Am 31.01.2012 18:15, schrieb Helmut Jarausch:
 Hi,
 
 from time to time I need to boot in 'single' mode.
 I'd like to use the nano editor in this case.
 But unfortunately it doesn't run since it cannot resolve the dynamic 
 library libmagic.so.1
 
 How can I build a static version of nano?
 
 Many thanks for a hint,
 Helmut.
 

That must be a use flag issue:

ldd `which nano`
linux-vdso.so.1 =  (0x7fffde9ff000)
libncursesw.so.5 = /lib64/libncursesw.so.5 (0x7f47f3b64000)
libc.so.6 = /lib64/libc.so.6 (0x7f47f37be000)
libdl.so.2 = /lib64/libdl.so.2 (0x7f47f35ba000)
/lib64/ld-linux-x86-64.so.2 (0x7f47f3dc5000)

USE=ncurses nls unicode -debug -justify -minimal -slang -spell



signature.asc
Description: OpenPGP digital signature