Am Montag, den 30.09.2019, 12:57 -0500 schrieb Bruce Dubbs via blfs-
dev:
> On 9/30/19 12:40 PM, Xi Ruoyao via blfs-dev wrote:
> > On 2019-09-30 12:37 -0500, Bruce Dubbs via blfs-dev wrote:
> > > On 9/30/19 12:25 PM, Xi Ruoyao via blfs-dev wrote:
> > > > On 2019-09-30 19:22 +0200, Thomas Trepl via blfs-dev wrote:
> > > > > Hi all,
> > > > >
> > > > > so far i have built a nice Xfce system avoiding python2, gtk2 and
> > > > > rustc at all and Xfce-4.14 builds/runs fine without gtk2. For librsvg
> > > > > i use the old non-rust version 2.40.20 which still works pretty well -
> > > > > ok, i know, thats not really the way to go but building gigabytes of
> > > > > compiler stuff just for one lib?
> > > > >
> > > > > But now, for firefox it seems that there's no way around. All of
> > > > > browsers have downsides (epihani needs webkitgtk needs gtk2, falcon
> > > > > needs Python2, seamonkey needs gtk2, firefox needs rustc,gtk2). All i
> > > > > need is a good browser so unfortunatly i need to "die some kind of
> > > > > death".
> > > > >
> > > > > Well i started to fool around with rust and tried to package using the
> > > > > DESTDIR mechanism.
> > > > >
> > > > > In rusts config file the prefix is specified
> > > > >
> > > > > [install]
> > > > > prefix = "/opt/rustc-1.35.0"
> > > > >
> > > > > and according to the instructions we create that dir upfront. Since
> > > > > book also uses DESTDIR strategy I thought "ah, its easy, just put my
> > > > > DESTDIR there instead of $pwd/install" and left out the creation of
> > > > > the /opt/rustc-1.35.0 out because i do not install in "real"
> > > > > locations.
> > > > >
> > > > > Badly enough, install failed with an error message like "/opt/rustc-
> > > > > 1.35.0 cannot be canonicalized" or such.
> > > > >
> > > > > After a few re-runs of building rustc (much fun it is to wait and do
> > > > > it again because of a typo in the build script...) I ended up with
> > > > > creating the $prefix dir on the build machine even DESTDIR install
> > > > > puts the files somewhere else.
> > > > > Looking at Arch's instructions, they do pretty much same but their
> > > > > $prefix is "/usr" which obviously already exists on building machine.
> > > > >
> > > > > Have you ever tried to install rust via DESTDIR and if yes, did you
> > > > > see same issue and if yes, how did you work around?
> > > >
> > > > Yes. I had to "mkdir /opt/rustc-{version}".
> > >
> > > Why not just use the instructions in the book?
> > >
> > > From the note in the book:
> > >
> > > "Unusually, a DESTDIR-style method is being used to install this
> > > package. This is because running the install as root not only downloads
> > > all of the cargo files again (to /root/.cargo), it then spends a very
> > > long time recompiling. Using this method saves a lot of time, at the
> > > cost of extra disk space."
> > >
> > >
> > > DESTDIR=${PWD}/install python3 ./x.py install
> >
> > The error message "/opt/rustc-1.35.0 cannot be canonicalized" shows up HERE,
> > before the "cp" command creating /opt/rustc-1.35.0.
> >
> > > sudo chown -R root:root install
> > > sudo cp -a install/* /
>
> Right, The book explicitly says:
>
> To install into the /opt directory, remove the symlink and create a
> new directory (i.e. with a different name if trying a modified build).
> As the root user:
>
> mkdir /opt/rustc-1.35.0
> ln -svfin rustc-1.35.0 /opt/rustc
>
> FBBG
Thats for sure true ;-) and it wasn't my intention to let it sound
that the book is wrong. The book works pretty fine! It might not came
out clearly, i intentionally did a variation from the book as i do
some kind of DESTDIR pkgmngt here. And while doing this, i discovered
a strange (in my eyes) behaviour of rusts build system when going to
install it using DESTDIR.
It seems so that if you are planning to do a DESTDIR install you have
to create the directory where you want rust in on target machines even
on build system.
That is if i want to have rust in /path/to/rust on my target system, I
have to
1) create /path/to/rust on the build system even the actual install
command on the build system reads like
DESTDIR=/somewhere/else python3 ./x.py install
2) specify "prefix=/path/to/rust" in the config.toml
3) run building rust
With this you end up with /somewhere/else/path/to/rust/ containing all
the stuff and the /path/to/rust on the build system remains empty.
On the first look there not much difference to what we do in book as
we create /opt/rustc-x.y.z upfront. Problem occurs when you left out
(1) because of thinking that this directory is never used on build
system.
So, as Ruoyao already said, that seems the way to go with rust,
everything fine.
--
Thomas
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page