Bebert
October 17, 2024, 5:40pm
233
Very good job !
Two problems for me:
I don’t manage to test webgl water test, maybe due to my old hardware (ATI H4550 RV710)
Thanks for all your staff !!
1 Like
I’ve tried to follow the instructions on the wiki to compile :
I’m OK until the ./mach boostrap and then with ./mach build I have the below : any idea what’s wrong ?
0:00.70 W Clobber not needed.
0:00.76 W Adding make options from /boot/home/Documents/C/gecko-dev/mozconfig
MOZ_OBJDIR=/boot/home/Documents/C/gecko-dev/obj-ff-dbg
OBJDIR=/boot/home/Documents/C/gecko-dev/obj-ff-dbg
FOUND_MOZCONFIG=/boot/home/Documents/C/gecko-dev/mozconfig
export FOUND_MOZCONFIG
0:00.76 /bin/make -f client.mk -j4 -s
0:01.53 Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.54 Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.72 Elapsed: 0.14s; From _tests: Kept 679 existing; Added/updated 0; Removed 0 files and 0 directories.
0:01.95 Elapsed: 0.51s; From dist/include: Kept 6561 existing; Added/updated 0; Removed 0 files and 0 directories.
0:02.24 Elapsed: 0.32s; From dist/bin: Kept 2908 existing; Added/updated 0; Removed 0 files and 0 directories.
0:02.49 ./ServoStyleConsts.h.stub
0:02.95 thread 'main' panicked at /boot/home/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cbindgen-0.27.0/src/bindgen/config.rs:1125:34:
0:02.95 called `Result::unwrap()` on an `Err` value: "Couldn't parse config file: TOML parse error at line 355, column 1\n |\n355 | \"Keyframe\" = \"Keyframe\"\n | ^\nduplicate key `Keyframe` in table `export.rename`\n."
0:02.95 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
0:03.00 backend.mk:571: recipe for target 'layout/style/.deps/ServoStyleConsts.h.stub' failed
0:03.00 make[3]: *** [layout/style/.deps/ServoStyleConsts.h.stub] Error 101
0:03.00 make[3]: *** Waiting for unfinished jobs....
0:03.18 /boot/home/Documents/C/gecko-dev/config/recurse.mk:32: recipe for target 'export' failed
0:03.18 make[2]: *** [export] Error 2
0:03.18 /boot/home/Documents/C/gecko-dev/config/rules.mk:361: recipe for target 'default' failed
0:03.18 make[1]: *** [default] Error 2
0:03.18 client.mk:59: recipe for target 'build' failed
0:03.18 make: *** [build] Error 2
0:03.20 W 0 compiler warnings present.
1 Like
KENZ
October 17, 2024, 11:12pm
235
Welcome to the gecko hacking land!
I didn’t see that error. It seems cbindgen failed to generate .toml file probably rust copmpiler use.
cbindgen is a rust binding generator for C(/limited C++) library. Mozilla’s build system has build phases including configure, export, compile, misc and so on. In export phase it generates source files from data or other type files. cbindgen failed to generate correct output here, but not catched.
I don’t know what failed in detail, but want to see clean generated files and regenerate it.
Run ./mach clobber
which cleans build output, then ./mach build
again.
See also:
1 Like
KENZ
October 17, 2024, 11:42pm
236
2 Likes
KENZ
October 17, 2024, 11:48pm
237
Bebert:
Thank you for reporting. Registered issue for the former. The latter is known and some people pointed out.
2 Likes
KENZ
October 18, 2024, 3:29am
238
OK I found the problem
cbindgen 0.27 was not compatible with our tree
to fix we can
Rebase our branch to esr128 latest
Or build cbindgen 0.26 specifically on your side as a workaround
Could you try the latter for now?
2 Likes
With cbindgen 0.26 indeed I dont’ have anymore the error. Compilation in progress.
Thanks
2 Likes
I reach “wgpu_bindings” with the below error : any idea about the I/O failure ?
Maybe not enough remaining memory ? (90% of my 8 Gb are used)
13:28.13 Compiling fluent-langneg-ffi v0.1.0 (/boot/home/Documents/C/gecko-dev/intl/locale/rust/fluent-langneg-ffi)
13:31.27 Compiling wgpu_bindings v0.1.0 (/boot/home/Documents/C/gecko-dev/gfx/wgpu_bindings)
14:37.30 rustc-LLVM ERROR: IO failure on output stream: Permission denied
14:37.45 error: could not compile `tabs` (lib)
14:37.45 warning: build failed, waiting for other jobs to finish...
14:37.89 dom/abort
14:38.53 clang++: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
15:34.91 dom/animation
15:35.65 clang++: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
Meanwhile exploring SVG to HVIF icon for the upcoming Firefox
3 Likes
X512
October 18, 2024, 10:26pm
242
“Firefox” brand name and icon is probably not allowed to be used in HaikuPorts until Mozilla will have official Haiku support.
6 Likes
KENZ
October 18, 2024, 11:43pm
243
If log is correct, it fails with a permission error to output. When I start building, I sometimes experienced file system error with USB thumb drive.
What I concerned is which is your build directory a normal BFS partition on SSD/HDD, a VM image or some special partition or filesystem?
I successfully build on BFS partition of USB SSD of bare metal.
1 Like
dcatt
October 19, 2024, 1:47am
244
Let’s hope Mozilla will give Haiku its blessing for using the Firefox brand.
nipos
October 19, 2024, 6:12am
245
It doesn’t really matter.
Using the Nightly brand,which I think is allowed without special agreement from Mozilla,won’t make it a different browser.
On the other hand,using a non-Firefox brand will give us a lot more freedom to finetune the settings and disable quite a few antifeatures by default.
7 Likes
16 Gb seem to be required as it’s now ok.
It’s a beast to compile
I’ve used “./mach build”, what are the options to make the executable lighter ?
My version compiled :
3060336 oct. 21 05:23 firefox
Your version distributed :
358432 oct. 14 18:29 /boot/home/Desktop/firefox/firefox
And it’s exiting more often due to error :
Exiting due to channel error.
1 Like
KENZ
October 21, 2024, 12:15pm
247
You need to use haiku_mozconfig
instead of haiku_mozconfig_dbg
to get an optimized release build. Our build instruction specifies the former for development use.
You can change that by
rm mozconfig
and ln -S haiku_mozconfig mozconfig
or export MOZCONFIG=path/to/haiku_mozconfig
to override mozconfig specification
This is effectively changing following build settings
build output directory to one dedicated for release build
debug build to release optimized build
Such a big build config change results a full-build, so next ./mach build
should take hours.
EDIT: you can make tgz package with ./mach package
after build finished. What I uploaded was made with such steps.
You need revert this commit
committed 01:48PM - 15 Oct 24 UTC
This reverts commit 2eb8767e88080d46ed368d76794cf7cfcb2f2cef.
I will push this to haiku128 branch later.
1 Like
With the commit reverted indeed it’s more stable now it tooks only a few minutes to recompile. (Versus more than 5 hours for the whole)
Thank you for the details of the mach build, I have now a working env for compiling gecko-dev : I think 8 Gb of memory is not enough, so maybe this can be indicated on the wiki to avoid this pitfall
3 Likes
I have a question as I’m new to the debugging land :
Why the Haiku Debugger tool is not displaying the source of the firexfox program even if it’s compiled with debug info ?
file /boot/home/Documents/C/gecko-dev/obj-ff-dbg/dist/bin/firefox
/boot/home/Documents/C/gecko-dev/obj-ff-dbg/dist/bin/firefox: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=2fd00db3ef61a3870fe8bbe568089e16aa74d066, with debug_info, not stripped
For a simple OpenGL program it’s working fine as per below :
But for firefox main program, the source is not displayed :
KENZ
October 21, 2024, 9:38pm
251
Short answer is, use GDB15 to debug firefox.
It is why I played with Haiku Native debugger. I was there last year:
As first screenshot I shared, Debugger failed to find C++ symbols, this made debugging nightmare.
This seems the same problem with the following topic,
I searched around workaround about this but I have no luck.
Finally, I tried building Firefox source with GCC (instead of default Clang). But it failed because libxul.so is too large (0x4864c809 bytes = 1,214,564,361 bytes = 1.2GiB).
75:48.07 toolkit/library/build/libxul.so
81:10.04 /boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-h…
There are two problem with Native Debugger:
Latest debugging info(DWARF) support was missing
it lacks DWARF v4/v5 support then
with DWARF v3, it was incompatible with firefox build output, so I hacked some:
some people worked/is working to improve this
Too large debugging info of libxul.so(Firefox’s core/body library)
Native Debugger doesn’t have scalability for this of magnitude.
it took minutes to load debugging info, exausts 16GB ram then I had. And every stepping execution a few minutes, simply not usable.
So I tackled try porting LLDB but it didn’t succeed then by lacking both of my skill and my spare time
I’m struggling on debugging too bloated libxul.so of Firefox (it is virtually the body of the Firefox) these days.
I tried using system libraries rather than in-tree ones as many as possible, but it shrunk just tens of MBs instead of hundreds of MBs.
I thought using LLDB may help this situation, but there is no LLDB or even GDB in HaikuDepot.
I’ve reached this info (again PulkoMandy here!), I know LLDB needs some patches to talk with Haiku binaries.
I want to spend some time to try porting…
In this year’s GSoC, a student @trungnt2910 worked on improving this situation
Hi, it’s me @trungnt2910 again.
Currently, the native Debugger app is having a monopoly for userland debugging on Haiku. However, as I have experienced while porting .NET, and probably other developers trying to port complex software to Haiku have as well , the inbox Debugger has many limitations, including:
Annoying dialogs prompting to load symbols. Recently they have been updated to allow skipping all for the current session, yet these dialogs have not provided any option to silence for the…
and he did! He ported latest GDB again and made it very stable enough to debug the firefox.
His blog series on this is great to read.
Project overview A part of Google Summer of Code 2024, this project aimed to improve the userland debugging experience for Haiku app developers, boosting the process of building and porting complex applications.
The first objective was to have a …
It can be used to debug C++/Rust mixed project. I’m using Qt Creator for GDB graphical frontend.
Thank you for all your hard work!
Now I can use your latest GCC port to debug firefox. Currently Qt Creator is the best graphical GUI frontend which works for me as far as I tested.
GCC consumes 2GB+ RAM to debug firefox, but it is greatly improved from the native Debugger days.
It works for step-execution on C++/Rust mixed project, too.
[screenshot16]
EDIT: I wrote GDB as GCC, I was sleeping in bed then.
4 Likes
KENZ
October 21, 2024, 9:57pm
252
This is my working debug configuration of Qt Creator
Launch Qt Creator
Open menu “Debug - Start Debugging - Start and Debug External Application…”
Setting configuration like this
Local executable:
specify path to obj-ff-dbg/dist/bin/firefox
Command line arguments:
-no-remote -profile /boot/home/src/gecko-dev/obj-ff-dbg/tmp/profile-default
this is one which displayed when you ./mach run
Working directory:
I don’t believe this is important, but I use the source tree root as there is where ./mach run
executed in
If you didn’t export WAYLAND_DISPLAY=:0
when you launch Qt Creator, you need Manage
the Kit and specify that in Environment:
field.
8 Likes