This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [crosstool-NG] Design discussion


On Tue, Apr 07, 2009 at 07:29:08PM -0500, Rob Landley wrote:
> On Tuesday 07 April 2009 07:39:19 Ladislav Michl wrote:
> > PTXdist (and this project is worth to check as well;
> > http://www.pengutronix.de/software/ptxdist/index_en.html). And without
> > looking at crosstool-ng source too closely, it looks like ./configure and
> > menuconfig are used in the same way. So ./configure && make is used to
> > build the tool itself and menuconfig serves to configure toolchain options.
> > Doesn't it seem reasonable enough solution?
[snip] 
> Ok, "./configure --prefix=`pwd`/tmpdir" and then "make install" into that...  
> and it just copied the patches directory it insisted I untar into its source 
> directory.  Went into tmpdir, ran bin/ptxdist, and it spit out 68 lines 
> according to wc.
> 
> Ok, this is another package doing this, but that doesn't make it right.  Why 
> on _earth_ would you need to install source code before you're allowed to 
> configure and compile it?  The only thing it actually built when I did the 
> first "make" was the kconfig binaries.  The kernel (where kconfig comes from) 
> does not require you to make and install kconfig before using menuconfig.  
> Neither do long-term users of it like busybox or uClibc...

You do not need install PTXdist anywhere to start using it. Install part is
optional just in case you want to distribute it as binary tarball to your
colleagues or make (for example) debian package. However I have to admit that
it is non obvious. PTXdist's kconfig is hacked a bit to handle dependencies,
so if you want to express openssh dependency on openssl you do so in Kconfig
file only. The 'ptxdist' script could probably do that as well, but unless
you hack on PTXdist itself you are expected to run ./configure && make
only once.

> Right, humor it:
> 
>   $ bin/ptxdist menuconfig
> 
>   ptxdist: error: ptxconfig file is missing
>   ptxdist: error: please 'ptxdist clone' an existing project
> 
> Insane.  Right, give it a try:
> 
>   $ bin/ptxdist clone
> 
> Spits out exactly the same help as if you run ptxdist without arguments, ok 
> scroll down to "clone", which says:
> 
>   clone <from> <to>              create a new project, cloned from <from>.
> 
> No clue where the "from" options are.  Nothing obvious in the "lib" or "bin" 
> directories it installed, and I already deleted the source it "installed" 
> from since it obviously wasn't _using_ it...
> 
> If I had to make this work, the next step would be to go to the website and 
> look for online documentation, or re-extract the source tarball and see what 
> that had, but I'm afraid I've run out of interest.

Well, that's still work in progress...

> Getting back to your original point, "building the tool itself" in this 
> context apparently means building the menuconfig binary, because bin/ptxdist 
> itself is a bash script.  I have no idea what the first ./configure; make; 
> make install cycle is expected to accomplish.  (Other than hardwiring in 
> absolute paths you can detect at runtime with the pwd command or perhaps by 
> some variant of readlink -f "$(which "$0")" if you want to be _more_ flexible 
> than the make command...)

There is nothing hardwired. ./configure checks prerequisities (and searches for
curses library). Of course it would be nice to have as few prerequisities as
possible and this is limited by amount of human resources. Once upon a time the
idea was to let PTXdist build prerequisities on its own as a host tools, but that
has its own set of problems.

> Will I someday have to compile and install makefiles before I can build the 
> package they describe?  I do not understand what these extra steps 
> accomplish...

See above.

Anyway, this is starting to be off topic, so in case you want anything to be
improved (and you did few valid points here), fell free to start another
thread called for example "Why PTXdist sucks" (such a subjects tend to
attract attention) to prevent this one from pollution.

Best regards,
	ladis

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]