Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
firefox & rust flag [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3561

PostPosted: Fri May 19, 2017 6:28 pm    Post subject: firefox & rust flag [SOLVED] Reply with quote

Hi,
According to "equery depends rust" my firefox supports it.
But rust does not appear in equery u firefox.

How 2 activate it?

Thks 4 ur attention.


Last edited by CaptainBlood on Tue Sep 19, 2017 3:08 am; edited 3 times in total
Back to top
View user's profile Send private message
guitou
Guru
Guru


Joined: 02 Oct 2003
Posts: 534
Location: France

PostPosted: Sat May 20, 2017 8:29 am    Post subject: Reply with quote

Hello.

Looking at ebuild files, support for rust use flag starts with version 52 (firefox-52.1.0-r1).

++
Gi)
Back to top
View user's profile Send private message
tholin
Apprentice
Apprentice


Joined: 04 Oct 2008
Posts: 200

PostPosted: Sat May 20, 2017 11:47 am    Post subject: Reply with quote

It doesn't look like equery u lists masked useflags.
Code:
/usr/portage/profiles/base/package.use.mask:

# Ian Stakenvicius (25 Jan 2017)
# rust on mozilla packages is experimental
www-client/firefox rust
www-client/seamonkey rust
mail-client/thunderbird rust
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3561

PostPosted: Mon Sep 04, 2017 4:04 pm    Post subject: Reply with quote

Is commenting these lines the right way to go?
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1791

PostPosted: Mon Sep 04, 2017 4:21 pm    Post subject: Reply with quote

