Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Firefox #427

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Add Firefox #427

wants to merge 6 commits into from

Conversation

certik
Copy link
Member

@certik certik commented Aug 21, 2014

My browser is too old, so it'd be nice to be able to compile the latest Firefox. Here is info how to compile it:

http://www.linuxfromscratch.org/blfs/view/svn/xsoft/firefox.html

@certik
Copy link
Member Author

certik commented Aug 21, 2014

Currently it fails with:

[firefox] Building firefox/obve35mrzv56, follow log with:
[firefox]   tail -f /local/certik/tmp/firefox-obve35mrzv56/build.log
[firefox] running [u'/bin/bash', '_hashdist/build.sh']
[firefox] environment:
[firefox]   {'ARTIFACT': u'/local/certik/bld/firefox/obve35mrzv56',
[firefox]    'BASH': u'/bin/bash',
[firefox]    'BUILD': u'/local/certik/tmp/firefox-obve35mrzv56',
[firefox]    'HASHDIST_CPU_COUNT': '4',
[firefox]    'HDIST_CONFIG': '{"gc_roots":"/local/certik/gcroots","build_stores":[{"dir":"/local/certik/bld"}],"source_caches":[{"dir":"/local/certik/src"}],"cache":"/local/certik/cache","build_temp":"/local/certik/tmp"}',
[firefox]    'HDIST_IMPORT': u'patchelf/k3rloj265ogtl4dmmmbmyt34dnffryka python/cmnvlclc3ir3nojeiytuxbgse4tm5uvv',
[firefox]    'HDIST_IMPORT_PATHS': u'/local/certik/bld/patchelf/k3rloj265ogt:/local/certik/bld/python/cmnvlclc3ir3',
[firefox]    'HDIST_VIRTUALS': '',
[firefox]    'PATCHELF': u'/local/certik/bld/patchelf/k3rloj265ogt/bin/patchelf',
[firefox]    u'PATCHELF_DIR': u'/local/certik/bld/patchelf/k3rloj265ogt',
[firefox]    u'PATCHELF_ID': u'patchelf/k3rloj265ogtl4dmmmbmyt34dnffryka',
[firefox]    'PATH': u'/local/certik/bld/python/cmnvlclc3ir3/bin:/usr/bin:/bin',
[firefox]    'PKG_CONFIG_PATH': u'/local/certik/bld/python/cmnvlclc3ir3/lib/pkgconfig',
[firefox]    'PWD': u'/local/certik/tmp/firefox-obve35mrzv56',
[firefox]    'PYTHON': u'/local/certik/bld/python/cmnvlclc3ir3/bin/python',
[firefox]    u'PYTHON_DIR': u'/local/certik/bld/python/cmnvlclc3ir3',
[firefox]    u'PYTHON_ID': u'python/cmnvlclc3ir3nojeiytuxbgse4tm5uvv'}
[firefox] creating cache ./config.cache
[firefox] checking host system type... x86_64-unknown-linux-gnu
[firefox] checking target system type... x86_64-unknown-linux-gnu
[firefox] checking build system type... x86_64-unknown-linux-gnu
[firefox] checking for gawk... gawk
[firefox] Using Python from environment variable $PYTHON
[firefox] Creating Python environment
[firefox] New python executable in /local/certik/tmp/firefox-obve35mrzv56/build2/_virtualenv/bin/python
[firefox] Installing setuptools, pip...done.
[firefox] running build_ext
[firefox] copying build/lib.linux-x86_64-2.7/_psutil_linux.so -> 
[firefox] copying build/lib.linux-x86_64-2.7/_psutil_posix.so -> 
[firefox] 
[firefox] Traceback (most recent call last):
[firefox]   File "<string>", line 1, in <module>
[firefox]   File "/local/certik/tmp/firefox-obve35mrzv56/python/mozbuild/mozbuild/base.py", line 17, in <module>
[firefox]     from mach.mixin.process import ProcessExecutionMixin
[firefox]   File "/local/certik/tmp/firefox-obve35mrzv56/python/mach/mach/mixin/process.py", line 29, in <module>
[firefox]     raise Exception('Could not detect environment shell!')
[firefox] Exception: Could not detect environment shell!
[firefox] configure: error: Python environment does not appear to be sane.
[firefox] checking Python environment is Mozilla virtualenv... ------ config.log ------
[firefox] This file contains any messages produced by compilers while
[firefox] running configure, to aid debugging if configure makes a mistake.
[firefox] 
[firefox] configure:1207: checking host system type
[firefox] configure:1228: checking target system type
[firefox] configure:1246: checking build system type
[firefox] configure:1321: checking for gawk
[firefox] configure:1516: checking Python environment is Mozilla virtualenv
[firefox] configure: error: Python environment does not appear to be sane.
[firefox|ERROR] Command '[u'/bin/bash', '_hashdist/build.sh']' returned non-zero exit status 1
[firefox|ERROR] command failed (code=1); raising

