FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 01-07-2008, 07:52 PM
Harry Putnam
 
Default emerge of ksh93 erroring out.. who can interpret

I'm having a time getting ksh93 to install (build error at the end)

USE='static' emerge -v ksh93

The only other use flag coming up was `nls'

I wasn't real eager for `static' necessarily but without `static' had
already failed and I saw it was a possible flag. Also it might be
handy sometime in a trouble situation where only `/ ' is mounted.

But that discussion is for some other time.

Can anyone interpret this emerge failure and have some educated
guesses what I should do to get it to compile. That message follows
the eix output below.

My feeble take on the message is that it is related to the compiler.

eix shows two installed and I guess that may be the problem:
eix -I gcc$

[D] sys-devel/gcc
Available versions:
(2.95) 2.95.3-r9 ~2.95.3-r10
(3.1) 3.1.1-r2
(3.2) **3.2.2 3.2.3-r4
(3.3) ~3.3.6-r1
(3.4) 3.4.6-r2
(4.0) [M]~*4.0.3 [M]~*4.0.4
(4.1) [M]~4.1.0-r1 [M]4.1.1-r3 [M]4.1.2
(4.2) [M]~4.2.0 [M]~4.2.1 [M]~4.2.2

{altivec bootstrap boundschecking build d doc fortran gcj gtk
hardened ip28 ip32r10k java mudflap multilib multislot n32 n64
nls nocxx nopie nossp objc objc++ objc-gc openmp static test
vanilla}

Installed versions: 3.4.6-r2(3.4)(14:36:31 01/02/08)(nls -altivec
-bootstrap -boundschecking -build -d -doc -fortran -gcj -gtk
-hardened -ip28 -ip32r10k -multilib -multislot -n32 -n64 -nocxx
-nopie -nossp -objc -test -vanilla)

4.1.1-r3(4.1)(19:54:45 04/19/07)(fortran nls
-altivec -bootstrap -build -doc -gcj -gtk
-hardened -ip28 -ip32r10k -mudflap -multilib
-multislot -n32 -n64 -nocxx -objc -objc++
-objc-gc -test -vanilla)

=====================
Compile messages: Including a few context lines
[...]


3: /usr/bin/cmp -s
/var/tmp/portage/app-shells/ksh-93.20040229/work/src/cmd/ksh93/fun/pushd
/var/tmp/portage/app-shells/ksh-93.20040229/work/arch/linux.i386/fun/pushd

3: /bin/mv
/var/tmp/portage/app-shells/ksh-93.20040229/work/arch/linux.i386/fun/pushd
/var/tmp/portage/app-shells/ksh-93.20040229/work/arch/linux.i386/fun/pushd.old

3: true

3: /bin/cp
/var/tmp/portage/app-shells/ksh-93.20040229/work/src/cmd/ksh93/fun/pushd
/var/tmp/portage/app-shells/ksh-93.20040229/work/arch/linux.i386/fun/pushd

3: chmod ugo+x
/var/tmp/portage/app-shells/ksh-93.20040229/work/arch/linux.i386/fun/pushd

mamake: *** exit code 1 making cmd/ksh93

package: make: errors making
/var/tmp/portage/app-shells/ksh-93.20040229/work/arch/linux.i386/bin/ksh

package: make done at Mon Jan 7 13:39:31 CST 2008 in
/var/tmp/portage/app-shells/ksh-93.20040229/work/arch/linux.i386

*
* ERROR: app-shells/ksh-93.20040229 failed.
* Call stack:
* ebuild.sh, line 1701: Called dyn_compile
* ebuild.sh, line 1039: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* ksh-93.20040229.ebuild, line 51: Called die
* The specific snippet of code:
* cd ${S}; ./bin/package only make ast-ksh CC="$(tc-getCC)" ||
die
* The die message:
* (no error message)
*
* If you need support, post the topmost build error, and the call
stack if relevant.
* A complete build log is located at
'/var/tmp/portage/app-shells/ksh-93.20040229/temp/build.log'.
*
* Messages for package app-shells/ksh-93.20040229:
*
* ERROR: app-shells/ksh-93.20040229 failed.
* Call stack:
* ebuild.sh, line 1701: Called dyn_compile
* ebuild.sh, line 1039: Called qa_call 'src_compile'
* ebuild.sh, line 44: Called src_compile
* ksh-93.20040229.ebuild, line 51: Called die
* The specific snippet of code:
* cd ${S}; ./bin/package only make ast-ksh CC="$(tc-getCC)" ||
die
* The die message:
* (no error message)
*

* If you need support, post the topmost build error, and the call
stack if relevant.
* A complete build log is located at
'/var/tmp/portage/app-shells/ksh-93.20040229/temp/build.log'.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-08-2008, 08:39 AM
Alan McKinnon
 
Default emerge of ksh93 erroring out.. who can interpret

On Monday 07 January 2008, Harry Putnam wrote:
> I'm having a time getting ksh93 to install (build error at the end)
>
> USE='static' emerge -v ksh93
>
> The only other use flag coming up was `nls'
>
> I wasn't real eager for `static' necessarily but without `static' had
> already failed and I saw it was a possible flag. Also it might be
> handy sometime in a trouble situation where only `/ ' is mounted.
>
> But that discussion is for some other time.
>
> Can anyone interpret this emerge failure and have some educated
> guesses what I should do to get it to compile. That message follows
> the eix output below.

