Re: [blfs-dev] rustc and DESTDIR

2019-10-01 Thread Tim Tassonis via blfs-dev



On 30 September 2019 19:23:04 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 did, successfully, will send you my full set of build commands later.


Bye
Tim



--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Wayne Blaszczyk via blfs-dev
On Mon, 2019-09-30 at 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".
> 
> 

FYI, epiphany/webkitgtk does not require gtk2. 
You just need to pass the following parameter:
-DENABLE_PLUGIN_PROCESS_GTK2=OFF
The only reason gtk2 is required for any browser is the flash plugin.

Regards,
Wayne.

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Bruce Dubbs via blfs-dev

On 9/30/19 1:15 PM, Ken Moffat via blfs-dev wrote:

On Mon, Sep 30, 2019 at 12:57:10PM -0500, Bruce Dubbs via blfs-dev wrote:

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,



Just a couple of comments on this -


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".



Firefox also needs python2 at the moment.

[...]



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



For the little it is worth, I also regularly get the error when my
prefix in the mozconfig doesn't match the current symlink.  I do a
lot of switching about with versions from time to time, and don't
always manage to correct every reference - this week I managed to
wrongly change most of them in vim after correctly changing the
first one.


Just for technique, at the start of my rust script I do:

VER=1.35.0
...
# Remove current version and symlink if they exist
# Then recreate the empty destination directory and a new
# symlink
sudo rm -rf /opt/rustc-$VER /opt/rustc
sudo mkdir  /opt/rustc-$VER
sudo ln -sv  rustc-$VER /opt/rustc
...

  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Thomas Trepl via blfs-dev
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


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Ken Moffat via blfs-dev
On Mon, Sep 30, 2019 at 12:57:10PM -0500, Bruce Dubbs via blfs-dev wrote:
> 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,
> > > > > 

Just a couple of comments on this -

> > > > > 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".
> > > > > 

Firefox also needs python2 at the moment.

[...]
> > > 
> > > 
> > > 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
> 

For the little it is worth, I also regularly get the error when my
prefix in the mozconfig doesn't match the current symlink.  I do a
lot of switching about with versions from time to time, and don't
always manage to correct every reference - this week I managed to
wrongly change most of them in vim after correctly changing the
first one.

ĸen
-- 
thread 'main' panicked at 'giraffe',
/tmp/rustc-1.32.0-src/src/test/run-fail/while-panic.rs:17:13
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Xi Ruoyao via blfs-dev
On 2019-09-30 12:57 -0500, Bruce Dubbs via blfs-dev wrote:
> 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
> 
>-- Bruce

Oh, I didn't read carefully.  Sorry for that :(.
-- 
Xi Ruoyao 
School of Aerospace Science and Technology, Xidian University

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread 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

  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Xi Ruoyao via blfs-dev
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/* /
-- 
Xi Ruoyao 
School of Aerospace Science and Technology, Xidian University

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Bruce Dubbs via blfs-dev

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
sudo chown -R root:root install
sudo cp -a install/* /

Will automatically create /opt/rustc-1.35.0

  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


Re: [blfs-dev] rustc and DESTDIR

2019-09-30 Thread Xi Ruoyao via blfs-dev
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}".
-- 
Xi Ruoyao 
School of Aerospace Science and Technology, Xidian University

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page


[blfs-dev] rustc and DESTDIR

2019-09-30 Thread Thomas Trepl via blfs-dev
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?

--
Thomas

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page