The error is quite amusing: Python environment does not appear to be sane..

@certik
Copy link
Member Author

certik commented Aug 21, 2014

Now it fails with:

[firefox] checking whether the C++ compiler supports -Wempty-body... yes
[firefox] checking whether the C++ compiler supports -Wsign-compare... yes
[firefox] checking whether the C++ compiler supports -Wno-invalid-offsetof... yes
[firefox] checking whether the C++ compiler supports -Wno-inline-new-delete... no
[firefox] checking whether ld has archive extraction flags... yes
[firefox] checking for 64-bit OS... yes
[firefox] checking for custom <inttypes.h> implementation... none specified
[firefox] checking whether the C++ compiler (c++  -fno-exceptions -fno-strict-aliasing -fno-rtti  -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id) actually is a C++ compiler... yes
[firefox] which: no ld.gold in (/local/certik/bld/python/cmnvlclc3ir3/bin:/usr/bin:/bin)
[firefox] checking for ANSI C header files... yes
[firefox] checking for working const... yes
[firefox] checking for mode_t... yes
[firefox] checking for off_t... yes
[firefox] checking for pid_t... yes
[firefox] checking for size_t... yes
[firefox] checking for ssize_t... yes
[firefox] checking for st_blksize in struct stat... yes
[firefox] checking for siginfo_t... yes
[firefox] checking for gcc c++0x headers bug without rtti... yes
[firefox] configure: error: Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain
[firefox] ------ config.log ------
[firefox] configure:10624: gcc -c  -std=gnu99 -fgnu89-inline -fno-strict-aliasing -fno-math-errno  conftest.c 1>&5
[firefox] configure:10649: checking for st_blksize in struct stat
[firefox] configure:10662: gcc -c  -std=gnu99 -fgnu89-inline -fno-strict-aliasing -fno-math-errno  conftest.c 1>&5
[firefox] configure:10686: checking for siginfo_t
[firefox] configure:10699: gcc -c  -std=gnu99 -fgnu89-inline -fno-strict-aliasing -fno-math-errno  conftest.c 1>&5
[firefox] configure:10745: checking for gcc c++0x headers bug without rtti
[firefox] configure:10757: c++ -c  -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x  conftest.C 1>&5
[firefox] In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/memory:83,
[firefox]                  from configure:10751:
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In member function 'virtual void* std::_Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)':
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:146: error: cannot use typeid with -fno-rtti
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In member function 'virtual void* std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_M_get_deleter(const std::type_info&)':
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:204: error: cannot use typeid with -fno-rtti
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In constructor 'std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, _Alloc, _Args&& ...)':
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:861: error: cannot use typeid with -fno-rtti
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h: In function '_Del* std::get_deleter(const std::__shared_ptr<_Tp2, _Lp>&)':
[firefox] /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/shared_ptr.h:1005: error: cannot use typeid with -fno-rtti
[firefox] configure: failed program was:
[firefox] #line 10750 "configure"
[firefox] #include "confdefs.h"
[firefox] #include <memory>
[firefox] int main() {
[firefox] 
[firefox] ; return 0; }
[firefox] configure: error: Your toolchain does not support C++0x/C++11 mode properly. Please upgrade your toolchain
[firefox|ERROR] Command '[u'/bin/bash', '_hashdist/build.sh']' returned non-zero exit status 1
[firefox|ERROR] command failed (code=1); raising

My compilers are too old. I am rerunning this with my gcc 4.9 compilers from Hashdist.

@certik
Copy link
Member Author

certik commented Aug 21, 2014

Even if gcc 4.9 is in my PATH, I think the PATH is stripped by Hashdist. So I need to probably put my build environment to the prologue.

@certik
Copy link
Member Author

certik commented Aug 21, 2014

Ok, I just used this temporary local patch:

diff --git a/pkgs/firefox.yaml b/pkgs/firefox.yaml
index d5ca3de..7821da6 100644
--- a/pkgs/firefox.yaml
+++ b/pkgs/firefox.yaml
@@ -14,6 +14,7 @@ build_stages:
     mkdir build2 # build exists
     cd build2
     export SHELL=/bin/bash
+    export PATH=/home/certik/repos/hashstack/basis/bin:$PATH
     ../configure --prefix=$ARTIFACT
     make -j ${HASHDIST_CPU_COUNT}

Now it fails with missing GTK:

[firefox] checking for __attribute__((warn_unused_result))... yes
[firefox] checking for LC_MESSAGES... yes
[firefox] checking for localeconv... yes
[firefox] checking for YASM assembler... checking for yasm... no
[firefox] checking for application to build... browser
[firefox] checking if app-specific confvars.sh exists... ../browser/confvars.sh
[firefox] checking for pkg-config... /home/certik/repos/hashstack/basis/bin/pkg-config
[firefox] 
[firefox] checking for gtk+-2.0 >= 2.10.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-2.0... 
[firefox] configure: error: Library requirements (gtk+-2.0 >= 2.10.0 gtk+-unix-print-2.0 glib-2.0 gobject-2.0 gdk-x11-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

So we'll have to compile that first.

@jcftang
Copy link
Member

jcftang commented Aug 22, 2014

gtk may introduce a few dependencies, it may require that a bunch of x11 libs to be installed. it might be worth trying to capture these and write down the requirements into a readme file.

@certik
Copy link
Member Author

certik commented Aug 22, 2014

I think it might be similar to the Qt package, which we already have in Hashdist.

@jcftang
Copy link
Member

jcftang commented Oct 13, 2014

I'm at a point where I am interested in gtk2 for another package which might progress this along, any interest in gtk2 into hashstack?

@certik
Copy link
Member Author

certik commented Oct 14, 2014

Yes, we should have gtk2 in Hashstack, just like we have Qt. I don't have time currently to work on it, but I'll be happy to test your PR if you send one.

@jcftang jcftang mentioned this pull request Oct 15, 2014
@certik
Copy link
Member Author

certik commented Oct 31, 2014

The package should now build. I am still struggling with one dependency to gtk2 on my machine, so I can't test it yet.

@ahmadia any objections against merging this, so that others can work on it from master?

@certik certik changed the title [WIP] Add Firefox Add Firefox Oct 31, 2014
@ahmadia
Copy link
Contributor

ahmadia commented Feb 23, 2015

Hi @certik - Sorry for the radio silence on this. Have you had a chance to fix the gtk2 dependency?

@certik
Copy link
Member Author

certik commented Feb 23, 2015

I am back on it. Pixman fails (#670), so I can't build gtk2 for now. Keep this PR open, the Firefox package should be on the right track, I just need to figure out how to build the dependencies.

@certik
Copy link
Member Author

certik commented Feb 23, 2015

Pixman is fixed by (#671).

Now the big problem: #672. That was the original problem that I was hitting in this PR, and unfortunately it still fails with the latest Hashstack, and I don't know how to fix it.

@certik
Copy link
Member Author

certik commented Feb 23, 2015

Another problem: #674.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants