Early fault running jhalfs-2.0 on clfs-svn

George Boudreau georgeb at linuxfromscratch.org
Tue Nov 7 04:39:02 PST 2006


TheOldFellow wrote:
> On Mon, 06 Nov 2006 16:33:37 -0500, George Boudreau wrote:
> 
>> TheOldFellow wrote:
>  
>>> So we are now completely sure that these problems are to do with
>>> "bashisms". Sorry George, either you need to make the scripts explicitly
>>> say "bash", or say ubuntu ain't supported!
>> .. A test (for me):
>> 1.  save your current work and
>> 2.  edit the two lines in the clfs.xsl that write the sha-bang
>>    !/bin/sh  to !/bin/bash
>> 3. delete the clfs-commands directory..
>>      and rerun jhalfs
>>
>>    This will create the required /bin/bash for now. I will look at the 
>> what is necessary to make the scripts shell neutral.
> 
> George,
> This is a partial fix.  The other thing I have to do is to add "SHELL =
> /bin/bash" to the generated Makefile - I could probably fix that in the
> jhalfs-2.0 directory too, but didn't for the test.
> Otherwise it seems to be working. (well it's running 033-binutils anyway :-)
> Richard.
   OK, I pinched of a new partition and installed Ubuntu. I am no expert
what should and shouldn't be installed on a system but 6.10 has /bin/sh
-> dash.  A quit search tells me 'dash' is a minimalist sh intended for
a floppy install. (On a desktop? https://wiki.ubuntu.com/DashAsBinSh )

   The root cause of our headache is the command _time_. In bash it is a
builtin which can time a command pipeline. ie time { cmd; cmd; } Dash
does not have a built in time and uses the executable version, a
different beast all together.

   Solutions (add more if you know of any)

    remove timing of builds for everyone
1.       or
    find a different timing method

2. temporarily reassign /bin/sh to /bin/bash during the running of the
Makefile. This has potential problems if the Makefile crashes and cannot
do housekeeping and generally it is not nice to play with the host.

3. Modify the Makefile to explicitly call /bin/bash when recursively
called using sudo.

   Richard, my fresh, clean, unadulterated Ubuntu will not compile 
anything so as a quickie could you do the following to see if this 
clears up some of the problems.
   In the Makefile

#---------------AS ROOT
mk_SETUP:
   @$(call echo_SU_request)
   @sudo make SHELL=/bin/bash SETUP   <<-- define SHELL
   @touch $@

#---------------AS LUSER
mk_CROSS: mk_SETUP
   @$(call echo_PHASE,Cross and Temporary Tools)
   @(sudo $(SU_LUSER) "source .bashrc && cd $(MOUNT_PT)/$(SCRIPT_ROOT) 
&& make SHELL=/bin/bash AS_LUSER" )    <<-- define SHELL

@mk_SUDO: mk_CROSS
	@sudo make SHELL=/bin/bash SUDO  <<-- define SHELL
	@touch $@sudo make restore-luser-env
   @touch $@


> 









More information about the alfs-discuss mailing list