http://forums.gentoo.org/viewtopic-p-4210019.html?sid=a282fd302189d999924b214267ec5b90

especially last 4 posts

Apparently it's a bug, and has been fixed in later versions. You are
using a stable 2004 version, in your position I would unmask ksh and
emerge the latest unstable


--
Alan McKinnon
alan dot mckinnon at gmail dot com
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-09-2008, 01:32 AM
 
Default emerge of ksh93 erroring out.. who can interpret

Alan McKinnon <alan.mckinnon@gmail.com> writes:


[...]

>> Can anyone interpret this emerge failure and have some educated
>> guesses what I should do to get it to compile. That message follows
>> the eix output below.
>
> http://forums.gentoo.org/viewtopic-p-4210019.html?sid=a282fd302189d999924b214267ec5b90
>
> especially last 4 posts
>
> Apparently it's a bug, and has been fixed in later versions. You are
> using a stable 2004 version, in your position I would unmask ksh and
> emerge the latest unstable

I see... thanks. That does sound like a way around it.,

I may just start using bash instead for the future...
Having this happen has made me rethink my ( non-thought out) choice of
shells.

I see where it can cause some grief at a time when you don't want to
be horsing around with that kind of problem.

I'm not a very sophisticated shell script programmer.

One thing I liked about ksh93 was its ability to match on regex.
Something bash couldn't do not so long ago. I haven't been paying
attention to bash development but having this problem, I did start
investigating and finding that modern bash can do most if not all of
what I liked about ksh93.

It can match like this

if [[ $1 =~ ^[0-9]+$ ]];then
[...]
fi

Forcing a match of number only by regex. Instead of trying to do it
with a pattern match.

And a sort of double reverse loop de loop negation I sometimes find
useful. (since there is no `!~' operator like perl or awk)

if [[ ! ( $1 =~ ^[0-9]+$ )]];then
[...]
fi

I'm beginning to think I may just drop ksh93. Unfortunately, I've
grown quite accustomed to using `print' instead of `echo -e' so I will
have to replace that in a couple dozen scripts... otherwise the
scripts seem to run fine under bash. (so far.. I haven't tested all of
them yet)


--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-10-2008, 06:34 PM
"Matthias B."
 
Default emerge of ksh93 erroring out.. who can interpret

On Tue, 08 Jan 2008 20:32:46 -0600 reader@newsguy.com wrote:

> I'm beginning to think I may just drop ksh93. Unfortunately, I've
> grown quite accustomed to using `print' instead of `echo -e' so I will
> have to replace that in a couple dozen scripts... otherwise the
> scripts seem to run fine under bash. (so far.. I haven't tested all of
> them yet)

Have you tried zsh? I've found it to be much better for scripting than
bash, especially less buggy. And it has a "print" builtin :-)

MSB

--
When you think you think, you only think that you think. Don't you think?

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 04:18 PM
 
Default emerge of ksh93 erroring out.. who can interpret

"Matthias B." <msbREMOVE-THIS@winterdrache.de> writes:

> On Tue, 08 Jan 2008 20:32:46 -0600 reader@newsguy.com wrote:
>
>> I'm beginning to think I may just drop ksh93. Unfortunately, I've
>> grown quite accustomed to using `print' instead of `echo -e' so I will
>> have to replace that in a couple dozen scripts... otherwise the
>> scripts seem to run fine under bash. (so far.. I haven't tested all of
>> them yet)
>
> Have you tried zsh? I've found it to be much better for scripting than
> bash, especially less buggy. And it has a "print" builtin :-)

I have yes. However it was many years ago. Probably at least 9 yrs
ago. I don't know much now but back then I knew even less. Linux was
a labor of love back then.

I tried zsh and was thoroughly confused by it. It actually seemed too
capable for my meager skills. I never went back.

Currently it appears that for my level of usage ksh93 or bash are
about the same... I'm rethinking my choice of scripting shell.

Mainly because of running into trouble getting it installed.
(Alan M. has solved that problem for me too. And it installed
without problems when I unmasked it.... Thank you Alan)

On examining current bash I see all the reasons I used ksh93 are now
possible in bash... the =~ operator is something I use a lot.
I don't now when that entered bash but its there now.

Can you say why you think zsh is better?

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 05:26 PM
"Matthias B."
 
Default emerge of ksh93 erroring out.. who can interpret

On Fri, 11 Jan 2008 11:18:44 -0600 reader@newsguy.com wrote:

> Can you say why you think zsh is better?

The bugs. I've hit lots of bash bugs in the past and every version seems
to fix some bugs and introduce new ones. I'm tired of adding new
workarounds to my scripts whenever I update bash.

MSB

--
My vacuum cleaner can't swallow bananas.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 05:56 PM
 
Default emerge of ksh93 erroring out.. who can interpret

"Matthias B." <msbREMOVE-THIS@winterdrache.de> writes:

> On Fri, 11 Jan 2008 11:18:44 -0600 reader@newsguy.com wrote:
>
>> Can you say why you think zsh is better?
>
> The bugs. I've hit lots of bash bugs in the past and every version seems
> to fix some bugs and introduce new ones. I'm tired of adding new
> workarounds to my scripts whenever I update bash.

I hope this doesn't come off as just being picky but my perspective is
that of someone who is about to switch from using ksh93 as main
scripting shell to bash.

So I'm interested in what I might run into. So far it looks like it
would be ALMOST as easy as symlinking ksh to bash in /bin.

The two big things I see that will cause that not to work are lots of
calls to `print' and that bash does not understand the easy way you
can create an array in ksh:
`set -A array somecmd'
creating an array of the output of somecmd.

So the print calls and array creation would cause failure in nearly
all my scripts.

Someone on comp.unix.shell pointed out I could create a
`print() { echo -e "$@" }'
function in bash and add that to my old ksh scripts. So that would
cover the print calls in most cases but still pondering the array
part.

I don't have so many with array calls but enough that it would be some
work to fix.

But back to your comments. "The bugs. [...]"

Can you cite some actual examples of what you are talking about, with
enough detail so I can see what you mean? Maybe include one or two of
the workarounds you are tired of dealing with?

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-11-2008, 08:41 PM
"Matthias B."
 
Default emerge of ksh93 erroring out.. who can interpret

On Fri, 11 Jan 2008 12:56:11 -0600 reader@newsguy.com wrote:

> Can you cite some actual examples of what you are talking about, with
> enough detail so I can see what you mean? Maybe include one or two of
> the workarounds you are tired of dealing with?

One thing I encountered is this bug

> echo "$(echo $';foo')"
bash: foo: command not found

introduced with some 3.1 version.

Then at some point the following stopped working

for d in `echo $locdirs | sed -e 's#/# #g'`; do

because bash stupidly regarded the embedded # as comment
delimters and complained about not finding the closing backtick. Both bugs
are fixed now.

Both cases broke scripts that I had released as part of a project and
therefore caused bug reports against my script. There were others but I
don't have the time to dig them out. I'm not trying to convince you to
stay away from bash, just telling you my reasons.
Oh, I forgot to mention that I found the zsh developers much easier to get
in touch with and much more responsive about bug reports.

But all of this is off-topic for gentoo-user, so I'll stop now.

MSB

--
The biggest fallacy of the SETI project is the belief
that TV signals are a sign of intelligence!

--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-14-2008, 02:38 PM
Alex Schuster
 
Default emerge of ksh93 erroring out.. who can interpret

reader@newsguy.com writes:

> So I'm interested in what I might run into. So far it looks like it
> would be ALMOST as easy as symlinking ksh to bash in /bin.

Uh, this sounds scary

> The two big things I see that will cause that not to work are lots of
> calls to `print' and that bash does not understand the easy way you
> can create an array in ksh:
> `set -A array somecmd'
> creating an array of the output of somecmd.
>
> So the print calls and array creation would cause failure in nearly
> all my scripts.
>
> Someone on comp.unix.shell pointed out I could create a
> `print() { echo -e "$@" }'
> function in bash and add that to my old ksh scripts. So that would
> cover the print calls in most cases but still pondering the array
> part.

