Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with BASH and busybox and compiling issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Mac Tzu
n00b
n00b


Joined: 13 May 2007
Posts: 42
Location: Melbourne, Australia

PostPosted: Mon May 07, 2012 8:52 am    Post subject: Problem with BASH and busybox and compiling issue Reply with quote

Hey Guys,

I have run into a issue when compiling my kernel 3.3.4.

here is a example of the error

CHK include/linux/version.h
make[1]: Nothing to be done for `all'.
HOSTCC scripts/basic/fixdep
CHK include/generated/utsrelease.h
CC scripts/mod/empty.o
HOSTCC scripts/kallsyms
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/pnmtologo
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
HOSTCC scripts/conmakehash
HOSTLD scripts/mod/modpost
HOSTCC scripts/bin2c
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CC init/main.o
LD usr/built-in.o
ar: invalid option -- 's'
BusyBox v1.20.0 (2012-05-06 22:21:57 EST) multi-call binary.

Usage: ar [-o] [-v] [-p] [-t] [-x] ARCHIVE FILES

Extract or list FILES from an ar archive

-o Preserve original dates
-p Extract to stdout
-t List
-x Extract
-v Verbose

make[1]: *** [usr/built-in.o] Error 1
make: *** [usr] Error 2
make: *** Waiting for unfinished jobs....
AS arch/x86/crypto/aes-x86_64-asm_64.o
AS arch/x86/ia32/ia32entry.o
CC arch/x86/crypto/aes_glue.o
CC arch/x86/ia32/sys_ia32.o
AS arch/x86/crypto/aesni-intel_asm.o
CC arch/x86/crypto/aesni-intel_glue.o
CC arch/x86/ia32/ia32_signal.o
CHK include/generated/compile.h
CC init/do_mounts.o
CC arch/x86/ia32/nosyscall.o
CC arch/x86/ia32/syscall_ia32.o
CC arch/x86/ia32/ipc32.o
CC arch/x86/crypto/fpu.o
CC arch/x86/ia32/ia32_aout.o
AS arch/x86/crypto/blowfish-x86_64-asm_64.o
CC arch/x86/crypto/blowfish_glue.o
CC init/noinitramfs.o
AS arch/x86/crypto/salsa20-x86_64-asm_64.o
CC arch/x86/crypto/salsa20_glue.o
CC init/calibrate.o
LD arch/x86/ia32/built-in.o
CC arch/x86/kernel/process_64.o
CC init/version.o
AS arch/x86/crypto/serpent-sse2-x86_64-asm_64.o
CC arch/x86/crypto/serpent_sse2_glue.o
LD init/mounts.o
LD init/built-in.o
AS arch/x86/crypto/sha1_ssse3_asm.o
CC arch/x86/crypto/sha1_ssse3_glue.o
CC arch/x86/kernel/signal.o

So it looks to me like busybox is somehow conflicting with bash.
my eselect binutils show is
x86_64-pc-linux-gnu-2.22

but my ls -al 'which ar'
shows this
lrwxrwxrwx 1 root root 12 Mar 30 12:38 /bin/ar -> /bin/busybox

Short answer thus far is I don't understand what I have changed. To the best of my understanding I am running default ~amd64 system. I have tried unemerging busybox and I was then able to compile my kernel but busybox is pulled by portage on my next -uDNv @system.

FYI equery u busybox shows this

Found these USE flags for sys-apps/busybox-1.20.0:
U I
+ + ipv6 : Adds support for IP version 6
- - make-symlinks : Create all the appropriate symlinks in /bin and /sbin.
- - math : Enable math support in gawk (requires libm)
- - mdev : Create the appropriate symlink in /sbin and install mdev.conf and support files
+ - pam : Adds support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip
- - savedconfig : Use this to restore your config from /etc/portage/savedconfig ${CATEGORY}/${PN}. Make sure your USE flags allow for
appropriate dependencies
- - sep-usr : Support a separate /usr without needing an initramfs by booting with init=/bbinit
- - static : !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically


also it appears to be effected man pages and dispatch-conf are not working properly

Thanks in advance
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4002
Location: USA

PostPosted: Mon May 07, 2012 6:57 pm    Post subject: Reply with quote

"ar" is the library archiver. I'm surprised busybox actually has an 'ar' module, normally 'ar' is handled by binutils.

Do you have a /usr/bin/ar ? If so, try removing the symlink in /bin and seeing if it works again.

This is a "full" not a reduced setup machine? I have a machine that I use busybox for most binaries in /bin, but it's not really good for development/compiling. In fact it doesn't even have portage installed...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Mac Tzu
n00b
n00b


Joined: 13 May 2007
Posts: 42
Location: Melbourne, Australia

PostPosted: Tue May 08, 2012 1:06 am    Post subject: Reply with quote

eccerr0r wrote:
"ar" is the library archiver. I'm surprised busybox actually has an 'ar' module, normally 'ar' is handled by binutils.

Do you have a /usr/bin/ar ? If so, try removing the symlink in /bin and seeing if it works again.

This is a "full" not a reduced setup machine? I have a machine that I use busybox for most binaries in /bin, but it's not really good for development/compiling. In fact it doesn't even have portage installed...


Hey Eccerr0r,

I do have a /usr/bin/ar
ls -al shows

lrwxrwxrwx 1 root root 22 May 6 21:37 /usr/bin/ar -> x86_64-pc-linux-gnu-ar

It is a full machine. But I also find the conflict with dispatch-conf quiet concerning.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4002
Location: USA

PostPosted: Tue May 08, 2012 6:05 am    Post subject: Reply with quote

Just try removing /bin/ar and see if it fixes the problem.

For some reason your machine decided to install all the symlinks for busybox as if USE=make-symlinks which is not the case...

When you unmerged busybox, did that symbolic link still linger?

Might want to check if there are any more symlinks to busybox in /bin - there shouldn't be any on a "full" system...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Mac Tzu
n00b
n00b


Joined: 13 May 2007
Posts: 42
Location: Melbourne, Australia

PostPosted: Fri May 11, 2012 3:12 am    Post subject: Reply with quote

So I have gleened this from the installatin of busybox

* Your configuration for sys-apps/busybox-1.20.0 has been saved in
* /etc/portage/savedconfig/sys-apps/busybox-1.20.0 for your editing pleasure.
* You can edit these files by hand and remerge this package with
* USE=savedconfig to customise the configuration.
* You can rename this file/directory to one of the following for
* its configuration to apply to multiple versions:
* ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/
* [${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]
make -j3 DESTDIR=/var/tmp/portage/sys-apps/busybox-1.20.0/image/ install
LINK busybox_unstripped
Trying libraries: crypt m pam pam_misc pthread
Library crypt is not needed, excluding it
Library m is not needed, excluding it
Library pam is not needed, excluding it
Library pam_misc is not needed, excluding it
Library pthread is not needed, excluding it
Final link with: <none>
./_install//bin/[ -> busybox
./_install//bin/[[ -> busybox
./_install//bin/addgroup -> busybox
./_install//bin/adduser -> busybox
./_install//bin/ar -> busybox
./_install//bin/arping -> busybox
./_install//bin/ash -> busybox
./_install//bin/awk -> busybox
./_install//bin/base64 -> busybox
./_install//bin/basename -> busybox
./_install//bin/bb -> busybox
./_install//bin/bbconfig -> busybox
./_install//bin/bbsh -> busybox
./_install//bin/bunzip2 -> busybox
./_install//bin/bzcat -> busybox
./_install//bin/bzip2 -> busybox
./_install//bin/cal -> busybox
./_install//bin/cat -> busybox
./_install//bin/catv -> busybox
./_install//bin/chat -> busybox
./_install//bin/chattr -> busybox
./_install//bin/chgrp -> busybox
./_install//bin/chmod -> busybox
./_install//bin/chown -> busybox
./_install//bin/chpst -> busybox
./_install//bin/chrt -> busybox
./_install//bin/chvt -> busybox
./_install//bin/cksum -> busybox
./_install//bin/clear -> busybox
./_install//bin/cmp -> busybox
./_install//bin/comm -> busybox
./_install//bin/conspy -> busybox
./_install//bin/cp -> busybox
./_install//bin/cpio -> busybox
./_install//bin/cryptpw -> busybox
./_install//bin/cttyhack -> busybox
./_install//bin/cut -> busybox
./_install//bin/date -> busybox
./_install//bin/dd -> busybox
./_install//bin/deallocvt -> busybox
./_install//bin/delgroup -> busybox
./_install//bin/deluser -> busybox
./_install//bin/df -> busybox
./_install//bin/diff -> busybox
./_install//bin/dirname -> busybox
./_install//bin/dmesg -> busybox
./_install//bin/dnsdomainname -> busybox
./_install//bin/dos2unix -> busybox
./_install//bin/du -> busybox
./_install//bin/dumpkmap -> busybox
./_install//bin/dumpleases -> busybox
./_install//bin/echo -> busybox
./_install//bin/ed -> busybox
./_install//bin/egrep -> busybox
./_install//bin/eject -> busybox
./_install//bin/env -> busybox
./_install//bin/envdir -> busybox
./_install//bin/envuidgid -> busybox
./_install//bin/ether-wake -> busybox
./_install//bin/expand -> busybox
./_install//bin/expr -> busybox
./_install//bin/false -> busybox
./_install//bin/fdflush -> busybox
./_install//bin/fdformat -> busybox
./_install//bin/fgconsole -> busybox
./_install//bin/fgrep -> busybox
./_install//bin/find -> busybox
./_install//bin/flock -> busybox
./_install//bin/free -> busybox
./_install//bin/fsync -> busybox
./_install//bin/fuser -> busybox
./_install//bin/getopt -> busybox
./_install//bin/grep -> busybox
./_install//bin/groups -> busybox
./_install//bin/gunzip -> busybox
./_install//bin/gzip -> busybox
./_install//bin/hd -> busybox
./_install//bin/head -> busybox
./_install//bin/hexdump -> busybox
./_install//bin/hostname -> busybox
./_install//bin/id -> busybox
./_install//bin/ifplugd -> busybox
./_install//bin/install -> busybox
./_install//bin/ionice -> busybox
./_install//bin/iostat -> busybox
./_install//bin/ip -> busybox
./_install//bin/ipaddr -> busybox
./_install//bin/ipcrm -> busybox
./_install//bin/ipcs -> busybox
./_install//bin/iplink -> busybox
./_install//bin/iproute -> busybox
./_install//bin/iprule -> busybox
./_install//bin/iptunnel -> busybox
./_install//bin/kbd_mode -> busybox
./_install//bin/kill -> busybox
./_install//bin/killall -> busybox
./_install//bin/killall5 -> busybox
./_install//bin/last -> busybox
./_install//bin/less -> busybox
./_install//bin/linux32 -> busybox
./_install//bin/linux64 -> busybox
./_install//bin/ln -> busybox
./_install//bin/logger -> busybox
./_install//bin/login -> busybox
./_install//bin/lpq -> busybox
./_install//bin/lpr -> busybox
./_install//bin/ls -> busybox
./_install//bin/lsattr -> busybox
./_install//bin/lsof -> busybox
./_install//bin/lspci -> busybox
./_install//bin/lsusb -> busybox
./_install//bin/lzcat -> busybox
./_install//bin/lzma -> busybox
./_install//bin/lzop -> busybox
./_install//bin/lzopcat -> busybox
./_install//bin/md5sum -> busybox
./_install//bin/mesg -> busybox
./_install//bin/microcom -> busybox
./_install//bin/mkdir -> busybox
./_install//bin/mkfifo -> busybox
./_install//bin/mknod -> busybox
./_install//bin/mkpasswd -> busybox
./_install//bin/mktemp -> busybox
./_install//bin/more -> busybox
./_install//bin/mount -> busybox
./_install//bin/mountpoint -> busybox
./_install//bin/mpstat -> busybox
./_install//bin/mt -> busybox
./_install//bin/mv -> busybox
./_install//bin/nc -> busybox
./_install//bin/netstat -> busybox
./_install//bin/nice -> busybox
./_install//bin/nmeter -> busybox
./_install//bin/nohup -> busybox
./_install//bin/nslookup -> busybox
./_install//bin/openvt -> busybox
./_install//bin/passwd -> busybox
./_install//bin/patch -> busybox
./_install//bin/pgrep -> busybox
./_install//bin/pidof -> busybox
./_install//bin/ping -> busybox
./_install//bin/ping6 -> busybox
./_install//bin/pipe_progress -> busybox
./_install//bin/pkill -> busybox
./_install//bin/pmap -> busybox
./_install//bin/powertop -> busybox
./_install//bin/printenv -> busybox
./_install//bin/printf -> busybox
./_install//bin/ps -> busybox
./_install//bin/pscan -> busybox
./_install//bin/pstree -> busybox
./_install//bin/pwd -> busybox
./_install//bin/pwdx -> busybox
./_install//bin/readahead -> busybox
./_install//bin/readlink -> busybox
./_install//bin/realpath -> busybox
./_install//bin/renice -> busybox
./_install//bin/reset -> busybox
./_install//bin/resize -> busybox
./_install//bin/rev -> busybox
./_install//bin/rm -> busybox
./_install//bin/rmdir -> busybox
./_install//bin/rtcwake -> busybox
./_install//bin/rx -> busybox
./_install//bin/script -> busybox
./_install//bin/scriptreplay -> busybox
./_install//bin/sed -> busybox
./_install//bin/seq -> busybox
./_install//bin/setarch -> busybox
./_install//bin/setkeycodes -> busybox
./_install//bin/setserial -> busybox
./_install//bin/setsid -> busybox
./_install//bin/setuidgid -> busybox
./_install//bin/sh -> busybox
./_install//bin/sha1sum -> busybox
./_install//bin/sha256sum -> busybox
./_install//bin/sha512sum -> busybox
./_install//bin/showkey -> busybox
./_install//bin/sleep -> busybox
./_install//bin/softlimit -> busybox
./_install//bin/sort -> busybox
./_install//bin/split -> busybox
./_install//bin/stat -> busybox
./_install//bin/strings -> busybox
./_install//bin/stty -> busybox
./_install//bin/su -> busybox
./_install//bin/sum -> busybox
./_install//bin/sync -> busybox
./_install//bin/tac -> busybox
./_install//bin/tail -> busybox
./_install//bin/tar -> busybox
./_install//bin/tee -> busybox
./_install//bin/telnet -> busybox
./_install//bin/test -> busybox
./_install//bin/tftp -> busybox
./_install//bin/tftpd -> busybox
./_install//bin/time -> busybox
./_install//bin/timeout -> busybox
./_install//bin/top -> busybox
./_install//bin/touch -> busybox
./_install//bin/tr -> busybox
./_install//bin/traceroute -> busybox
./_install//bin/traceroute6 -> busybox
./_install//bin/true -> busybox
./_install//bin/tty -> busybox
./_install//bin/ttysize -> busybox
./_install//bin/udhcpc6 -> busybox
./_install//bin/umount -> busybox
./_install//bin/uname -> busybox
./_install//bin/uncompress -> busybox
./_install//bin/unexpand -> busybox
./_install//bin/uniq -> busybox
./_install//bin/unix2dos -> busybox
./_install//bin/unlzma -> busybox
./_install//bin/unlzop -> busybox
./_install//bin/unxz -> busybox
./_install//bin/unzip -> busybox
./_install//bin/uptime -> busybox
./_install//bin/users -> busybox
./_install//bin/usleep -> busybox
./_install//bin/vi -> busybox
./_install//bin/vlock -> busybox
./_install//bin/volname -> busybox
./_install//bin/wall -> busybox
./_install//bin/watch -> busybox
./_install//bin/wc -> busybox
./_install//bin/wget -> busybox
./_install//bin/which -> busybox
./_install//bin/who -> busybox
./_install//bin/whoami -> busybox
./_install//bin/whois -> busybox
./_install//bin/xargs -> busybox
./_install//bin/xz -> busybox
./_install//bin/xzcat -> busybox
./_install//bin/yes -> busybox
./_install//bin/zcat -> busybox
./_install//linuxrc -> bin/busybox
./_install//sbin/acpid -> ../bin/busybox
./_install//sbin/adjtimex -> ../bin/busybox
./_install//sbin/arp -> ../bin/busybox
./_install//sbin/blkid -> ../bin/busybox
./_install//sbin/blockdev -> ../bin/busybox
./_install//sbin/brctl -> ../bin/busybox
./_install//sbin/chpasswd -> ../bin/busybox
./_install//sbin/chroot -> ../bin/busybox
./_install//sbin/crond -> ../bin/busybox
./_install//sbin/depmod -> ../bin/busybox
./_install//sbin/devmem -> ../bin/busybox
./_install//sbin/dhcprelay -> ../bin/busybox
./_install//sbin/fbset -> ../bin/busybox
./_install//sbin/fdisk -> ../bin/busybox
./_install//sbin/findfs -> ../bin/busybox
./_install//sbin/flash_eraseall -> ../bin/busybox
./_install//sbin/flash_lock -> ../bin/busybox
./_install//sbin/flash_unlock -> ../bin/busybox
./_install//sbin/flashcp -> ../bin/busybox
./_install//sbin/freeramdisk -> ../bin/busybox
./_install//sbin/fsck -> ../bin/busybox
./_install//sbin/ftpd -> ../bin/busybox
./_install//sbin/getty -> ../bin/busybox
./_install//sbin/ginit -> ../bin/busybox
./_install//sbin/halt -> ../bin/busybox
./_install//sbin/hdparm -> ../bin/busybox
./_install//sbin/httpd -> ../bin/busybox
./_install//sbin/hwclock -> ../bin/busybox
./_install//sbin/ifconfig -> ../bin/busybox
./_install//sbin/ifdown -> ../bin/busybox
./_install//sbin/ifenslave -> ../bin/busybox
./_install//sbin/ifup -> ../bin/busybox
./_install//sbin/init -> ../bin/busybox
./_install//sbin/insmod -> ../bin/busybox
./_install//sbin/klogd -> ../bin/busybox
./_install//sbin/loadfont -> ../bin/busybox
./_install//sbin/loadkmap -> ../bin/busybox
./_install//sbin/logread -> ../bin/busybox
./_install//sbin/losetup -> ../bin/busybox
./_install//sbin/lsmod -> ../bin/busybox
./_install//sbin/makedevs -> ../bin/busybox
./_install//sbin/man -> ../bin/busybox
./_install//sbin/mdev -> ../bin/busybox
./_install//sbin/mkdosfs -> ../bin/busybox
./_install//sbin/mke2fs -> ../bin/busybox
./_install//sbin/mkfs.ext2 -> ../bin/busybox
./_install//sbin/mkfs.reiser -> ../bin/busybox
./_install//sbin/mkfs.vfat -> ../bin/busybox
./_install//sbin/mkswap -> ../bin/busybox
./_install//sbin/modinfo -> ../bin/busybox
./_install//sbin/modprobe -> ../bin/busybox
./_install//sbin/nameif -> ../bin/busybox
./_install//sbin/nanddump -> ../bin/busybox
./_install//sbin/nandwrite -> ../bin/busybox
./_install//sbin/nbd-client -> ../bin/busybox
./_install//sbin/ntpd -> ../bin/busybox
./_install//sbin/pivot_root -> ../bin/busybox
./_install//sbin/popmaildir -> ../bin/busybox
./_install//sbin/poweroff -> ../bin/busybox
./_install//sbin/raidautorun -> ../bin/busybox
./_install//sbin/rdate -> ../bin/busybox
./_install//sbin/reboot -> ../bin/busybox
./_install//sbin/rmmod -> ../bin/busybox
./_install//sbin/route -> ../bin/busybox
./_install//sbin/runlevel -> ../bin/busybox
./_install//sbin/sendmail -> ../bin/busybox
./_install//sbin/setconsole -> ../bin/busybox
./_install//sbin/setfont -> ../bin/busybox
./_install//sbin/setlogcons -> ../bin/busybox
./_install//sbin/start-stop-daemon -> ../bin/busybox
./_install//sbin/swapoff -> ../bin/busybox
./_install//sbin/swapon -> ../bin/busybox
./_install//sbin/switch_root -> ../bin/busybox
./_install//sbin/sysctl -> ../bin/busybox
./_install//sbin/syslogd -> ../bin/busybox
./_install//sbin/telnetd -> ../bin/busybox
./_install//sbin/tunctl -> ../bin/busybox
./_install//sbin/tune2fs -> ../bin/busybox
./_install//sbin/ubiattach -> ../bin/busybox
./_install//sbin/ubidetach -> ../bin/busybox
./_install//sbin/ubimkvol -> ../bin/busybox
./_install//sbin/ubirmvol -> ../bin/busybox
./_install//sbin/ubirsvol -> ../bin/busybox
./_install//sbin/ubiupdatevol -> ../bin/busybox
./_install//sbin/udhcpc -> ../bin/busybox
./_install//sbin/udhcpd -> ../bin/busybox
./_install//sbin/vconfig -> ../bin/busybox
./_install//sbin/watchdog -> ../bin/busybox
./_install//sbin/zcip -> ../bin/busybox

it seems to set a whole lot of smylinks. which means is it effecting more than just ar. Maybe that is why is stopping manpages and dispatch-conf from working
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4002
Location: USA

PostPosted: Fri May 11, 2012 4:27 am    Post subject: Reply with quote

Hmm. I recall it doing that on my systems but it sure does not install to /bin. So are there a whole bunch of symlinks in /bin? That was printed during the install inside of the sandbox IIRC, so it's not the real install...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Mac Tzu
n00b
n00b


Joined: 13 May 2007
Posts: 42
Location: Melbourne, Australia

PostPosted: Sat May 12, 2012 10:23 am    Post subject: Reply with quote

Hey eccerr0r

Look I have been on IRC and chatting about this issue. They are also at a loss. So I have thought that is it best to start from a fresh installation.

Thank you for all your help

Regards
Back to top
View user's profile Send private message
wcg
Guru
Guru


Joined: 06 Jan 2009
Posts: 588

PostPosted: Sat May 12, 2012 12:41 pm    Post subject: Reply with quote

This looks like a USE flag artifact (making symlinks for all of the
programs that busybox could emulate if you wanted it to, as if
it were installed on an embedded or other system with very
tight disk space). Usually someone would only set such a USE
flag if they knew they needed it.

What does
Code:

ls -l /etc/make.profile

show?
_________________
TIA
Back to top
View user's profile Send private message
Mac Tzu
n00b
n00b


Joined: 13 May 2007
Posts: 42
Location: Melbourne, Australia

PostPosted: Mon May 14, 2012 12:00 pm    Post subject: Reply with quote

wcg,

Hey I have now reinstalled but I did check my make.conf and below is the use flag sections

Code:

USE="X aac accesibility acpi alsa apache bash-completion bluetooth \
     bzip2 cddb cdr dbus doc dri dv dvd dvdr dvdread esd encode fastcgi fbcon \
     ffmpeg firefox flac ftp gif gpm gstreamer  ieee1394 ipod ipv6 java \
     javascript jpeg kde lame lirc matroska matrox mime mozilla mp3 mpeg pdf \
     mplayer msn nptl opengl oss pcmcia pda perl png python qdbm qt4 xml \
     quicktime samba smartcard sse sse2 svg v4l v4l2 usb udev vcd verbose vorbis \
     wifi xcomposite xine xinerama xscreensaver xvid zlib sdl nls dts multilib \
     ogg aalib joystick a52 theora threads musepack speex motif truetype amd64 \
     unicode dvb ati radeon gcc64 sse3 transcode consolekit pam policykit \
     -gtk -gnome -fortran -hal"
Back to top
View user's profile Send private message
ryao
Developer
Developer


Joined: 27 Feb 2012
Posts: 123

PostPosted: Wed Feb 12, 2014 4:23 pm    Post subject: Reply with quote

Mac Tzu, I realize this is a late response, but this problem occurred because you made /bin/sh symlink to busybox and Gentoo's busybox currently includes ar. busybox's shell will use any tools that busybox contains as shell builtins. Since its ar implementation does not support 's' (at least as busybox was compiled) and Linux's build system depends on it, the Linux build will break.

There is no sane reason that I can see for including ar in our busybox package, so I have filed bug #501092 for the Gentoo busybox maintainers requesting that they remove ar from our busybox package.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2457
Location: Germany

PostPosted: Thu Feb 13, 2014 2:44 pm    Post subject: Reply with quote

The beauty of Gentoo's busybox is that it's not castrated like Debian's. Why is anyone trying to build Linux from within a busybox shell anyway? Also, you can just alias ar=/usr/bin/ar as a workaround. Not sure if busybox has a setting to try the binary before builtin... it certainly has a setting to disable the builtin in the first place, but that causes other issues / requires you to create a ton of symlinks...
_________________
Linux-User @ VServer (Debian), Desktop (Gentoo), Netbook (Ubuntu), Router (OpenWRT), PDA (Cacko), Smartphone (Android)
Back to top
View user's profile Send private message
ryao
Developer
Developer


Joined: 27 Feb 2012
Posts: 123

PostPosted: Sat Feb 22, 2014 6:56 pm    Post subject: Reply with quote

frostschutz wrote:
The beauty of Gentoo's busybox is that it's not castrated like Debian's. Why is anyone trying to build Linux from within a busybox shell anyway? Also, you can just alias ar=/usr/bin/ar as a workaround. Not sure if busybox has a setting to try the binary before builtin... it certainly has a setting to disable the builtin in the first place, but that causes other issues / requires you to create a ton of symlinks...


I suggest that you test your suggestions before making them. Your suggestion will not work without kernel source modification that would cause Linus Torvalds to start uttering profanity. Not only should users never need to do that, but few would know how.

That being said, the fact is there is a bug and it will be corrected. There is no need to insult Gentoo developers by telling us that our distribution is good because it is bloated.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2457
Location: Germany

PostPosted: Sat Feb 22, 2014 9:56 pm    Post subject: Reply with quote

ryao wrote:
I suggest that you test your suggestions before making them.


I did test it. Like this:

Code:

$ busybox sh
~ $ ar
BusyBox v1.22.1 (2014-01-20 20:37:02 CET) multi-call binary.
[...]
~ $ alias ar=/usr/bin/ar
~ $ ar
Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
       /usr/bin/ar -M [<mri-script]


So it does work, you can coerce it to use the real ar with an alias. Whether it works for building a kernel - I have not tested, so if the kernel somehow uses this shell but avoids using its aliases, too bad. Maybe you shouldn't be trying to build kernels with busybox then.

ryao wrote:
There is no need to insult Gentoo developers by telling us that our distribution is good because it is bloated.


I do not remember insulting anyone, but if you do feel insulted personally, you're quite welcome to it.

Debian's busybox has about 100 builtins; Gentoo's has over 300. What you call bloated, I call useful. Removing builtins because they do not work in some scenarios - which is true for almost any builtin, since none of them are quite as fully featured as their counterparts - that's just a plain stupid idea. Whatever would you do that for? You'd fix one thing but break others.

Surprisingly enough, Debian's busybox, limited as it is, still includes ar - the non-posix-compliant one. :lol:

Like I mentioned in my earlier reply, I'd like to see a best of both worlds setting in busybox, that is: make it use the real binary if it's present, fall back to the builtin otherwise. Last time I checked, busybox did not have such a setting though; you had the choice between builtins overriding everything, or builtins being unavailable altogether unless you created symlinks or called them via 'busybox builtin ...' instead.

@ryao:

Also, are you testing your own suggestions? I just wanted to test the CONFIG_AR_POSIX you suggested in the bugtracker, but there does not seem to be such an option. Even reading the ar.c sourcecode directly, there simply isn't any code that would implement -s.
_________________
Linux-User @ VServer (Debian), Desktop (Gentoo), Netbook (Ubuntu), Router (OpenWRT), PDA (Cacko), Smartphone (Android)
Back to top
View user's profile Send private message
ryao
Developer
Developer


Joined: 27 Feb 2012
Posts: 123

PostPosted: Thu Feb 27, 2014 5:02 am    Post subject: Reply with quote

frostschutz wrote:
ryao wrote:
I suggest that you test your suggestions before making them.


I did test it. Like this:

Code:

$ busybox sh
~ $ ar
BusyBox v1.22.1 (2014-01-20 20:37:02 CET) multi-call binary.
[...]
~ $ alias ar=/usr/bin/ar
~ $ ar
Usage: /usr/bin/ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
       /usr/bin/ar -M [<mri-script]


So it does work, you can coerce it to use the real ar with an alias. Whether it works for building a kernel - I have not tested, so if the kernel somehow uses this shell but avoids using its aliases, too bad. Maybe you shouldn't be trying to build kernels with busybox then.


Try doing kernel compilation. That won't work.

frostschutz wrote:
ryao wrote:
There is no need to insult Gentoo developers by telling us that our distribution is good because it is bloated.


I do not remember insulting anyone, but if you do feel insulted personally, you're quite welcome to it.

Debian's busybox has about 100 builtins; Gentoo's has over 300. What you call bloated, I call useful. Removing builtins because they do not work in some scenarios - which is true for almost any builtin, since none of them are quite as fully featured as their counterparts - that's just a plain stupid idea. Whatever would you do that for? You'd fix one thing but break others.

Surprisingly enough, Debian's busybox, limited as it is, still includes ar - the non-posix-compliant one. :lol:


Yet you cannot state a reason why this particular utility should be included.

frostschutz wrote:
Like I mentioned in my earlier reply, I'd like to see a best of both worlds setting in busybox, that is: make it use the real binary if it's present, fall back to the builtin otherwise. Last time I checked, busybox did not have such a setting though; you had the choice between builtins overriding everything, or builtins being unavailable altogether unless you created symlinks or called them via 'busybox builtin ...' instead.

@ryao:

Also, are you testing your own suggestions? I just wanted to test the CONFIG_AR_POSIX you suggested in the bugtracker, but there does not seem to be such an option. Even reading the ar.c sourcecode directly, there simply isn't any code that would implement -s.


That was actually the suggestion of one of the Gentoo developers responsible for maintaining busybox in Gentoo. I just passed it along.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2457
Location: Germany

PostPosted: Thu Feb 27, 2014 2:10 pm    Post subject: Reply with quote

ryao wrote:
Yet you cannot state a reason why this particular utility should be included.


It would break scripts that use it. It also would make it less capable as a rescue shell. Also it makes a bad example, sets a precedence for removing useful builtins just because they fail in some obscure use case.

You have not provided a reason why it should be removed, either. This thread here was about a case where someone inadvertently installed his system full of busybox symlinks. That broke the kernel compile, but also a whole bunch of other stuff:

Mac Tzu wrote:
it seems to set a whole lot of smylinks. which means is it effecting more than just ar. Maybe that is why is stopping manpages and dispatch-conf from working


The issue was also mentioned in other threads, also by users who did not have a valid reason to use busybox as their system shell. Those who do probably also (should) know how to work around such issues.

In this context the bug report is invalid to begin with. There is nothing to fix. The solution you are looking for is not removing utilities from busybox, but busybox from a system that needs a fully functional build environment rather than a minimal embedded/rescue environment, which is busybox' true purpose.

ryao wrote:
That was actually the suggestion of one of the Gentoo developers responsible for maintaining busybox in Gentoo. I just passed it along.


Naturally, naturally :lol: :roll:

I'm out, have fun breaking things.
_________________
Linux-User @ VServer (Debian), Desktop (Gentoo), Netbook (Ubuntu), Router (OpenWRT), PDA (Cacko), Smartphone (Android)
Back to top
View user's profile Send private message
ryao
Developer
Developer


Joined: 27 Feb 2012
Posts: 123

PostPosted: Thu Feb 27, 2014 3:45 pm    Post subject: Reply with quote

frostschutz wrote:
ryao wrote:
Yet you cannot state a reason why this particular utility should be included.


It would break scripts that use it. It also would make it less capable as a rescue shell. Also it makes a bad example, sets a precedence for removing useful builtins just because they fail in some obscure use case.


First, no one has justified this builtin as useful. Second, I am fairly confident zero scripts are using it.

frostschutz wrote:
You have not provided a reason why it should be removed, either. This thread here was about a case where someone inadvertently installed his system full of busybox symlinks. That broke the kernel compile, but also a whole bunch of other stuff:


His system had 1 busybox symlink. It is /bin/sh and eselect-sh permitted this until very recently. As for why it should be removed, the concept that it never should have been there in the first place is a fairly good one.
Back to top
View user's profile Send private message
hakanekat
n00b
n00b


Joined: 13 Jan 2014
Posts: 7
Location: Kyoto, Japan

PostPosted: Tue Mar 25, 2014 6:58 am    Post subject: I cannot compile kernel, either Reply with quote

I have been caught by this problem, too.

For ordinary Gentoo users with average knowledge, like me,
the current most serious problem is
not an ideological legitimacy on the system,
but the fact that you will never succeed to compile kernel now.

I would like you, the intelligent relevants, to propose some practical solutions on this problem.
_________________
Hiroshi Takenaka, Kyoto, 617-0833 Japan
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2457
Location: Germany

PostPosted: Tue Mar 25, 2014 1:54 pm    Post subject: Re: I cannot compile kernel, either Reply with quote

The practical solution: don't use busybox as your system shell.

Code:
$ readlink /bin/sh
bash


You can change it with eselect if you have eselect-sh installed.
_________________
Linux-User @ VServer (Debian), Desktop (Gentoo), Netbook (Ubuntu), Router (OpenWRT), PDA (Cacko), Smartphone (Android)
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2692
Location: The Peanut Gallery

PostPosted: Tue Mar 25, 2014 4:23 pm    Post subject: Reply with quote

If you want to use busybox as /bin/sh set USE=savedconfig and configure the build in /etc/portage/savedconfig/sys-apps/busybox (I think you can use one per-package, but per-version is probably best.) If your machine is not embedded, and has the GNU userland available you should disable certain apps. I haven't gone down this route yet, as it's hassle, and Gentoo devs don't seem very interested in making things work out of the box, so you're pretty much on your own. It was easier just to go back to /bin/sh linked to bash.

WRT building the kernel, every makefile that's any good should accept eg: make AR=/usr/bin/ar [target such as: install]. Just be sure to put the assignments before any target name.
Back to top
View user's profile Send private message
khayyam
Advocate
Advocate


Joined: 07 Jun 2012
Posts: 2244

PostPosted: Tue Mar 25, 2014 8:27 pm    Post subject: Reply with quote

steve, et al ...

Two other possible options ... one is to install app-shells/ash-bb::foo-overlay which is a (standalone) ash so no extranious busybox utilities (it can also be built statically, with USE="static", if needed). The other is to use app-shells/dash as the posix shell ...

Code:
# eselect sh list
Available POSIX shell implementations:
  [1]   ash
  [2]   bash
  [3]   dash *
  [4]   zsh
  [5]   busybox

I found dash to work best for init scripts, though I don't remember testing (standalone) ash at all.

best ... khay
Back to top
View user's profile Send private message
hakanekat
n00b
n00b


Joined: 13 Jan 2014
Posts: 7
Location: Kyoto, Japan

PostPosted: Wed Mar 26, 2014 2:12 am    Post subject: Reply with quote

:D
Quote:
make AR=/usr/bin/ar

works fine and I seem to have been released from the problem.

By the way, I cannot understand why make calls ar built in busybox
althogh readlink shows that /bin/sh is linked to /bin/bash.
_________________
Hiroshi Takenaka, Kyoto, 617-0833 Japan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum