Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
firefox & pgo & nvidiactl, once again
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
l0l
n00b
n00b


Joined: 10 Jul 2008
Posts: 43

PostPosted: Tue Jun 05, 2012 10:53 am    Post subject: firefox & pgo & nvidiactl, once again Reply with quote

There is previous discussion here: https://forums.gentoo.org/viewtopic-t-912182-highlight-nvidiactl.html which is marked as solved,

but the src_compile() is still broken:

Code:

src_compile() {
232     if use pgo; then
233         addpredict /root
234         addpredict /etc/gconf
235         # Reset and cleanup environment variables used by GNOME/XDG
236         gnome2_environment_reset
237
238         # Firefox tries to use dri stuff when it's run, see bug 380283
239         shopt -s nullglob
240         cards=$(echo -n /dev/dri/card* | sed 's/ /:/g')
241         if test -n "${cards}"; then
242             # FOSS drivers are fine
243             addpredict "${cards}"
244         else
245             cards=$(echo -n /dev/ati/card* /dev/nvidiactl* | sed 's/ /:/g')
246             if test -n "${cards}"; then
247                 # Binary drivers seem to cause access violations anyway, so
248                 # let's use indirect rendering so that the device files aren't
249                 # touched at all. See bug 394715.
250                 export LIBGL_ALWAYS_INDIRECT=1
251             fi
252         fi
253         shopt -u nullglob
254
255         CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
256         MOZ_MAKE_FLAGS="${MAKEOPTS}" \
257         Xemake -f client.mk profiledbuild || die "Xemake failed"
258     else
259         CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
260         MOZ_MAKE_FLAGS="${MAKEOPTS}" \
261         emake -f client.mk || die "emake failed"
262     fi
263
264 }


because this:

Code:

241         if test -n "${cards}"; then


does not work when:

Code:

ls /dev/dri/card*
ls: cannot access /dev/dri/card*: No such file or directory


line 241 can be changed to something like this to check if the file exists:

Code:

241         if [ $(ls /dev/dri/card* 2> /dev/null | wc -l) != "0" ]; then


and the same applies to line 246.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21624

PostPosted: Wed Jun 06, 2012 1:40 am    Post subject: Reply with quote

The command you gave seems to be a roundabout method of achieving the same result. When nullglob is enabled and there are no DRI cards, that echo will produce no output, which is the desired result. Your command will also produce a result of zero lines. Could you explain why you think the existing code does not work correctly?
Back to top
View user's profile Send private message
l0l
n00b
n00b


Joined: 10 Jul 2008
Posts: 43

PostPosted: Wed Jun 06, 2012 8:53 am    Post subject: Reply with quote

Hu wrote:
The command you gave seems to be a roundabout method of achieving the same result. When nullglob is enabled and there are no DRI cards, that echo will produce no output, which is the desired result. Your command will also produce a result of zero lines. Could you explain why you think the existing code does not work correctly?


Hi, yes you are absolutely right, both commands produce the same result. Sorry for that, it's my fault because I did not set nullglob when testing, completely forgot about that.
So the code works correctly, the problem is somwhere else then, because when I compiled firefox 13 there was the same access violation error in /dev/nvidiactl, so I compiled firefox 13
the second time with FEATURES="-sandbox" which worked fine.

After investigating I found that the problem is that 'export LIBGL_ALWAYS_INDIRECT=1' does not work for me, I still get direct rendering for some reason.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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