LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-17-2013, 03:32 AM   #1
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Rep: Reputation: Disabled
Bash-2.05b won't compile on slackware-14.0


It doesn't help that I'm not a C programmer

I've tried various build scripts:
Here are the errors using the source and build script from slackware-9.1:
First there seems to be problems with the patches:
Quote:
bash-2.05b/y.tab.c
bash-2.05b/y.tab.h
bash-2.05b/parser-built
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/lib/readline/bind.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-001
|
|Bug-Reported-by: taviso@sdf.lonestar.org
|Bug-Reference-ID: <200208021107.g72B723d021352@darkstar.example.net>
|Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-ba...st/004980.html
|
|Bug-Description:
|
|Bash goes into an infinite loop and eventually crashes with a SIGSEGV
|when some keys on the numeric keypad are pressed, possibly in combination
|with the shift key.
|
|Patch:
|
|*** ../bash-2.05b/lib/readline/bind.c Thu Jan 24 11:15:52 2002
|--- lib/readline/bind.c Wed Jul 31 09:11:18 2002
--------------------------
patching file lib/readline/bind.c
Using Plan A...
Hunk #1 succeeded at 312.
done
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/lib/readline/readline.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-002
|
|Bug-Reported-by: rwhron@earthlink.net
|Bug-Reference-ID: <20020724000454.GA15210@rushmore> (bug-bash)
|Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-ba...ly/004856.html
|
|Bug-Description:
|
|Repeating an edit in vi-mode with `.' does not work.
|
|Patch:
|
|*** ../bash-2.05b/lib/readline/readline.c Wed Mar 13 17:10:46 2002
|--- lib/readline/readline.c Tue Jul 30 17:46:44 2002
--------------------------
patching file lib/readline/readline.c
Using Plan A...
Hunk #1 succeeded at 685.
Hmm... Ignoring the trailing garbage.
done
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/bashline.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-003
|
|Bug-Reported-by: jan.q.bruun-andersen@posten.se
|Bug-Reference-ID: <BE156C6450189B4ABAF7381F0AD4724A0165674F@002exmbs002.ad.posten.se>
|Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-ba...ly/004789.html
|
|Bug-Description:
|
|In certain cases, Bash appends a space instead of a slash to a directory
|name relative to the current directory when performing command name
|completion. This affects partial completion of intermediate directory
|names.
|
|Patch:
|
|*** ../bash-2.05b/bashline.c Tue May 7 15:52:42 2002
|--- bashline.c Sat Aug 3 11:40:16 2002
--------------------------
patching file bashline.c
Using Plan A...
Hunk #1 succeeded at 1045.
Hunk #2 succeeded at 1056.
Hunk #3 succeeded at 1065.
done
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/subst.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-004
|
|Bug-Reported-by: c.f.a.johnson@rogers.com
|Bug-Reference-ID: <aji8sb$1aa9bi$2@ID-136730.news.dfncis.de>
|Bug-Reference-URL: http://mail.gnu.org/pipermail/bug-ba...st/005074.html
|
|Bug-Description:
|
|A bug in the bash variable expansion code causes leading blanks in a
|variable's value to be ignored when computing its length.
|
|Patch:
|
|*** ../bash-2.05b/subst.c Mon Jun 24 07:59:45 2002
|--- subst.c Sat Aug 17 17:28:46 2002
--------------------------
patching file subst.c
Using Plan A...
Hunk #1 succeeded at 1639.
Hmm... Ignoring the trailing garbage.
done
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/lib/readline/mbutil.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-005
|
|Bug-Reported-by: Jim Meyering <jim@meyering.net>
|Bug-Reference-ID: <87bs6v8iib.fsf@pixie.eng.ascend.com>
|Bug-Reference-URL: http://mail.gnu.org/archive/html/bug.../msg00047.html
|
|Bug-Description:
|
|When in a locale with multibyte characters, the readline display updater
|will occasionally cause a segmentation fault when attempting to compute
|the length of the first multibyte character on the line.
|
|Patch:
|
|*** ../bash-2.05b/lib/readline/mbutil.c Tue Jun 4 11:54:29 2002
|--- lib/readline/mbutil.c Mon Aug 5 11:20:39 2002
--------------------------
patching file lib/readline/mbutil.c
Using Plan A...
Hunk #1 succeeded at 206.
Hunk #2 succeeded at 214.
Hunk #3 succeeded at 228.
Hunk #4 succeeded at 282.
done
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/lib/readline/display.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-006
|
|Bug-Reported-by: clowenst@ucsd.edu
|Bug-Reference-ID: <156388ec.0212021151.51a48df1@posting.google.com>
|Bug-Reference-URL:
|
|Bug-Description:
|
|When running in a locale with multibyte characters, the readline display
|updater will use carriage returns when drawing the line, overwriting any
|partial output already on the screen and not terminated by a newline.
|
|Patch:
|
|*** ../bash-2.05b/lib/readline/display.c Tue Jun 4 10:54:47 2002
|--- lib/readline/display.c Fri Sep 13 16:22:57 2002
--------------------------
patching file lib/readline/display.c
Using Plan A...
Hunk #1 succeeded at 71.
Hunk #2 succeeded at 1349.
Hunk #3 succeeded at 1511.
Hunk #4 succeeded at 1602.
Hunk #5 succeeded at 2121.
Using Plan A...
Hunk #1 succeeded at 206.
Hunk #2 succeeded at 214.
Hunk #3 succeeded at 228.
Hunk #4 succeeded at 282.
done
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/lib/readline/display.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-006
|
|Bug-Reported-by: clowenst@ucsd.edu
|Bug-Reference-ID: <156388ec.0212021151.51a48df1@posting.google.com>
|Bug-Reference-URL:
|
|Bug-Description:
|
|When running in a locale with multibyte characters, the readline display
|updater will use carriage returns when drawing the line, overwriting any
|partial output already on the screen and not terminated by a newline.
|
|Patch:
|
|*** ../bash-2.05b/lib/readline/display.c Tue Jun 4 10:54:47 2002
|--- lib/readline/display.c Fri Sep 13 16:22:57 2002
--------------------------
patching file lib/readline/display.c
Using Plan A...
Hunk #1 succeeded at 71.
Hunk #2 succeeded at 1349.
Hunk #3 succeeded at 1511.
Hunk #4 succeeded at 1602.
Hunk #5 succeeded at 2121.
Hunk #6 succeeded at 2197.
done
Hmm...Ignoring potentially dangerous file name ../bash-2.05b/lib/readline/vi_mode.c
Looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
| BASH PATCH REPORT
| =================
|
|Bash-Release: 2.05b
|Patch-ID: bash205b-007
|
|Bug-Reported-by: dman@dman.ddts.net
|Bug-Reference-ID: <15893.26358.129589.503364@gargle.gargle.HOWL>
|Bug-Reference-URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=175127
|
|Bug-Description:
|
|Using the vi editing mode's case-changing commands in a locale with
|multibyte characters will cause garbage characters to be inserted into
|the editing buffer.
|
|Patch:
|
|*** ../bash-2.05b/lib/readline/vi_mode.c Thu May 23 13:27:58 2002
|--- lib/readline/vi_mode.c Tue Feb 4 15:11:07 2003
--------------------------
patching file lib/readline/vi_mode.c
Using Plan A...
Hunk #1 succeeded at 681.
Hunk #2 succeeded at 705.
done
configure: WARNING: you should use --build, --host, --target
checking build system type... x86_64-slackware-linux-gnu
checking host system type... x86_64-slackware-linux-gnu

Beginning configuration for bash-2.05b-release for x86_64-slackware-linux-gnu
It goes on to the compile and then gets these errors:

Quote:
ar cr libtilde.a tilde.o
test -n "ranlib" && ranlib libtilde.a
make[1]: Leaving directory `/tmp/bash-2.05b/lib/tilde'
make[1]: Entering directory `/tmp/bash-2.05b/lib/malloc'
x86_64-slackware-linux-gcc -I. -I../.. -I../.. -I../../include -I../../lib -DHAVE_CONFIG_H -DSHELL -O2 -fPIC -DRCHECK -Dbotch=programming_error -c malloc.c
malloc.c: In function ‘internal_free’:
malloc.c:881:1: error: label at end of compound statement
make[1]: *** [malloc.o] Error 1
make[1]: Leaving directory `/tmp/bash-2.05b/lib/malloc'
make: *** [lib/malloc/libmalloc.a] Error 1
make[1]: Entering directory `/tmp/bash-2.05b/lib/malloc'
x86_64-slackware-linux-gcc -I. -I../.. -I../.. -I../../include -I../../lib -DHAVE_CONFIG_H -DSHELL -O2 -fPIC -DRCHECK -Dbotch=programming_error -c malloc.c
malloc.c: In function ‘internal_free’:
malloc.c:881:1: error: label at end of compound statement
make[1]: *** [malloc.o] Error 1
make[1]: Leaving directory `/tmp/bash-2.05b/lib/malloc'
make: *** [lib/malloc/libmalloc.a] Error 1
mv: cannot stat ‘/tmp/package-bash/usr/bin/bash’: No such file or directory
BTW - despite the fatal errors, this buildscript then carries on and builds a package without the bash program in it, so installing the package without checking the log, which is what I did, left me without any bash - luckily I had ash and dash installed.
 
