How do I make mach compile a custom stable version?
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
How do I make mach compile a custom stable version?
Trying to make a build using custom branding and with the new signed addons requirement turned off. I copied the Aurora branding folder to mybranding, and added the with-branding=browser/branding/mybranding to mozconf.
After it built, the about screen seems to imply that I have an alpha release, 54.0a1 (2017-02-15). But I want the current stable release, which I believe is 51. Just with the custom branding and unsigned extensions. What option do I need in order to do this?
After it built, the about screen seems to imply that I have an alpha release, 54.0a1 (2017-02-15). But I want the current stable release, which I believe is 51. Just with the custom branding and unsigned extensions. What option do I need in order to do this?
-
- Posts: 1504
- Joined: October 1st, 2014, 3:25 pm
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
Thanks, I added:
export MOZ_REQUIRE_ADDON_SIGNING=0
export MOZ_ADDON_SIGNING=0
export MOZ_REQUIRE_SIGNING=0
to my mozconfig. I'm still not sure how to tell it what version to build. Is there a "stable" option? I've been Googling a lot and finding next to nothing.
export MOZ_REQUIRE_ADDON_SIGNING=0
export MOZ_ADDON_SIGNING=0
export MOZ_REQUIRE_SIGNING=0
to my mozconfig. I'm still not sure how to tell it what version to build. Is there a "stable" option? I've been Googling a lot and finding next to nothing.
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
OK, I think i needed to do:
hg clone https://hg.mozilla.org/releases/mozilla-release release
instead of mozilla-central. I think it would be nice if the build documentation mentioned that!
hg clone https://hg.mozilla.org/releases/mozilla-release release
instead of mozilla-central. I think it would be nice if the build documentation mentioned that!
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
So I got it to build and install and run on the computer a built it on, but when trying to install it on another computer with a different version of Linux, it won't run. I get:
XPCOMGlueLoad error for file /opt/myapp/lib/myapp-51.0.2/libxul.so:
/opt/myapp/lib/myapp-51.0.2/libxul.so: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Couldn't load XPCOM.
So is this because a package is missing, or because a package on the new computers is the wrong version? And is there a way to build Firefox with everything it needs in a self-contained manner so that it will run on different versions of Linux? They are all 64 bit multi-core computers with Ubuntu or Mint, just different releases.
XPCOMGlueLoad error for file /opt/myapp/lib/myapp-51.0.2/libxul.so:
/opt/myapp/lib/myapp-51.0.2/libxul.so: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
Couldn't load XPCOM.
So is this because a package is missing, or because a package on the new computers is the wrong version? And is there a way to build Firefox with everything it needs in a self-contained manner so that it will run on different versions of Linux? They are all 64 bit multi-core computers with Ubuntu or Mint, just different releases.
-
- Posts: 1504
- Joined: October 1st, 2014, 3:25 pm
Re: How do I make mach compile a custom stable version?
Don't build Mozilla-based applications on Ubuntu. I used to, and hit all sorts of weird issues with my builds.
Switched to building on Scientific Linux and all that went away.
And yes, it will run fine on 64-bit Ubuntu - in fact, that's the setup I'm using to post this.
Switched to building on Scientific Linux and all that went away.
And yes, it will run fine on 64-bit Ubuntu - in fact, that's the setup I'm using to post this.
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
Any options that don't require installing a completely different distribution?
-
- Posts: 1504
- Joined: October 1st, 2014, 3:25 pm
Re: How do I make mach compile a custom stable version?
I understand your concern and I agree. What I do is build in a VirtualBox virtual machine. Then the primary machine can be kept as-is.
For the virtual hardware, 3 GB RAM and 2 CPU cores seems to do.
For the virtual hardware, 3 GB RAM and 2 CPU cores seems to do.
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
Do you know what setting needs changed to change the home folder profile folder? Right now it's putting it in ~/.mozilla/myapp but it should be ~/.myapp since it's not a Mozilla product anymore.
-
- Posts: 1504
- Joined: October 1st, 2014, 3:25 pm
Re: How do I make mach compile a custom stable version?
I think the name of the .mozilla folder is controlled by the vendor. You might try editing the "Vendor=" line in the application.ini file.
I don't know more details than that, sorry.
I don't know more details than that, sorry.
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
There's 33 files called "application.ini" in the source directory. The most promising is release/build/application.ini. It reads:
#if MOZ_APP_STATIC_INI
#ifdef MOZ_BUILD_APP_IS_BROWSER
; This file is not used. If you modify it and want the application to use
; your modifications, move it under the browser/ subdirectory and start with
; the "-app /path/to/browser/application.ini" argument.
#else
; This file is not used. If you modify it and want the application to use
; your modifications, start with the "-app /path/to/application.ini"
; argument.
#endif
#endif
#if 0
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
#endif
#filter substitution
#include @TOPOBJDIR@/buildid.h
#include @TOPOBJDIR@/source-repo.h
[App]
Vendor=@MOZ_APP_VENDOR@
Name=@MOZ_APP_BASENAME@
RemotingName=@MOZ_APP_REMOTINGNAME@
#ifdef MOZ_APP_DISPLAYNAME
CodeName=@MOZ_APP_DISPLAYNAME@
#endif
Version=@MOZ_APP_VERSION@
#ifdef MOZ_APP_PROFILE
Profile=@MOZ_APP_PROFILE@
#endif
BuildID=@MOZ_BUILDID@
#ifdef MOZ_SOURCE_REPO
SourceRepository=@MOZ_SOURCE_REPO@
#endif
#ifdef MOZ_SOURCE_STAMP
SourceStamp=@MOZ_SOURCE_STAMP@
#endif
ID=@MOZ_APP_ID@
....
So if I understand correctly, I need to copy the file to the browser/ directory.
But the, "and start with the "-app /path/to/browser/application.ini" argument." part doesn't make any sense. Start the file with that line? Or start the ./mach build command with that argument? Or add something to the mozconfig?
It's also not clear what @MOZ_APP_VENDOR@ can be replaced with. Any string?
#if MOZ_APP_STATIC_INI
#ifdef MOZ_BUILD_APP_IS_BROWSER
; This file is not used. If you modify it and want the application to use
; your modifications, move it under the browser/ subdirectory and start with
; the "-app /path/to/browser/application.ini" argument.
#else
; This file is not used. If you modify it and want the application to use
; your modifications, start with the "-app /path/to/application.ini"
; argument.
#endif
#endif
#if 0
; This Source Code Form is subject to the terms of the Mozilla Public
; License, v. 2.0. If a copy of the MPL was not distributed with this
; file, You can obtain one at http://mozilla.org/MPL/2.0/.
#endif
#filter substitution
#include @TOPOBJDIR@/buildid.h
#include @TOPOBJDIR@/source-repo.h
[App]
Vendor=@MOZ_APP_VENDOR@
Name=@MOZ_APP_BASENAME@
RemotingName=@MOZ_APP_REMOTINGNAME@
#ifdef MOZ_APP_DISPLAYNAME
CodeName=@MOZ_APP_DISPLAYNAME@
#endif
Version=@MOZ_APP_VERSION@
#ifdef MOZ_APP_PROFILE
Profile=@MOZ_APP_PROFILE@
#endif
BuildID=@MOZ_BUILDID@
#ifdef MOZ_SOURCE_REPO
SourceRepository=@MOZ_SOURCE_REPO@
#endif
#ifdef MOZ_SOURCE_STAMP
SourceStamp=@MOZ_SOURCE_STAMP@
#endif
ID=@MOZ_APP_ID@
....
So if I understand correctly, I need to copy the file to the browser/ directory.
But the, "and start with the "-app /path/to/browser/application.ini" argument." part doesn't make any sense. Start the file with that line? Or start the ./mach build command with that argument? Or add something to the mozconfig?
It's also not clear what @MOZ_APP_VENDOR@ can be replaced with. Any string?
-
- Posts: 1504
- Joined: October 1st, 2014, 3:25 pm
Re: How do I make mach compile a custom stable version?
I wouldn't replace that. It'd be better to find out where MOZ_APP_VENDOR is getting defined as "Mozilla", and do the replacement there.lightnb wrote:It's also not clear what @MOZ_APP_VENDOR@ can be replaced with. Any string?
Someone else would have to advise on that, as I haven't ventured there.
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
Now I can't even get it to build again. First, mach ./build hangs with
0:21.47 ERROR: old-configure failed
0:21.49 *** Fix above errors and then restart with\
0:21.49 "/usr/bin/make -f client.mk build"
0:21.49 client.mk:373: recipe for target 'configure' failed
0:21.49 make: *** [configure] Error 1
So you have to press ctrl+c. Then when you run mach ./build a second time, it hangs with:
Traceback (most recent call last):
0:05.32 File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
0:05.32 self.run()
0:05.32 File "/usr/lib/python2.7/threading.py", line 754, in run
0:05.32 self.__target(*self.__args, **self.__kwargs)
0:05.32 File "/usr/lib/python2.7/multiprocessing/pool.py", line 389, in _handle_results
0:05.32 task = get()
0:05.32 TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())
Is there some clean command for mach to run after a failed configure?
0:21.47 ERROR: old-configure failed
0:21.49 *** Fix above errors and then restart with\
0:21.49 "/usr/bin/make -f client.mk build"
0:21.49 client.mk:373: recipe for target 'configure' failed
0:21.49 make: *** [configure] Error 1
So you have to press ctrl+c. Then when you run mach ./build a second time, it hangs with:
Traceback (most recent call last):
0:05.32 File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
0:05.32 self.run()
0:05.32 File "/usr/lib/python2.7/threading.py", line 754, in run
0:05.32 self.__target(*self.__args, **self.__kwargs)
0:05.32 File "/usr/lib/python2.7/multiprocessing/pool.py", line 389, in _handle_results
0:05.32 task = get()
0:05.32 TypeError: ('__init__() takes at least 3 arguments (1 given)', <class 'subprocess.CalledProcessError'>, ())
Is there some clean command for mach to run after a failed configure?
-
- Posts: 1504
- Joined: October 1st, 2014, 3:25 pm
Re: How do I make mach compile a custom stable version?
You did hg commit all of your desired customisations, didn't you?
Move your .mozconfig outside of the source tree, then run -
This will delete all files in the source tree that aren't tracked by Mercurial.
All that is assuming your objdir is inside the source tree. If it's not, try just manually deleting the entire objdir.
Move your .mozconfig outside of the source tree, then run -
Code: Select all
hg purge --all
All that is assuming your objdir is inside the source tree. If it's not, try just manually deleting the entire objdir.
-
- Posts: 103
- Joined: August 31st, 2005, 11:21 pm
Re: How do I make mach compile a custom stable version?
Thanks, I did a purge. Still won't configure though. This is stupid because I've built it successfully before.
js/src> /bin/sh: 1: ./config.status: Permission denied
0:18.18
0:21.58 DEBUG: <truncated - see config.log for full output>
0:21.58 DEBUG: configure checking GLIB_LIBS
0:21.58 DEBUG: configure checking for freetype2 >= 6.1.0
0:21.58 DEBUG: configure checking FT2_CFLAGS
0:21.58 DEBUG: configure checking FT2_LIBS
0:21.58 DEBUG: configure checking for FT_Bitmap_Size.y_ppem
0:21.58 DEBUG: configure /usr/bin/gcc -std=gnu99 -c -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 conftest.c 1>&5
0:21.58 DEBUG: configure checking for FT_GlyphSlot_Embolden
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B /src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl -lfreetype 1>&5
0:21.59 DEBUG: configure checking for FT_Load_Sfnt_Table
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl -lfreetype 1>&5
0:21.59 DEBUG: configure checking for fontconfig/fcfreetype.h
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -c -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 conftest.c 1>&5
0:21.59 DEBUG: configure checking for fontconfig >= 2.7.0
0:21.59 DEBUG: configure checking _FONTCONFIG_CFLAGS
0:21.59 DEBUG: configure checking _FONTCONFIG_LIBS
0:21.59 DEBUG: configure checking for posix_fadvise
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl 1>&5
0:21.59 DEBUG: configure checking for posix_fallocate
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl 1>&5
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -c -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe conftest.c 1>&5
0:21.59 ERROR: old-configure failed
0:21.61 *** Fix above errors and then restart with\
0:21.61 "/usr/bin/make -f client.mk build"
0:21.61 client.mk:373: recipe for target 'configure' failed
0:21.61 make: *** [configure] Error 1
js/src> /bin/sh: 1: ./config.status: Permission denied
0:18.18
0:21.58 DEBUG: <truncated - see config.log for full output>
0:21.58 DEBUG: configure checking GLIB_LIBS
0:21.58 DEBUG: configure checking for freetype2 >= 6.1.0
0:21.58 DEBUG: configure checking FT2_CFLAGS
0:21.58 DEBUG: configure checking FT2_LIBS
0:21.58 DEBUG: configure checking for FT_Bitmap_Size.y_ppem
0:21.58 DEBUG: configure /usr/bin/gcc -std=gnu99 -c -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 conftest.c 1>&5
0:21.58 DEBUG: configure checking for FT_GlyphSlot_Embolden
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B /src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl -lfreetype 1>&5
0:21.59 DEBUG: configure checking for FT_Load_Sfnt_Table
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl -lfreetype 1>&5
0:21.59 DEBUG: configure checking for fontconfig/fcfreetype.h
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -c -fno-strict-aliasing -fno-math-errno -pthread -pipe -I/usr/include/freetype2 conftest.c 1>&5
0:21.59 DEBUG: configure checking for fontconfig >= 2.7.0
0:21.59 DEBUG: configure checking _FONTCONFIG_CFLAGS
0:21.59 DEBUG: configure checking _FONTCONFIG_LIBS
0:21.59 DEBUG: configure checking for posix_fadvise
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl 1>&5
0:21.59 DEBUG: configure checking for posix_fallocate
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -o conftest -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id -B src/release/obj-x86_64-pc-linux-gnu/build/unix/gold conftest.c -ldl 1>&5
0:21.59 DEBUG: configure /usr/bin/gcc -std=gnu99 -c -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-strict-aliasing -fno-math-errno -pthread -pipe conftest.c 1>&5
0:21.59 ERROR: old-configure failed
0:21.61 *** Fix above errors and then restart with\
0:21.61 "/usr/bin/make -f client.mk build"
0:21.61 client.mk:373: recipe for target 'configure' failed
0:21.61 make: *** [configure] Error 1