rmottola / Arctic-Fox

Web Browser for Mac OS X 10.6+, Linux (PowerPC, x86, amd64, ARM, MIPS), NetBSD, OpenBSD, and Windows XP.
Other
289 stars 35 forks source link

compile] Error 2 on Alpine Linux #100

Open nonvwvnon opened 2 years ago

nonvwvnon commented 2 years ago

platform: alpinelinux

File-- .mozconfig

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-x86_64-unknown-linux-gnu

mk_add_options MOZ_MAKE_FLAGS="-s -j4"

ac_add_options --disable-crashreporter ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-updater ac_add_options --disable-mozril-geoloc ac_add_options --disable-webrtc ac_add_options --disable-safe-browsing ac_add_options --disable-parental-controls ac_add_options --disable-release ac_add_options --disable-necko-wifi ac_add_options --disable-eme ac_add_options --disable-gamepad ac_add_options --disable-dbus ac_add_options --disable-gio ac_add_options --disable-pulseaudio ac_add_options --enable-strip ac_add_options --enable-install-strip ac_add_options --enable-application=browser ac_add_options --with-branding=browser/branding/arcticfox ac_add_options --enable-optimize="-O2 -march=westmere"

./mach build

make[5]: Leaving directory '/root/Downloads/Arctic-Fox-39.1/obj-x86_64-unknown-linux-gnu/netwerk/ipc' make[4]: Leaving directory '/root/Downloads/Arctic-Fox-39.1/obj-x86_64-unknown-linux-gnu' make[3]: [/root/Downloads/Arctic-Fox-39.1/config/recurse.mk:33: compile] Error 2 make[3]: Leaving directory '/root/Downloads/Arctic-Fox-39.1/obj-x86_64-unknown-linux-gnu' make[2]: [/root/Downloads/Arctic-Fox-39.1/config/rules.mk:548: default] Error 2 make[2]: Leaving directory '/root/Downloads/Arctic-Fox-39.1/obj-x86_64-unknown-linux-gnu' make[1]: *** [/root/Downloads/Arctic-Fox-39.1/client.mk:399: realbuild] Error 2

rmottola commented 2 years ago

Your log is not very exhaustive, it does not show the effective error.

ArcticFox currently does not complete a build for me on AlpineLinux, it goes much further than your example shows, it blows up inside the spell checker, even if I use the system supplied one, I don't know why though.

What compiler are you using? Do you have python 2.7 and autoconf 2.13 installed?

nonvwvnon commented 2 years ago

is there a file where arctic-fox can keep the compilation results to a log file ?

python 2.7.18 and autoconf 2.13 are both installed

.mozconfig file:

export CC=gcc export CXX=g++ mk_add_options PYTHON=/usr/bin/python2 mk_add_options AUTOCONF=/usr/bin/autoconf-2.13

Clear this if not a 64bit build

_BUILD_64=1

Set GTK Version to 2 or 3

_GTK_VERSION=2

Standard build options for Pale Moon

ac_add_options --enable-application=palemoon ac_add_options --enable-optimize="-O2 -w" ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION ac_add_options --enable-jemalloc ac_add_options --enable-strip ac_add_options --enable-devtools ac_add_options --enable-av1 ac_add_options --disable-gamepad ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-necko-wifi ac_add_options --disable-updater ac_add_options --disable-gconf ac_add_options --with-pthreads

Please see https://www.palemoon.org/redist.shtml for restrictions when using the official brandin>

ac_add_options --enable-official-branding export MOZILLA_OFFICIAL=1

Processor architecture specific build options

if [ -n "$_BUILD_64" ]; then ac_add_options --x-libraries=/usr/lib64 else ac_add_options --x-libraries=/usr/lib fi

export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION

rmottola commented 2 years ago

Current development branch is rmottola:dev, please test on that.

The build log and error show on std-out usually or can be retrieved with "mach show-log"

I use as optimization flags the following when compiling with gcc 6.5 or higher (does not affect compilation success, but will lead to crashing app)

ac_add_options --enable-optimize="-O2 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"

and, to attempt work around the hunspell issue:

# System libraries                                                                                                       
ac_add_options --with-system-nspr                                                                                        
ac_add_options --with-system-nss                                                                                         
ac_add_options --with-system-icu                                                                                         
ac_add_options --with-system-zlib                                                                                        
ac_add_options --with-system-bz2                                                                                         
ac_add_options --enable-system-hunspell                                                                                  
#ac_add_options --enable-system-sqlite                                                                                   
ac_add_options --enable-system-ffi                                                                                       
ac_add_options --enable-system-pixman                                                                                    

My attempts to build on alpine 3.15 on my dev branch with the above options fail with:

293:39.66 /home/multix/code/Arctic-Fox/xpcom/base/nsMemoryReporterManager.cpp:183:21: error: variable 'SystemHeapSize(int64_t*)::mallinfo info' has initializer but incomplete type
293:39.66   183 |     struct mallinfo info = mallinfo();
293:39.66       |                     ^~~~
293:39.67 /home/multix/code/Arctic-Fox/xpcom/base/nsMemoryReporterManager.cpp:183:37: error: invalid use of incomplete type 'struct SystemHeapSize(int64_t*)::mallinfo'
293:39.67   183 |     struct mallinfo info = mallinfo();
293:39.67       |                                     ^
rmottola commented 2 years ago

I fixed the mallinfo issue! I backported a specific fix

nonvwvnon commented 2 years ago

i got a cannot find <sys/queue.h> while compile. do you mind share your .mozconfig ? i will then try the compilation again.

nonvwvnon commented 2 years ago

did you get a working articfox on alpinelinux 3.15?

rmottola commented 2 years ago

I track this as a reference: https://github.com/rmottola/Arctic-Fox/issues/110

I did not get further, I am stuck at this error, even with system hunspell. I tried today with my current source and the error is still valid.

rmottola commented 2 years ago

ac_add_options --enable-gold ac_add_options --disable-crashreporter ac_add_options --disable-tests ac_add_options --disable-debug ac_add_options --disable-updater ac_add_options --disable-mozril-geoloc ac_add_options --disable-webrtc ac_add_options --disable-safe-browsing ac_add_options --disable-parental-controls ac_add_options --enable-release ac_add_options --disable-necko-wifi ac_add_options --disable-eme ac_add_options --disable-gamepad ac_add_options --disable-dbus ac_add_options --disable-gio ac_add_options --disable-pulseaudio

ac_add_options --enable-strip

ac_add_options --enable-install-strip

ac_add_options --enable-application=browser ac_add_options --with-branding=browser/branding/arcticfox ac_add_options --enable-optimize="-O2 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"

ac_add_options --with-system-nspr ac_add_options --with-system-nss ac_add_options --with-system-icu ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --enable-system-hunspell

ac_add_options --enable-system-sqlite

ac_add_options --enable-system-ffi ac_add_options --enable-system-pixman

rmottola commented 1 year ago

Did you try current? most fixes are in... but complete build fails tue to hunspell. I tried using system one, but it does not help (note options above). Hints on AlpineLinux support welcomed

rmottola commented 7 months ago

@nonvwvnon could you try with current git?