Old 12-17-2013, 03:38 AM   #2
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
I then tried using the slackware64 script from slackware-13.0:

Quote:
x86_64-slackware-linux-gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-slackware-linux-gnu"' -DCONF_VENDOR='"slackware"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -g -o mksyntax ./mksyntax.c
rm -f eval.o
x86_64-slackware-linux-gcc -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"linux-gnu"' -DCONF_MACHTYPE='"x86_64-slackware-linux-gnu"' -DCONF_VENDOR='"slackware"' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -O2 -fPIC -c eval.c
make[1]: Entering directory `/tmp/bash-2.05b/builtins'
rm -f mkbuiltins.o
x86_64-slackware-linux-gcc -c -DHAVE_CONFIG_H -DSHELL -I. -I.. -I.. -I../include -I../lib -I. -g mkbuiltins.c
In file included from eval.c:33:0:
shell.h:43:21: fatal error: version.h: No such file or directory
compilation terminated.
make: *** [eval.o] Error 1
make: *** Waiting for unfinished jobs....
x86_64-slackware-linux-gcc -rdynamic -O2 -fPIC -o mkbuiltins mkbuiltins.o -ldl
./mkbuiltins -externfile builtext.h -structfile builtins.c \
-noproduction -D . ./alias.def ./bind.def ./break.def ./builtin.def ./cd.def ./colon.def ./command.def ./declare.def ./echo.def ./enable.def ./eval.def ./getopts.def ./exec.def ./exit.def ./fc.def ./fg_bg.def ./hash.def ./help.def ./history.def ./jobs.def ./kill.def ./let.def ./read.def ./return.def ./set.def ./setattr.def ./shift.def ./source.def ./suspend.def ./test.def ./times.def ./trap.def ./type.def ./ulimit.def ./umask.def ./wait.def ./reserved.def ./pushd.def ./shopt.def ./printf.def ./complete.def
make[1]: Leaving directory `/tmp/bash-2.05b/builtins'
 