I do not know about ksh, but if the former statement creates an array with
the i'th element containing the i'th word of somecmd's output, it should
work like this:
array=( $( somecmd ) )

If you need the i'th line, not the i'th word, do it like this, changing the
internal field separator to newlines only:
oldIFS=$IFS
IFS=$'
'
array=( $( somecmd ) )
IFS=$oldIFS

If you want to keep your notation, something like this might work. If the
first parameter of a call to set is -A, it creates the array, or else it
calls the bash set builtin:

set ()
{
if [[ $1 == -A ]]
then
eval "$2=( $( $3 ) )"
else
set "$@"
fi
}


> I don't have so many with array calls but enough that it would be some
> work to fix.
>
> But back to your comments. "The bugs. [...]"
>
> Can you cite some actual examples of what you are talking about, with
> enough detail so I can see what you mean? Maybe include one or two of
> the workarounds you are tired of dealing with?

I also had trouble with some bash bugs(*), and have some workarounds in my
scripts, in case they run with older bash versions. But as I cannot ensure
the client systems run kash or zsh, I did not bother to learn them, and
chose bash as my shell. It's amazing what it can do, but I guess zsh and
ksh can do the same, or even more.

(*) One was that I once needed to escape backslashes in ${//...} notations,
but now I must not do so any more:
(( BASH_VERSINFO < 3 )) &&
ospath=${1//\//} ||
ospath=${1////}

The other problem was with the =~ notation and quoting of the regular
expression not being allowed any more. Workaround is to define a variable
(foo) with the expression: [[ "blabla" =~ $foo ]]

Wonko
--
gentoo-user@lists.gentoo.org mailing list
 
Old 01-14-2008, 04:20 PM
 
Default emerge of ksh93 erroring out.. who can interpret

Alex Schuster <wonko@wonkology.org> writes:

> reader@newsguy.com writes:
>
>> So I'm interested in what I might run into. So far it looks like it
>> would be ALMOST as easy as symlinking ksh to bash in /bin.
>
> Uh, this sounds scary

Yeah, it would be on a system with actual users but here its just me,
myself and I. So all that is effected are the ksh scripts I've
written and currently use in various places (none are system show
stoppers).

But I was really just saying that syntax at my low level of usage is
largely interchangeable but for the cases I mentioned. So it makes
switching scripting shells from ksh93 to bash pretty smooth.


[...]
(for searchers who hit this discussion: I've snipped out very
nice information showing how to do ksh93 style `set -A arrary cmd'
in bash... and related interesting syntax See Alex S previous message
in this thread at Message-ID: <200801141638.42281.wonko@wonkology.org>)

> I also had trouble with some bash bugs(*), and have some workarounds in my
> scripts, in case they run with older bash versions. But as I cannot ensure
> the client systems run kash or zsh, I did not bother to learn them, and
> chose bash as my shell. It's amazing what it can do, but I guess zsh and
> ksh can do the same, or even more.

Pretty much summarizes why I'm switching to bash too. Instead of
learning the suggested (in this thread) zsh or staying with ksh93.

Something for your consideration I learned on comp.unix.shell that
ksh93 can handle associative arrays where as bash cannot or maybe just
not as easily. The example given by Icarus S. there for ksh93 was:

From: Icarus Sparry <usenet@icarus.freeuk.com>
Subject: Re: internal alias
Newsgroups: comp.unix.shell
Date: 11 Jan 2008 17:23:20 GMT
Message-ID: <4787a608$0$84193$742ec2ed@news.sonic.net>

typeset -A wives
wives["fred"]="wilma"
wives["barny"]="betty"

while read husband
do
case "${wives[$husband]}" in
"") echo Single;;
*) echo "Married to ${wives[$husband]}" ;;
esac
done

You may find that discussion interesting

> The other problem was with the =~ notation and quoting of the regular
> expression not being allowed any more. Workaround is to define a variable
> (foo) with the expression: [[ "blabla" =~ $foo ]]

I can't reproduce that here (I mean a problem with quoting the regex)
but maybe I'm not getting what you mean? Or maybe its been fixed.
bash --version
GNU bash, version 3.2.17(1)-release (i686-pc-linux-gnu)

reader > if [[ "bla" =~ bl ]];then echo MATCH;fi
MATCH

reader > if [[ bla =~ "bl" ]];then echo MATCH;fi
MATCH

--
gentoo-user@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 09:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org