The proper way, is to make a package.use.mask in your /etc/portage (like you'd do for package.use and stuff) and disable the flags there... Otherwise you shouldn't be modifying the profile files directly.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Sep 04, 2017 4:30 pm    Post subject: Reply with quote

tholin wrote:
It doesn't look like equery u lists masked useflags.

It does list them.

Edit:
Sorry, of course it does not.


Last edited by charles17 on Mon Sep 04, 2017 4:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Sep 04, 2017 4:32 pm    Post subject: Reply with quote

ct85711 wrote:
The proper way, is to make a package.use.mask in your /etc/portage (like you'd do for package.use and stuff) and disable the flags there... Otherwise you shouldn't be modifying the profile files directly.

Useless if the questionable package does not have the certain USE flag, sorry.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Mon Sep 04, 2017 5:10 pm    Post subject: Reply with quote

CaptainBlood,

For a few versions of firefox, rust was optional. With newer versions firefox hard depends on rust.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3561

PostPosted: Mon Sep 04, 2017 5:12 pm    Post subject: Reply with quote

Code:
for i in $(equery hasuse rust) ; do equery u $i ; done
outputs installed stable firefox and thunderbird without any rust flag.
Actually, I'm also asking because there is:
Code:
n ~ # tree /etc/portage/profile
/etc/portage/profile
├── package.use.force
│   └── cross-avr
├── package.use.mask
│   └── cross-avr
├── use.mask
└── use.stable.mask

2 directories, 4 files
n ~ # cat /etc/portage/profile/use.mask /etc/portage/profile/use.stable.mask
-input_devices_libinput

-python_targets_pypy
-python_targets_pypy3
-python_targets_python3_5
-python_single_target_python3_5
-python_targets_python3_6
-python_single_target_python3_6

Those two files to unmask use flags.
Activating rust experimental flag seems very much alike.
So I wondered why not to set it from there...

I'm now wondering if I did it the right way in the first place.
I hope to be on the right track even if things need to be tided up a little.

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3561

PostPosted: Tue Sep 05, 2017 1:58 am    Post subject: Reply with quote

At the end of the day, seems like only /etc/portage/make.profile contents can be overriden.
So no rust flag activation, in a regular way:

Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
Anarchy
Developer
Developer


Joined: 29 Jun 2005
Posts: 140

PostPosted: Tue Sep 12, 2017 1:10 pm    Post subject: Reply with quote

CaptainBlood wrote:
At the end of the day, seems like only /etc/portage/make.profile contents can be overriden.
So no rust flag activation, in a regular way:

Thks 4 ur attention, interest & support.


Code:
[anarchy - ~]  cat /etc/portage/profile/package.use.mask/experimental
# Arun Raghavan <ford_prefect@gentoo.org> (29 Mar 2012)
# webrtc-audio-processing is only supported on x86/amd64. Possibly arm can be
# added.
# Arun Raghavan <ford_prefect@gentoo.org> (24 May 2012)
# Mask xen USE flag by default, unmask on x86/amd64 where it is supported.
media-sound/pulseaudio -webrtc-aec -xen

# Ian Stakenvicius (25 Jan 2017)
# rust on mozilla packages is experimental
mail-client/thunderbird -rust


There is your proper unmask

[Moderator edit: added [code] tags to preserve output layout. -Hu]
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3561

PostPosted: Tue Sep 19, 2017 3:12 am    Post subject: Reply with quote

That's basically what i've done with another filesname though.
It did'nt seem to work...
Then latest portage went stable.. and it finally worked.

Side note: couldn't achieve firefox 52.3 against rust 0.21:
Code:
can't find crate for `cheddar
Thks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
Anarchy
Developer
Developer


Joined: 29 Jun 2005
Posts: 140

PostPosted: Sun Oct 29, 2017 2:38 am    Post subject: Reply with quote

CaptainBlood wrote:
That's basically what i've done with another filesname though.
It did'nt seem to work...
Then latest portage went stable.. and it finally worked.

Side note: couldn't achieve firefox 52.3 against rust 0.21:
Code:
can't find crate for `cheddar
Thks 4 ur attention, interest & support.


https://gist.github.com/anarchpenguin/22340ad662c32441d4ba1593a9c7b2e5

add the patch to /etc/portage/patches/mail-client/thunderbird and emerge if you want to use rust.
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3561

PostPosted: Sun Oct 29, 2017 8:10 am    Post subject: Reply with quote

How nice of you...
Will definitely try today later on ... with a fully latest unstable updated toolchain. (gcc+binutils+glibc.
It's gonna be a hot day for my laptop small CPU as it's already 29C°/84F° @10;30 PM here. :D
Thaks 4 ur attention, interest & support.
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Sun Oct 29, 2017 9:06 am    Post subject: Reply with quote

the more interesting that FF-57 has llvm & clang in dependencies list
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3561

PostPosted: Sun Oct 29, 2017 9:31 am    Post subject: Reply with quote

Which both here have also been compiled with the latest unstable tool chain.
Full ricing optimisation has been applied, ie lto, graphite, etc... ; aswell as for rust.

Thks 4 ur attention, interest & support
Back to top
View user's profile Send private message
Anarchy
Developer
Developer


Joined: 29 Jun 2005
Posts: 140

PostPosted: Mon Oct 30, 2017 9:23 am    Post subject: Reply with quote

Perfect Gentleman wrote:
the more interesting that FF-57 has llvm & clang in dependencies list


What is so interesting about it? We now support stylo in gentoo which is the default for upstream.
Back to top
View user's profile Send private message
Perfect Gentleman
Veteran
Veteran


Joined: 18 May 2014
Posts: 1245

PostPosted: Mon Oct 30, 2017 10:08 am    Post subject: Reply with quote

Anarchy wrote:
What is so interesting about it? We now support stylo in gentoo which is the default for upstream.

we need more compilers in system
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Tue Oct 31, 2017 1:40 am    Post subject: Reply with quote

As I understand it, you can thank Firefox upstream for introducing the requirement to use llvm if you want to use modern Firefox. Gentoo maintainers undertook to avoid building private bundled copies of those libraries, preferring to use the system copies so that users who already had llvm installed for other reasons did not need to build an extra copy just for Firefox.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Nov 06, 2017 1:40 am    Post subject: Reply with quote

Hu wrote:
As I understand it, you can thank Firefox upstream for introducing the requirement to use llvm if you want to use modern Firefox. Gentoo maintainers undertook to avoid building private bundled copies of those libraries, preferring to use the system copies so that users who already had llvm installed for other reasons did not need to build an extra copy just for Firefox.

Is it still the case that rust has another bundled copy of llvm? Recall reading a while ago that's the problem causing it to take forever and a half to build. We just can't win...
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Mon Nov 06, 2017 7:33 am    Post subject: Reply with quote

Ant P. wrote:
Is it still the case that rust has another bundled copy of llvm?

I don't know whether the gentoo ebuild uses it, but it is certainly in the source tarball.
Quote:
Recall reading a while ago that's the problem causing it to take forever and a half to build

What really takes long is the bootstrapping of the actual rust compiler: This takes many hours on my not so strong machines. Whether the llvm compilation adds another 1-2 hours plays then almost no role. (BTW, in contrast to rust, llvm compilation is buffered by ccache, so the time for llvm compilation decreases even further in practice)

What worries me more is that for cargo you have to download a huge binary tarball for bootstrapping, even if a newer version of cargo is already installed. IMHO, this needs fixing in the ebuild (by means of USE=+download-bootstrap or something similar).
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54098
Location: 56N 3W

PostPosted: Mon Nov 06, 2017 8:00 am    Post subject: Reply with quote

mv,

Unless the ebuild has been fixed, the bundled llvm is built for every target. Worse, in uses -jcores, not MAKEOPTS, so it breaks on things that don't have about 1G RAM per core.

There are several fixes around. They are needed if you want to build firefox on a Raspberry Pi.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Mon Nov 06, 2017 11:32 am    Post subject: Reply with quote

NeddySeagoon wrote:
Unless the ebuild has been fixed, the bundled llvm is built for every target.

I can only repeat: On my machines the time of llvm compilation compared to bootstrapping rust is "negligible" (which does not mean that it doesn't cost some hours as well…).
Quote:
Worse, in uses -jcores, not MAKEOPTS, so it breaks on things that don't have about 1G RAM per core.

One of my machines is Core2 with 512MB RAM. However, I have lot of swap space, so maybe this is used instead.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Mon Nov 06, 2017 11:50 am    Post subject: Reply with quote

Perhaps it is not clear to every reader here why llvm is used by rust and why a copy needs to be bundled: Many readers might think about llvm mainly being related to clang (and that being an alternative to gcc). However, llvm is not only clang: llvm is a compiler generator. As such, it is very natural that building a compiler for a new language requires it. Unfortunately, many functions/libs of llvm are not available in the installed version of llvm. Hence, rust more or less has no other chance than to build these (uninstalled) libs and to use them for building the compiler.

Of course, this does not mean that the build system and ebuild of rust cannot be improved: It should of course be avoided that unneeded targets of llvm are built, and portage standard settings should be honoured.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum