Notes |
(0002610)
vapier
07-20-07 15:37
|
no, not all systems have /bin/bash, but trylink is a POSIX shell script and all systems must have a /bin/sh
as for usage, it builds fine for me on OS X so i dont know what your trouble is, but simply disabling it in the Makefile is incorrect |
| |
(0002615)
vda
07-21-07 07:39
|
-#!/bin/sh
+#!/usr/bin/env bash
Can you fix bash-isms in trylink instead, so that it runs under your shell. Which one do you use?
>compressed usage generation does not work
Then proprly #ifdef out relevant pieces conditionally on FEATURE_COMPRESS_USAGE. (We are a bit lax with it now, yes.) Your patch is a quick hack |
| |
(0002622)
mirabilos
07-21-07 09:09
|
I'll see to the bashisms - when looking now, I don't see
them either. Maybe the script changed in the meantime, I
think that part was first done for 1.2.x or so.
Regarding the "compressed help" stuff: even if disabling
the "compressed help" option, it still tries to build a
host programme (helper) which breaks on BSD (but I will
try again without that diff if you think it shouldn't). |
| |
(0002629)
mirabilos
07-23-07 03:17
|
This is the problem with compressed help:
gcc -Wp,-MD,applets/.usage.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I/home/.data/tg/svn/trunk/freewrt/build_mipsel/w-busybox-1.4.2-24/busybox-1.4.2/include -o applets/usage applets/usage.c
applets/usage.c:0: note: someone does not honour COPTS correctly, passed 0 times
In file included from applets/../include/libbb.h:13,
from applets/../include/busybox.h:10,
from applets/usage.c:5:
applets/../include/platform.h:93:23: byteswap.h: No such file or directory
applets/../include/platform.h:94:21: endian.h: No such file or directory
In file included from applets/../include/libbb.h:13,
from applets/../include/busybox.h:10,
from applets/usage.c:5:
applets/../include/platform.h:132: error: conflicting types for 'socklen_t'
/usr/include/sys/types.h:109: error: previous declaration of 'socklen_t' was here
In file included from applets/../include/libbb.h:20,
from applets/../include/busybox.h:10,
from applets/usage.c:5:
/usr/include/malloc.h:4:2: warning: #warning "<malloc.h> is obsolete, use <stdlib.h>"
In file included from applets/../include/busybox.h:10,
from applets/usage.c:5:
applets/../include/libbb.h:33:24: sys/statfs.h: No such file or directory
In file included from applets/../include/libbb.h:53,
from applets/../include/busybox.h:10,
from applets/usage.c:5:
applets/../include/grp_.h:44: error: conflicting types for 'setgroups'
/usr/include/unistd.h:202: error: previous declaration of 'setgroups' was here
applets/../include/grp_.h:44: error: conflicting types for 'setgroups'
/usr/include/unistd.h:202: error: previous declaration of 'setgroups' was here
In file included from applets/../include/busybox.h:10,
from applets/usage.c:5:
applets/../include/libbb.h:285: warning: "struct sockaddr_in" declared inside parameter list
applets/../include/libbb.h:296: error: field `sin' has incomplete type
applets/../include/libbb.h:298: error: field `sin6' has incomplete type
gmake[4]: *** [applets/usage] Error 1
That's why I had to disable building that helper programme. |
| |
(0002630)
mirabilos
07-23-07 03:31
|
ok, the bash issue is indeed no longer present,
I cannot reproduce the problems we had had in
the past any more and don't remember them either...
I guess this is what happens with diffs when they
aren't maintained upstream...
And this works better too:
--- busybox-1.4.2/applets/Kbuild.orig Sun Mar 18 16:59:13 2007
+++ busybox-1.4.2/applets/Kbuild Fri Jul 20 12:08:48 2007
@@ -8,6 +8,7 @@ obj-y:=
obj-y += applets.o
obj-y += busybox.o
+ifneq (${CONFIG_FEATURE_COMPRESS_USAGE},)
# Generated file needs additional love
applets/applets.o: include/usage_compressed.h
@@ -20,3 +21,4 @@ quiet_cmd_gen_usage_compressed = GEN
cmd_gen_usage_compressed = $(srctree)/applets/usage_compressed include/usage_compressed.h applets
include/usage_compressed.h: $(srctree)/include/usage.h applets/usage
$(call cmd,gen_usage_compressed)
+endif |
| |
(0002638)
vapier
07-23-07 15:29
|
the compressed help should already be fixed as well
please use current svn trunk when doing testing and posting patches |
| |
(0002646)
ulmen
07-31-07 11:57
edited on: 07-31-07 12:09
|
I was the original discoverer of the bashism in the trylink script in our project. I use dash as my /bin/sh, which is known to be very POSIX-compilant and not much more.
"function" is not in the IEEE Std 1003.1.
It's fixed in your trunk and 1.5/1.6-branch since rev 17973, but please change this in the 1.4 branch (if still supported), too.
--- busybox-1.4.2/scripts/trylink.orig 2007-07-31 20:46:00.000000000 +0200
+++ busybox-1.4.2/scripts/trylink 2007-07-31 20:46:15.000000000 +0200
@@ -2,7 +2,7 @@
debug=false
-function try {
+try() {
added="$1"
shift
$debug && echo "Trying: $* $added"
|
| |