Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux > #50306

Re: Linux From Scratch - Builds by hand, but not from same commands in make file

From Java Jive <java@evij.com.invalid>
Newsgroups alt.os.linux, uk.comp.os.linux
Subject Re: Linux From Scratch - Builds by hand, but not from same commands in make file
Date 2018-08-13 11:27 +0100
Organization Aioe.org NNTP Server
Message-ID <pkrmed$1lt3$1@gioia.aioe.org> (permalink)
References <pkelrk$11p5$1@gioia.aioe.org> <q9u*hXS2w@news.chiark.greenend.org.uk> <pkfmq2$s20$1@gioia.aioe.org> <pkfqb8$11hd$1@gioia.aioe.org>

Cross-posted to 2 groups.

Show all headers | View raw


Sorry for the delay in following up  -  I've had other more urgent 
computer problems, and am also busy on the house whenever the weather is 
fine ...

On 08/08/2018 23:20, Java Jive wrote:
>
> On 08/08/2018 22:19, Java Jive wrote:
>>
>> I've no idea, but ...
>>      getconf ARG_MAX
>> ... gives ...
>>      2097152
>> ... in a seperate command window while another attempted build is 
>> going on in another.  I think originally it said about double that in 
>> the other before I started the latest attempt at a build.
> 
> No, I've just checked after a reboot, and it's the same figure as above.

ARG_MAX does seem to be the nature of the problem.  If I temporarily 
comment out the pseudo/virtual target .EXPORT_ALL_VARIABLES, and instead 
export only those required to build GLibC, then ...
	make install
... works, but none of the previous LFS stages do, because they don't 
have the required environment variables set  -  thus if I delete the 
work so far and start over from scratch, the make falls at the first 
target and won't even check that all the sources have been downloaded 
successfully.

The problem seems to be that I can't find a way of exporting only those 
variables needed for a particular target of the build, and unexporting 
them once that target is built successfully.  There are certainly export 
and unexport commands, but if I put them at the top and bottom of a 
build section, they are treated as though they shell commands.  This may 
be because I also have the pseudo/virtual target .ONESHELL in the 
makefile, but this is needed so that one shell command following another 
can access the other's output via the environment.  So the dilemma is this:

With .ONESHELL ...

target:	prerequisites
	export VARIABLE;	# Shell not make command, fails
	shell-command-1;	# Sets result in, say, $RESULT
	shell-command-2;	# Can see value of $RESULT, good
	unexport VARIABLE	# Shell not make command, fails

Without .ONESHELL ...

target:	prerequisites
	export VARIABLE;	# May work as make command, untested
	shell-command-1;	# Sets result in $RESULT
	shell-command-2;	# New shell can't see value of $RESULT
	unexport VARIABLE	# May work as make command, untested

I'm not very experienced at creating my own make files.  I created a few 
that worked many years ago when I used to program in C, but nothing on 
this scale, and while I'm happy to have got this one to work as far as 
it has, it's clear to me that I'm floundering somewhat, and probably not 
using approved methods.  Any help that can be offered to solve the above 
dilemma perhaps by tackling things differently, will be gratefully received.

Back to alt.os.linux | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-08 12:57 +0100
  Re: Linux From Scratch - Builds by hand, but not from same commands in make file Theo <theom+news@chiark.greenend.org.uk> - 2018-08-08 19:06 +0100
    Re: Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-08 22:19 +0100
      Re: Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-08 23:20 +0100
        Re: Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-13 11:27 +0100
          Re: Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-23 22:55 +0100
            Re: Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-26 16:46 +0100
              Re: Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-26 20:18 +0100
  Re: Linux From Scratch - Builds by hand, but not from same commands in make file Roger <invalid@invalid.invalid> - 2018-08-10 15:28 +0100
    Re: Linux From Scratch - Builds by hand, but not from same commands in make file Java Jive <java@evij.com.invalid> - 2018-08-13 11:43 +0100

csiph-web