Subject: Re: A different problem with "typeset: not found"
From: Dave Plonka (plonka@doit.wisc.edu)
Date: Mon May 20 2002 - 13:16:15 CDT
Hi Aaron,
On Thu, May 16, 2002 at 04:15:59PM -0500, Aaron Jackson wrote:
> Hi, I have been browsing the archives for a while and found solutions to a
> problem with the makefile that returns the error:
> typeset: not found
> ERROR: unsupported graphics format ''
>
> In the archives, people said that the reason this problem was created was that
> KSH or pdksh was not installed/running. I have both installed and working
> properly under the user that I am executing this command with. In my Makefile
> (graphs.mf), there is the line:
> SHELL = /usr/local/bin/ksh
> This is the proper location to my ksh shell. Is there something that I may have
> missed that would be causing me to still get this error when I run make -f
> graphs.mf?
Do you know what make implementation you are using? I.e. is it GNU make?
(That's what I'm using... while I don't think GNU make is required, we
may have more collective experience with it than other implementations.)
I wonder if some make implementations don't always invoke the shell
specified in SHELL. In the past I've heard of make's that try to
optimize by avoiding launching the shell, and trying to directly exec
the target's build commands if they think they can get away with it.
That might cause make itself to say "typeset: not found" if it got
ENOENT error on exec(2)).
ksh wouldn't be saying "typeset: not found". Is it make itself saying
that or is it launching the wrong shell?
You may be able to determine by either looking at the access time on
your ksh (with "ls -lu /path/to/ksh") after running the make, or by
using truss or strace. E.g.:
Linux$ mv *.png /tmp # move or remove, so make has something to do
Linux$ strace -fF -eexecve make -s -f graphs.mf
However, based on testing jusdt now, I've not had good luck with strace
across a fork(2). It seems to have trouble tracing across a
fork(2)/vfork(2) and it doesn't report some of the exec(2)s.
At any rate, if you can't get it to work using ksh's typeset, try
changing the "graphs.mf" line from this:
IMGFORMAT = "$$(typeset -u IMGFORMAT=$(filetype); print $${IMGFORMAT?})"
to this:
IMGFORMAT = "`echo $(format) |tr [a-z] [A-Z]`"
Dave
I've attached a small sample Makefile.
--
plonka@doit.wisc.edu http://net.doit.wisc.edu/~plonka ARS:N9HZF Madison, WI
This archive was generated by hypermail 2b25 : Mon May 20 2002 - 13:18:45 CDT