Old 12-17-2013, 03:40 AM   #3
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
Here is the modified Slackware-9.1 build script:
Quote:
#!/bin/sh
# Set initial variables:
CWD=`pwd`
if [ "$TMP" = "" ]; then
TMP=/tmp
fi
PKG=$TMP/package-bash

VERSION=2.05b
ARCH=x86_64
BUILD=3


if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi

if [ ! -d $TMP ]; then
mkdir -p $TMP # location to build the source
fi
rm -rf $PKG
mkdir -p $PKG

cd $TMP
rm -rf bash-$VERSION
tar xzvf $CWD/bash-$VERSION.tar.gz
cd bash-$VERSION
chown -R root.root .
find . -perm 664 | xargs chmod 644
find . -perm 775 | xargs chmod 755
for patch in $CWD/patches/bash* ; do
zcat $patch | patch -p0 --verbose
done
CFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr $ARCH-slackware-linux
make
make install DESTDIR=$PKG
mkdir -p $PKG/bin
mv $PKG/usr/bin/bash $PKG/bin/bash2.new
strip $PKG/bin/bash2.new
chown -R root.bin $PKG/bin
# We don't include the "bashbug" script.
rm -rf $PKG/usr/bin $PKG/usr/man/man1/bashbug.1
gzip -9 $PKG/usr/man/man1/*
mkdir -p $PKG/usr/doc/bash-$VERSION
cp -a AUTHORS CHANGES COMPAT COPYING INSTALL MANIFEST NEWS NOTES \
README Y2K doc/FAQ doc/INTRO $PKG/usr/doc/bash-$VERSION
cd doc
groff -ms -Tascii article.ms > $PKG/usr/doc/bash-$VERSION/article.txt
# bash.1 is already installed by "make install"
for page in builtins.1 rbash.1 ; do
cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
done
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*
mkdir -p $PKG/install
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc

# Build the package:
cd $PKG
makepkg -l y -c n $TMP/bash-$VERSION-$ARCH-$BUILD.tgz

# Clean up the extra stuff:
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/bash-$VERSION
rm -rf $PKG
fi
 
Old 12-17-2013, 03:42 AM   #4
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
Here is the modified slackware-13.0 build script:
Quote:
VERSION=2.05b
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-2}

CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-bash

if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi

rm -rf $PKG
mkdir -p $TMP $PKG

# Determine bash patchlevel:
PATCHLEVEL=`( cd $CWD/patches ; /bin/ls *gz | tail -1 | cut -f 2 -d - | cut -f 1 -d . 2> /dev/null )`
if [ "$PATCHLEVEL" = "" ]; then
PATCHLEVEL=0
fi

cd $TMP
rm -rf bash-$VERSION
tar xzvf $CWD/bash-$VERSION.tar.gz || exit 1
cd bash-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;

for patch in $CWD/patches/bash* ; do
zcat $patch | patch -p0 --verbose || exit 1
done
CFLAGS="$SLKCFLAGS" \
./configure --prefix=/usr $ARCH-slackware-linux
make -j3 || exit 1
make install DESTDIR=$PKG
mkdir -p $PKG/bin
mv $PKG/usr/bin/bash $PKG/bin/bash2.new
strip --strip-unneeded $PKG/bin/bash2.new
# We don't include the "bashbug" script.
rm -rf $PKG/usr/bin $PKG/usr/man/man1/bashbug.1
gzip -9 $PKG/usr/man/man1/*
mkdir -p $PKG/usr/doc/bash-$VERSION
cp -a AUTHORS CHANGES COMPAT COPYING INSTALL MANIFEST NEWS NOTES \
README Y2K doc/FAQ doc/INTRO $PKG/usr/doc/bash-$VERSION
cd doc
groff -ms -Tascii article.ms > $PKG/usr/doc/bash-$VERSION/article.txt
# bash.1 is already installed by "make install"
for page in builtins.1 rbash.1 ; do
cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
done
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*
mkdir -p $PKG/install
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc

# Build the package:
cd $PKG
makepkg -l y -c n $TMP/bash-$VERSION.$PATCHLEVEL-$ARCH-$BUILD.txz

# Clean up the extra stuff:
if [ "$1" = "--cleanup" ]; then
rm -rf $TMP/bash-$VERSION
rm -rf $PKG
fi
 
Old 12-17-2013, 01:51 PM   #5
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Original Poster
Rep: Reputation: Disabled
This was solved in the the thread What would break with a very early version of bash?
 
  


Reply

Tags
bash, bash-2.05b, buildscript, slackware64



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
howto update bash 2.05b > 3.0 pingvina Linux - Newbie 2 12-29-2005 03:08 PM
$LINENO can't be modified in bash 3.0, while it can be in bash 2.05b Darwish Linux - Software 1 11-07-2005 02:57 PM
root turned to bash-2.05b renegadeavenger Linux - Newbie 2 07-24-2004 09:43 PM
Configure Bash 2.05b JCScoobyRS Linux - Software 9 12-15-2003 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration