Can Firefox 18+ be compiled on RHEL 5.9?

2

I tried to compile Firefox 24 on RHEL 5.9 and ran into dependency hell.

I have no root privileges and I compiled several of the dependencies (glib, cairo and whatnot) in one of my directories. I failed on compiling pango (1.20.5) with this error I could not manage to resolve: /work/usr/lib/libcairo.so: undefined reference to `XRenderFindVisualFormat'.

Now my question is: is it possible to compile FF24 on RHEL 5.9 and if so, can you recommend a procedure how to go about systematically?

Edit:

I tried the gentoo prefix solution: After installing prefix with bootstrap-prefix.sh to /work/gentoo:

  • Added a line USE="-*" to $EPREFIX/etc/portage/make.conf
  • Added a line PYTHON_TARGETS="python2_7" to $EPREFIX/etc/portage/make.conf
  • nasm on host was too old (NASM version 0.98.39 compiled on Jul 12 2006), so building media-libs/libjpeg-turbo-1.3.1 failed. emerge nasm fixed it.
  • emerge --autounmask-write '<media-libs/mesa-10.2'
  • emerge --autounmask-write firefox

To start firefox, I use a script:

#!/bin/bash
PREFIX=/work/gentoo
COMMAND="${PREFIX}/usr/lib/firefox/firefox $1"
env -i HOME=$HOME TERM=$TERM USER=$USER $PREFIX/bin/bash -l -c "export DISPLAY=:0.0 ; ${COMMAND}"

Unfortunately, I can't pass a file to that script so firefox opens the file automatically. Plus - and that's a more serious problem - scrolling with the mouse wheel is buggy and switching tabs by clicking on them does not work. So all the effort was in vain )o:

Thomas M

Posted 2013-10-08T13:50:25.050

Reputation: 143

What happens when you pass a file to Firefox? Also, I don't think resetting the environment is necessary -- in a normal shell (i.e. not prefix) just call the direct path to the firefox binary. – Wilfred Hughes – 2014-07-14T08:58:47.260

Answers

0

It is possible to compile Firefox on RHEL 5 using Gentoo Prefix. It's a little work (Prefix's IRC channel is helpful) but using a proper package manager means all the dependencies are handled for you.

Bootstrap Prefix, then just install Firefox with:

$ ~/gentoo/startprefix # wherever your prefix shell script is
$ emerge -a firefox
$ export DISPLAY=:0.0 # Use the existing Xorg installed
$ firefox

Note that Firefox 30 is the last version that will run on RHEL 5. Firefox 31+ depends on mesa 10.2+. mesa 10.2+ has a build-time dependency on libudev and udev, which can't be built on Gentoo prefix.

Wilfred Hughes

Posted 2013-10-08T13:50:25.050

Reputation: 191

I tried that but it fails with: emerge: there are no ebuilds to satisfy ">=sys-apps/dbus-1.6.18-r1[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]". – Thomas M – 2014-07-11T10:58:54.160

Try emerging an older version of dbus and building firefox against that. eix sys-apps/dbus shows the versions, then emerge -av =dbus-1.6.8-r1 (the version I have installed currently). Failing that, ask on IRC. – Wilfred Hughes – 2014-07-11T12:43:00.213

I tried USE="-dbus", then emerge -a firefox, then I got: emerge: there are no ebuilds to satisfy ">=sys-apps/util-linux-2.24.1-r3[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?]". – Thomas M – 2014-07-11T13:00:57.047

did you also get this message during installing util-linux: "Your host glibc is too old; enabling -fgnu89-inline compiler flag. bug 473524"? – Thomas M – 2014-07-11T13:06:38.473

I'm using util-linux 2.17, I haven't been able to upgrade because of that error. The glibc warning is just a warning. – Wilfred Hughes – 2014-07-11T13:10:53.373

0

emerge --autounmask-write firefox

should be replaced by

emerge -p --autounmask-write firefox

Just after that step, in $EPREFIX/etc/portage/make.conf you should replace

USE="-*"

by

USE="-keyword1 -keyword2 -keyword3 ... -keywordN"

where keyword1 keyword2 keyword3, ... keywordN should be replaced by the various USE flags showed by emerge -p --autounmask-write firefox. If emerge -p --autounmask-write firefox showed

[ebuild   R    ] app-text/recode-3.6_p17-r2  USE="nls (prefix%*) -static-libs" 2,021 kB

Then you could use

USE="-nls -static-libs"

This will give to you something with an effect exactly equivalent to USE="-*".

At next step, you should try to guess which of the elements in USE are the one preventing "scrolling with the mouse wheel is buggy and switching tabs by clicking on them". For example, if it is -nls, then you should replace -nls by +nls (or by nothing) in the USE variable.

You may lookup http://www.gentoo.org/dyn/use-index.xml to track mouse-related USE keywords.

After that, apply the steps below to compile a mouse-compatible firefox:

emerge --autounmask-write firefox
mv $EPREFIX/etc/portage/.*package.use $EPREFIX/etc/portage/package.use
emerge firefox

Note: I think that a USE variable shortened to only a handful of keywords is enough to build firefox. Please report that here and on IRC if you succeed to find it.

user2987828

Posted 2013-10-08T13:50:25.050

Reputation: 151

-1

This assumes you have root access to install various RPMS, so I'm not sure how you get round that, but it is possible to build FF24 on EL5.

Have a look at this article.

james-p

Posted 2013-10-08T13:50:25.050

Reputation: 1

This is a quote from the question: "...can you recommend a procedure how to go about systematically?" Simply saying "it's possible" isn't really helpful. – Moses – 2013-10-10T19:27:54.887

The link posted by @james-p contains valuable information. I will definitely try what's suggested there. – Thomas M – 2013-10-14T15:53:36.737