Odd Multi-User Mode BUILD Error: lang/gnat; why is it attempting to use csh???

backyard backyard1454-bsd at yahoo.com
Mon Jul 9 04:44:09 UTC 2007


Please CC me on a response as I am not a member of
freebsd-questions

Here it is:

gmake[2]: Entering directory
`/usr/ports/lang/gnat/work/gcc-34/gcc/fixinc'
/bin/csh ./genfixes machname.h
SHELL=/bin/sh: Command not found.
export: Command not found.
if: Expression Syntax.
gmake[2]: *** [machname.h] Error 1
gmake[2]: Leaving directory
`/usr/ports/lang/gnat/work/gcc-34/gcc/fixinc'
gmake[1]: *** [fixinc.sh] Error 2
gmake[1]: Leaving directory
`/usr/ports/lang/gnat/work/gcc-34/gcc'
gmake: *** [all-gcc] Error 2
*** Error code 2

------------

this is obviously caused by the build attempting to
run the sh script with (t)csh instead causing a basic
syntax error  to occur because of the incompatible
script syntax and puking the make. I say obviously
because dropping to single user mode and choosing
/bin/sh as my shell allowed the build to occur without
error.

I think the problem lies in 
lang/gnat/work/gcc-34/gcc/fixinc/Makefile.in

referencing the variable 
SHELL=@SHELL@

and using it genrally like

cd $(srcdir) ; $(SHELL) ./genfixes $@

I don't know much about Makefile syntax but I know
changing every reference of SHELL to DINGLESHELL made
no difference. I attempted to force SHELL=/bin/sh to
no avail it was ignored and still ran
/bin/csh ./genfixes machname.h
SHELL=/bin/sh:Command not found

I even reset MAKE_SHELL=/bin/sh in make.conf and
forced the above Makefile.in to use
SHELL=${MAKE_SHELL} as a last resort but neither
futile attempts worked.

I believe the error is that the Makefile is ignoring
the setting of SHELL and using the environment SHELL
variable which is by default /bin/csh. Under Linux
this wouldn't be an error because as I recall they use
bash for everyone, even the big wheels... but for a
BSD this is an error, because root runs csh

My question is should SHELL=@SHELL@ pickup the proper
/bin/sh and build things correctly, or is using SHELL
in the makefile in this manner an error under a BSD
that should be fixed by a patch worked out with the
maintainer. I don't know if this is an configure
error, or a one in a bluemoon thing. I am thoroughly
confused by this.

I guess I am wondering if anyone else has had similar
issues with the port as a search on google didn't seem
to find much. I need the GPL version so I can use
tasking, as my reason for using Ada needs the
intrinsic  support for threading to be functional.
This also allows me to try out the adacore compile
prior to dropping whatever sum of money they want for
GNAT-Pro...

If I have to go single user to update the port I will.
I don't want to run /bin/sh as my root shell i suppose
i could try bash. which as an exercise i set as the
root shell and all went perfectly fine through the
build. I don't want to leave things this way because a
simple issue of deleting my ports will make logging in
as root require remembering to boot single user...

my build env:
2x 2800+ athlon-mp 
1284M Ram (1gig + 256M registered ECC scrubbing on)
FreeBSD 6.2-p5
CFLAGS=-O2 -pipe
COPTFLAGS=-pipe -O
CPUTYPE?=athlon-mp
NO_RCMDS=YES
NO_PROFILE=YES
MAKE_IDEA=yes           
WITH_OPENSSL_BASE=YES
X_WINDOW_SYSTEM=xorg
SENDMAIL_CFLAGS=-I/usr/local/include -DSASL=2
SENDMAIL_LDFLAGS=-L/usr/local/lib
SENDMAIL_LDADD=-lsasl2

thanks for any help, and thanks to the FreeBSD team, I
can't wait for 7.0 to be released, I think my LH6000
is going to love the optimized SMP routines... as will
the above machine, of course.

brian

again, Please CC me on a response as I am not a member
of freebsd-questions




More information about the freebsd-questions mailing list