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

Thorium Building Discussion #9

Closed
gz83 opened this issue Apr 21, 2022 · 68 comments
Closed

Thorium Building Discussion #9

gz83 opened this issue Apr 21, 2022 · 68 comments

Comments

@gz83
Copy link
Collaborator

gz83 commented Apr 21, 2022

The latest version 103 finally does not need to use compatibility mode to open the browser, but when searching on the settings page, the browser still crashes.

Also, is it possible to use GitHub Actions to compile source code into Thorium executable?

@Alex313031
Copy link
Owner

@gz83 Yeah they finally fixed it upstream. And yeah I know. I'm investigating. Im gonna make a Thorium build that has anything that could possibly have to do with settings code omitted. Because I think it IS something on my end, as other AVX2 releases from woolyss.com dont have this issue.

@gz83
Copy link
Collaborator Author

gz83 commented Apr 22, 2022

@gz83 Yeah they finally fixed it upstream. And yeah I know. I'm investigating. Im gonna make a Thorium build that has anything that could possibly have to do with settings code omitted. Because I think it IS something on my end, as other AVX2 releases from woolyss.com dont have this issue.

OK, I understand, thank you very much for your contribution!

If you encounter other problems later, I will give you feedback in time.

@Alex313031
Copy link
Owner

@gz83 And about GitHub actions, I've never used it before, and IDK how well/if at all it would work with a project on the scale of Chromium/Thorium. Compiling Thorium on my i7 4790K thats overclocked all cores to 4.6Ghz takes 3-4 hours.
If you or anyone wants a full walkthrough on how to compile it for yourself, I'm more than happy to oblige, I've guided two people so far. The releases almost always coincide with the commits, I.E. compiling it yourself your not gonna get a newer version.

@gz83
Copy link
Collaborator Author

gz83 commented Apr 23, 2022

@gz83 And about GitHub actions, I've never used it before, and IDK how well/if at all it would work with a project on the scale of Chromium/Thorium. Compiling Thorium on my i7 4790K thats overclocked all cores to 4.6Ghz takes 3-4 hours. If you or anyone wants a full walkthrough on how to compile it for yourself, I'm more than happy to oblige, I've guided two people so far. The releases almost always coincide with the commits, I.E. compiling it yourself your not gonna get a newer version.

I would like to dig into Thorium's compilation. If I directly pull all the source code in this repository to the local, and then compile Thorium against Chromium's official documentation, is this feasible? Or is there another way?

@Alex313031
Copy link
Owner

@gz83 Yeah for sure. There's quirks though, specific to Thorium and specific to what platform (linux, win, win-avx2, macos, raspberry pi), and you might run into snags even following the building section of the readme. I might make a wiki with more thorough instructions for every platform. It would still be best If I guide you. I'm pretty free and am on almost every platform. You just tell me when, and I'm down to sit down and guide you through.

Im on twitter as Alex313031, Reddit as Alex313031, facebook as Alex Frick with the thorium logo for my profile pic. Im also on IIRC, tumblr, email is Alex313031@gmail.com, I can call, facetime, or text. Theres other platforms im leaving out but basically no matter what you use there will be some way we can chat.

@gz83
Copy link
Collaborator Author

gz83 commented Apr 24, 2022

@gz83 Yeah for sure. There's quirks though, specific to Thorium and specific to what platform (linux, win, win-avx2, macos, raspberry pi), and you might run into snags even following the building section of the readme. I might make a wiki with more thorough instructions for every platform. It would still be best If I guide you. I'm pretty free and am on almost every platform. You just tell me when, and I'm down to sit down and guide you through.

Im on twitter as Alex313031, Reddit as Alex313031, facebook as Alex Frick with the thorium logo for my profile pic. Im also on IIRC, tumblr, email is Alex313031@gmail.com, I can call, facetime, or text. Theres other platforms im leaving out but basically no matter what you use there will be some way we can chat.

Thank you very much for your willingness to guide me. Since I am usually busy at work, developing software and compiling software are hobbies. I may not have time to learn to compile Thorium recently. When the time is sufficient, I will contact you through the above channels. Contact I'll include my GitHub username when you're there.

@Alex313031
Copy link
Owner

@gz83 In that case, and since I've been lazy about making said wiki, I'll start now by making a guide for you, and then just adding on to it for other platforms when I want to. What platform are you going to be compiling on, and what platform are you targeting.
Also, what are your specs i.e. cpu, ram, storage, OS version for the above question on what you would be compiling on.

@gz83
Copy link
Collaborator Author

gz83 commented Apr 25, 2022

@gz83 In that case, and since I've been lazy about making said wiki, I'll start now by making a guide for you, and then just adding on to it for other platforms when I want to. What platform are you going to be compiling on, and what platform are you targeting. Also, what are your specs i.e. cpu, ram, storage, OS version for the above question on what you would be compiling on.

I generally compile and use browsers including Thorium under Windows.
Also, I have two computers that I can use to compile and use, computer 1 is a desktop computer and computer 2 is a laptop.

Computer 1 Specifications
CPU: Intel i3-8100
RAM: Kingston 16G
Storage: Samsung 970EVO PLUS NVME solid state drive 256G capacity
OS: Windows 11 22000.613

Computer 2 Specifications
CPU: Intel i7-10710U
RAM: 16G
Storage: Samsung NVME solid state drive 512G capacity
OS: Windows 11 22598.200

@Alex313031
Copy link
Owner

Alex313031 commented Apr 25, 2022

@gz83 Ok youll def wanna use the laptop because of the 10710U and 512gb. Do you have at least 100Gb free?

Also, do you have visual studio installed?

And this is an example of quirks. I cross compile for windows on linux, although I've done a native compile. Compiling on windows requires visual studio, and while I'm working on some .bat in the "misc" folder in thorium, I dont have automated scripts like for linux and macos yet to do some of the stuff.

@gz83
Copy link
Collaborator Author

gz83 commented Apr 26, 2022

@gz83 Ok youll def wanna use the laptop because of the 10710U and 512gb. Do you have at least 100Gb free?

Also, do you have visual studio installed?

And this is an example of quirks. I cross compile for windows on linux, although I've done a native compile. Compiling on windows requires visual studio, and while I'm working on some .bat in the "misc" folder in thorium, I dont have automated scripts like for linux and macos yet to do some of the stuff.

I prefer to use a laptop to compile, and I have installed visual studio, and the hard disk capacity is sufficient.

@Alex313031
Copy link
Owner

@gz83 Ok cool ill write you up a tutorial.

@gz83
Copy link
Collaborator Author

gz83 commented Apr 27, 2022

@gz83 Ok cool ill write you up a tutorial.

Thanks Alex.

@Alex313031
Copy link
Owner

Alex313031 commented Apr 27, 2022

@gz83
Copy link
Collaborator Author

gz83 commented Apr 27, 2022

@gz83 Here you go > https://github.com/Alex313031/Thorium/blob/main/misc/WIN_INSTRUCTIONS

The content of the tutorial is very detailed, I will study it carefully in the future.

@Alex313031
Copy link
Owner

@gz83 Yeah I tried to be as concise as possible, and get rid of ambiguity and not take anything for granted (like assuming a user knows something even though you probably know some stuff in there, because who knows who will read it). I tried to model it after the official chromium documentation, basically being like, if you read the whole thing, and do the steps top to bottom, you will get a working build.

@gz83
Copy link
Collaborator Author

gz83 commented Apr 29, 2022

@gz83 Yeah I tried to be as concise as possible, and get rid of ambiguity and not take anything for granted (like assuming a user knows something even though you probably know some stuff in there, because who knows who will read it). I tried to model it after the official chromium documentation, basically being like, if you read the whole thing, and do the steps top to bottom, you will get a working build.

Alex, can I cross-compile Thorium for Windows under Debian? How to do it if possible?

@Alex313031
Copy link
Owner

Alex313031 commented Apr 29, 2022

@gz83 Yes, that's literally how I make all the windows and AVX2 releases. It's actually simpler. If you want I can make you a guide for that too!

And the scripts will work for Linux, so that automates some things like copying the source over the chromium tree. It's actually my preferred way to compile the windows releases, but I do sometimes do a native compile on my Win 10 drive for debugging, as I can make .pdb files that can be analyzed in Visual Studio.

On a sad note, my haswell motherboard died!!! So unfortunately, I wont be able to make AVX2 releases until I get a new board, or new system, as I am now using my older FX-8370, which only has AVX, and you can only compile for as high as the host system's processor supports. I am not ending this project by any means, I just simply physically cant compile them right now. As soon as I can I'll make a new release. Regular Windows, Linux, and MacOS releases will continue like normal though.

Also, how did you get interested in Chromium, and do you use Thorium on debian?

@gz83
Copy link
Collaborator Author

gz83 commented Apr 30, 2022

@gz83 Yes, that's literally how I make all the windows and AVX2 releases. It's actually simpler. If you want I can make you a guide for that too!

And the scripts will work for Linux, so that automates some things like copying the source over the chromium tree. It's actually my preferred way to compile the windows releases, but I do sometimes do a native compile on my Win 10 drive for debugging, as I can make .pdb files that can be analyzed in Visual Studio.

On a sad note, my haswell motherboard died!!! So unfortunately, I wont be able to make AVX2 releases until I get a new board, or new system, as I am now using my older FX-8370, which only has AVX, and you can only compile for as high as the host system's processor supports. I am not ending this project by any means, I just simply physically cant compile them right now. As soon as I can I'll make a new release. Regular Windows, Linux, and MacOS releases will continue like normal though.

Also, how did you get interested in Chromium, and do you use Thorium on debian?

Since I am learning C language and C++, I am also a loyal user of Chrome and Chromium, and the official release of Chromium lacks related components, which makes some functions unavailable, so I started to learn about Chromium compilation, and I also compared the official documents before. The compilation has been successful twice, which may be due to lack of experience. The compiled executable file has poor performance during use. For this reason, I am very distressed and have been looking for a solution.

Later, I saw the Chromium compiled and released by RobRich on the Internet, and continued to pay attention to it for a period of time. Until RobRich suspended the update due to health reasons, I learned about Thorium through the website woolyss, and I also met you in this project.

My current main operating system is Windows, and Thorium also runs on Windows. Regarding the Debian operating system, my Debian is currently only used on cloud servers and there is no graphical interface such as KDE and GNOME installed, so I have not installed and used Thorium on Debian for the time being. Let's talk about the cloud server I mentioned earlier. This cloud server is mostly idle. In order not to waste this cloud server, I want to use it to compile Thorium and learn some new knowledge by the way.

Looking forward to Alex's guidance, thank you very much.

@Alex313031
Copy link
Owner

Alex313031 commented Apr 30, 2022

@gz83 Made instructions for cross building side by side with the regular native windows instructions. >
https://github.com/Alex313031/Thorium/blob/main/misc/WIN_CROSS_BUILD_INSTRUCTIONS.txt

Native instructions > https://github.com/Alex313031/Thorium/blob/main/misc/WIN_INSTRUCTIONS.txt

And made new build_win.sh which I tagged you in. https://github.com/Alex313031/Thorium/blob/main/build_win.sh

Also, you will find a section regarding the API Keys. If you want to build with API Keys, let me know, and I'll give you access to my private repo with the API Keys used in Thorium.

Since you will be building on the cloud server, it will need at a minimum 4GB ram +4GB swap or 8GB+ ram, as well as at least 80GB free space, and 2+ core processor (the more the better!!)

@gz83
Copy link
Collaborator Author

gz83 commented Apr 30, 2022

@gz83 Made instructions for cross building side by side with the regular native windows instructions. > https://github.com/Alex313031/Thorium/blob/main/misc/WIN_CROSS_BUILD_INSTRUCTIONS.txt

Native instructions > https://github.com/Alex313031/Thorium/blob/main/misc/WIN_INSTRUCTIONS.txt

And made new build_win.sh which I tagged you in. https://github.com/Alex313031/Thorium/blob/main/build_win.sh

Also, you will find a section regarding the API Keys. If you want to build with API Keys, let me know, and I'll give you access to my private repo with the API Keys used in Thorium.

Since you will be building on the cloud server, it will need at a minimum 4GB ram +4GB swap or 8GB+ ram, as well as at least 80GB free space, and 2+ core processor (the more the better!!)

I have now started to build Thorium on the cloud server, and I would like to ask, can this API be generated by myself?

@gz83
Copy link
Collaborator Author

gz83 commented Apr 30, 2022

@gz83 Made instructions for cross building side by side with the regular native windows instructions. > https://github.com/Alex313031/Thorium/blob/main/misc/WIN_CROSS_BUILD_INSTRUCTIONS.txt

Native instructions > https://github.com/Alex313031/Thorium/blob/main/misc/WIN_INSTRUCTIONS.txt

And made new build_win.sh which I tagged you in. https://github.com/Alex313031/Thorium/blob/main/build_win.sh

Also, you will find a section regarding the API Keys. If you want to build with API Keys, let me know, and I'll give you access to my private repo with the API Keys used in Thorium.

Since you will be building on the cloud server, it will need at a minimum 4GB ram +4GB swap or 8GB+ ram, as well as at least 80GB free space, and 2+ core processor (the more the better!!)

Alex, I have a problem with the compilation process, when I run ./build_win.sh, the following error is returned, how should I solve this problem?

Building Thorium...

/root/depot_tools/ninja -C /root/chromium/src/out/thorium chrome chromedriver content_shell setup mini_installer -j4 -d stats
ninja: Entering directory `/root/chromium/src/out/thorium'
ninja: error: '../../third_party/zlib/fill_window_sse.c', needed by 'clang_x64/obj/third_party/zlib/zlib_x86_simd/fill_window_sse.o', missing and no known rule to make it
metric count avg (us) total (ms)
.ninja parse 6818 2888.6 19694.7
canonicalize str 7090982 0.2 1195.2
canonicalize path 7095148 0.1 681.4
lookup node 7095147 0.2 1467.5
.ninja_log load 1 60.0 0.1
.ninja_deps load 1 7.0 0.0
node stat 141742 4.4 621.4
depfile load 380 16.6 6.3

path->node hash load 0.61 (241586 entries / 393241 buckets)

@Alex313031
Copy link
Owner

Alex313031 commented Apr 30, 2022

@gz83 Did you make sure to add the target_os lines to .gclient, and to run ./setup.sh before building?

@gz83 EDIT: Its because they just changed a file Thorium uses upstream.....after not changing it since 2021/10/20, see > https://source.chromium.org/chromium/chromium/src/+/main:third_party/zlib/BUILD.gn;bpv=1

Perfect timing lol, right when someone new wants to build!!

I'll fix it.

2nd EDIT : FIXED! > Alex313031/thorium@3cef06b

You should be able to just copy that one file over the chromium tree after doing a git pull main in Thorium, and continue building as normal. Ninja is very good at resuming after a failure. You can also Ctrl + Z to pause or even Ctrl + C to stop it and resume compiling at a later time.

@gz83
Copy link
Collaborator Author

gz83 commented May 1, 2022

@gz83 Did you make sure to add the target_os lines to .gclient, and to run ./setup.sh before building?

@gz83 EDIT: Its because they just changed a file Thorium uses upstream.....after not changing it since 2021/10/20, see > https://source.chromium.org/chromium/chromium/src/+/main:third_party/zlib/BUILD.gn;bpv=1

Perfect timing lol, right when someone new wants to build!!

I'll fix it.

2nd EDIT : FIXED! > Alex313031/Thorium@3cef06b

You should be able to just copy that one file over the chromium tree after doing a git pull main in Thorium, and continue building as normal. Ninja is very good at resuming after a failure. You can also Ctrl + Z to pause or even Ctrl + C to stop it and resume compiling at a later time.

After modifying the file, the compilation can be started, but during the compilation process, the following error occurs again.

Then the compilation is interrupted, and the compilation can be continued by re-executing build_win.sh. After re-compiling and executing for a period of time, it will be interrupted due to the following error.

`../../chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc(369,18): error: use of undeclared identifier 'IDS_SETTINGS_MATH_FONT_LABEL'
{"mathFont", IDS_SETTINGS_MATH_FONT_LABEL},
^
../../chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc(395,16): error: no matching member function for call to 'AddLocalizedStrings'
html_source->AddLocalizedStrings(kLocalizedStrings);

../../content/public/browser/web_ui_data_source.h(76,16): note: candidate function not viable: cannot convert argument of incomplete type 'const webui::LocalizedString[]' to 'base::span< const webui::LocalizedString>' for 1st argument
virtual void AddLocalizedStrings(
             ^
../../content/public/browser/web_ui_data_source.h(80,16): note: candidate function not viable: cannot convert argument of incomplete type 'const webui::LocalizedString[]' to 'const base::Value ::Dict' for 1st argument
virtual void AddLocalizedStrings(
             ^`

@Alex313031
Copy link
Owner

Alex313031 commented May 1, 2022

@gz83 Just fixed that too. Since Thorium is based on tip-o-tree Chromium, stuff changes frequently, so I have to rebase it alot. I will upload a bookmarks html file that can be imported into any browser, it contains all of the files thorium uses, in alphabetical order, on source.chromium.org, and also has history to show by default. Thats how I rebase Thorium, I just open them all, and look at each tab and see in the git history if anythings changed since last time I rebased, then I can just see the diff and copy/paste changes. If I want to change something in Thorium itself, or the changes are extensive and would take alot of copy/pasting, I instead copy/paste the whole thing and rewrite it from scratch. I have links in the PATCHES.md file where patches come from, and I have info in the BUILDER file for patches I made myself.

Im gonna upload this thorium_devel_bookmarks.html file because it will allow other people to rebase Thorium even if Im not available, and will ease Thorium development from other people if they ever wanna help.

Anyway, it should compile for you now, just replace this file > Alex313031/thorium@1131e22

@Alex313031
Copy link
Owner

@Alex313031 Alex313031 changed the title Thorium problem feedback Thorium Building Discussion May 1, 2022
@gz83
Copy link
Collaborator Author

gz83 commented May 1, 2022

@gz83 See also the readme for Thorium Infra > https://github.com/Alex313031/Thorium/blob/main/misc/README.md

And just uploaded the html file. > https://github.com/Alex313031/Thorium/blob/main/misc/thorium_devel_bookmarks.html

Now the compilation is almost over, but the progress is stuck in STAMP obj/chromedriver.stamp for a long time.

@Alex313031
Copy link
Owner

@gz83 That's normal.

@gz83
Copy link
Collaborator Author

gz83 commented May 1, 2022

@gz83 That's normal.

I have successfully compiled mini_installer.exe and downloaded it locally from the cloud server. In addition, I compiled the AVX2 version, how should I judge whether the compilation is correct?

@Alex313031
Copy link
Owner

@gz83 What do you mean? If it runs, it compiled correctly lol. If you mean discerning the AVX vs AVX2 versions, the AVX2 version will have a slightly larger size.

@Alex313031
Copy link
Owner

Alex313031 commented May 3, 2022

And about the API Keys. Currently, unless you have official google chrome api keys, then to sign in to google sync (other features like translate will work without doing this), you have to add yourself to https://groups.google.com/u/1/a/chromium.org/g/google-browser-signin-testaccounts

This is per this section in the api keys document. > https://www.chromium.org/developers/how-tos/api-keys/#signing-in-to-chromium-is-restricted

Its annoying because I get bug issues all the time with people saying sync isnt working. Ive posted about the above stuff in releases multiple times and might start doing it again. I personally don't use sync except on ChromiumOS/ChromeOS, but realize it is something people want in a Chromium release, hence the "sync" tag on woolyss.com

And yeah I'm not just dissatisfied, I am thoroughly pissed off. And I'm not alone. There was a howl of complaint from Chromium Devs, as well as Linux distro maintainers, with some (Like Fedora and Arch) even considering removing their Chromium packages from their repositories because of this move. It's ironic because google was fine with it for over a decade, and even specifically assigned API Keys for Arch and Debian (and probably others). It's like they really want people to use Chrome. Of course this is nothing new, as the Chromium Project is kinda hidden out of public view, and people outside the FOSS/Linux space rarely know what the heck it is, even though it powers:

Microsoft edge (even though edge made fun of chrome in one of their advertisement campaigns, like aww are you butthurt that internet explorer AND legacy edge failed to gain any market share, and then finally conceded that Chromium was king?)
Vivaldi, Opera, Beaker, Steam, Electron, Atom, Twitch, Discord, Brave, Samsung Browser, DuckDuckGo Browser, IntelliJ, Zoom, Torch Browser, Cent Browser, Iridium, Vanadium, Amazon Silk Browser,Thorium, and others.

@Alex313031
Copy link
Owner

Alex313031 commented May 3, 2022

@midzer I think I made a new friend lol. @gz83 And like we were talking about perhaps he can help with the AVX2 builds since my haswell board decided to go the way of the DoDo bird. Was missing these kind of discussions after @RobRich999 stopped Chromium builds. I hope he's okay. If he sees this hope he lets us know.

@gz83
Copy link
Collaborator Author

gz83 commented May 3, 2022

@midzer I think I made a new friend lol. @gz83 And like we were talking about perhaps he can help with the AVX2 builds since my haswell board decided to go the way of the DoDo bird. Was missing these kind of discussions after @RobRich999 stopped Chromium builds. I hope he's okay. If he sees this hope he lets us know.

I can help build AVX/AVX2 versions for Linux/Windows, and I'll be willing to give Thorium time and effort as long as you accept me.

@Alex313031
Copy link
Owner

Alex313031 commented May 3, 2022

@gz83 I haven't made any public AVX2 Linux releases, although I did make some personal haswell only releases before the haswell boards death. BUT they seemed popular when RobRich999 made them. So maybe I'll make a Thorium-Linux-AVX2 repo or something. I should have named this one Thorium-Win-AVX2 to match Thorium-Win, instead of Thorium-AVX2, but I wasn't thinking ahead, and assumed I would only make AVX2 releases for Windows.

Also, If you happen to have a raspberry pi 3b/3b+/4/400 I make ARM64 releases in thorium-special for it.

@gz83
Copy link
Collaborator Author

gz83 commented May 3, 2022

@gz83 I haven't made any public AVX2 Linux releases, although I did make some personal haswell only releases before the haswell boards death. BUT they seemed popular when RobRich999 made them. So maybe I'll make a Thorium-Linux-AVX2 repo or something. I should have named this one Thorium-Win-AVX2 to match Thorium-Win, instead of Thorium-AVX2, but I wasn't thinking ahead, and assumed I would only make AVX2 releases for Windows.

Also, If you happen to have a raspberry pi 3b/3b+/4/400 I make ARM64 releases in thorium-special for it.

I originally owned a raspberry pi, but I sold it to someone on the second hand market a few years ago.

@Alex313031
Copy link
Owner

Alex313031 commented May 3, 2022

@gz83 Regarding the above comment about wanting official api keys, Im thinking of doing a decompile of official chrome and grepping the results for "api_key"

And oh, do you remember what model it was?
Also, right now Im building a vanilla chromium release to do a side by side comparison (I've already done that and published results on my blog > https://alex313031.blogspot.com/ but I wanna be able to post side by side screenshots in the thorium repo for people to see.

@gz83
Copy link
Collaborator Author

gz83 commented May 3, 2022

@gz83 Regarding the above comment about wanting official api keys, Im thinking of doing a decompile of official chrome and grepping the results for "api_key"

How long will this process take?

By the way, how is the 5039 version I sent you running on your computer, is it normal?

@Alex313031
Copy link
Owner

Alex313031 commented May 3, 2022

@gz83 Assuming it even works (Thorium and official chrome have the gn args is_debug=false and symbol_level=0, so it might not be able to decompile, or even if it does, not contain stack trace information to get individual lines like that.) IDK i've never done a chrom(ium) decompile before lol. And I haven't been able to test it. Im not on my windows 7 or 10 drive right now, and im on my ubuntu 22.04 drive rather than my normal crunchbangplusplus (minimalist openbox debian based distro > https://crunchbangplusplus.org/) which has my windows VMs I use for thorium testing.

Also, I edited above comment.

@gz83
Copy link
Collaborator Author

gz83 commented May 3, 2022

@gz83 Assuming it even works (Thorium and official chrome have the gn args is_debug=false and symbol_level=0, so it might not be able to decompile, or even if it does, not contain stack trace information to get individual lines like that.) IDK i've never done a chrom(ium) decompile before lol. And I haven't been able to test it. Im not on my windows 7 or 10 drive right now, and im on my ubuntu 22.04 drive rather than my normal crunchbangplusplus (minimalist openbox debian based distro > https://crunchbangplusplus.org/) which has my windows VMs I use for thorium testing.

Also, I edited above comment.

It is raspberry pi 3b. Also, I am reading the article in your blog.

@gz83
Copy link
Collaborator Author

gz83 commented May 3, 2022

@gz83 Assuming it even works (Thorium and official chrome have the gn args is_debug=false and symbol_level=0, so it might not be able to decompile, or even if it does, not contain stack trace information to get individual lines like that.) IDK i've never done a chrom(ium) decompile before lol. And I haven't been able to test it. Im not on my windows 7 or 10 drive right now, and im on my ubuntu 22.04 drive rather than my normal crunchbangplusplus (minimalist openbox debian based distro > https://crunchbangplusplus.org/) which has my windows VMs I use for thorium testing.

Also, I edited above comment.

Alex, I suddenly thought of a question, when the source code of Chromium and Thorium is updated, how should I sync it to my server for subsequent version updates? Is it possible to synchronize the source code update by directly running the command in the last part of the cross-compilation tutorial you wrote?

@Alex313031
Copy link
Owner

@gz83 Chromium can be updated by runnin a ./trunk.sh, and Thorium can be updated like any other git repo, or by downloading the latest .zip

@gz83
Copy link
Collaborator Author

gz83 commented May 4, 2022

@gz83 Chromium can be updated by runnin a ./trunk.sh, and Thorium can be updated like any other git repo, or by downloading the latest .zip

I understand, I will compile a new version later.

@gz83
Copy link
Collaborator Author

gz83 commented May 4, 2022

@gz83 Chromium can be updated by runnin a ./trunk.sh, and Thorium can be updated like any other git repo, or by downloading the latest .zip

Sorry, I forgot a question.

After I run trunk.sh to update the Chromium source, do I still need to run setup.sh?

@Alex313031
Copy link
Owner

@gz83 Yes. Trunk.sh just updates the chromium source. Setup.sh is what copies all of the files from thorium over the chromium tree, and then downloads the pgo profile for all the platforms.

So you should update the thorium repo, then run trunk.sh, then run setup.sh. BTW I just rebased the whole thorium tree so now would be a good time to build. If you make an avx2 release remember to use the build dir from this repo and manually copy it over //chromium/src/build, and to use the api keys in the repo i added you to at the top of your args.gn, and of course remember the pgo profile needs to be set every time you build since it changes with every revision.

@gz83
Copy link
Collaborator Author

gz83 commented May 5, 2022

@gz83 Yes. Trunk.sh just updates the chromium source. Setup.sh is what copies all of the files from thorium over the chromium tree, and then downloads the pgo profile for all the platforms.

So you should update the thorium repo, then run trunk.sh, then run setup.sh. BTW I just rebased the whole thorium tree so now would be a good time to build. If you make an avx2 release remember to use the build dir from this repo and manually copy it over //chromium/src/build, and to use the api keys in the repo i added you to at the top of your args.gn, and of course remember the pgo profile needs to be set every time you build since it changes with every revision.

Okay, I understand.

I'm now syncing the latest changes.

After synchronizing, I run trunk.sh and it prompts Cannot rebase-update with detached head + uncommitted changes error.

@gz83
Copy link
Collaborator Author

gz83 commented May 5, 2022

@gz83 Yes. Trunk.sh just updates the chromium source. Setup.sh is what copies all of the files from thorium over the chromium tree, and then downloads the pgo profile for all the platforms.

So you should update the thorium repo, then run trunk.sh, then run setup.sh. BTW I just rebased the whole thorium tree so now would be a good time to build. If you make an avx2 release remember to use the build dir from this repo and manually copy it over //chromium/src/build, and to use the api keys in the repo i added you to at the top of your args.gn, and of course remember the pgo profile needs to be set every time you build since it changes with every revision.

Report a few issues

../../third_party/zlib/contrib/minizip/ioapi.c(224,6): error: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror ,-Wdeprecated-non-prototype]
void fill_fopen_filefunc (pzlib_filefunc_def)
^

image

../../media/base/media_switches.cc(487,21): error: unused variable 'kSurfaceLayerForMediaStreams' [-Werror,-Wunused-const-variable]
const base::Feature kSurfaceLayerForMediaStreams{
^

The above code should be deleted.By the way, I found this file in Thorium's repository, and I submitted a Pull requests to remove the code that prevents compilation, please review.

The compilation can continue after manually modifying the Chromium source code, please note the above issues.

@Alex313031
Copy link
Owner

@gz83 Okay fixed those files. Also, did you fix the rebase error? It shouldnt do that. Ive had that happen when a file was in thorium that wasnt in chromium.

@gz83
Copy link
Collaborator Author

gz83 commented May 5, 2022

@gz83 Okay fixed those files. Also, did you fix the rebase error? It shouldnt do that. Ive had that happen when a file was in thorium that wasnt in chromium.

The rebase error has not been fixed, I am now compiling Thorium on another server.

@gz83
Copy link
Collaborator Author

gz83 commented May 5, 2022

@gz83 Okay fixed those files. Also, did you fix the rebase error? It shouldnt do that. Ive had that happen when a file was in thorium that wasnt in chromium.

Regarding the first issue above, if I modify the source code like this, will it not destroy the function of the browser?

image

@Alex313031
Copy link
Owner

@gz83 I fixed that. It was the zlib build.gn.

And thats weird, I would say maybe try redownloading the chromium and thoriums oruce tree and starting from scratch.

Also, check out what Ive been working on today. A simple little extension for thorium, makes the scrollbars look nice.

https://github.com/Alex313031/Thorium_ScrollBars

@gz83
Copy link
Collaborator Author

gz83 commented May 5, 2022

@gz83 I fixed that. It was the zlib build.gn.

And thats weird, I would say maybe try redownloading the chromium and thoriums oruce tree and starting from scratch.

Also, check out what Ive been working on today. A simple little extension for thorium, makes the scrollbars look nice.

https://github.com/Alex313031/Thorium_ScrollBars

I saw the changes in zlib. Thank you for your work. I have searched for rebase errors on the Internet, but I haven't found a solution yet. I personally feel that solving rebase errors is better than starting from scratch, which can save at least some time and resources.

Your new project is very good. I'll try to install it.

@gz83
Copy link
Collaborator Author

gz83 commented May 6, 2022

@gz83 I fixed that. It was the zlib build.gn.

And thats weird, I would say maybe try redownloading the chromium and thoriums oruce tree and starting from scratch.

Also, check out what Ive been working on today. A simple little extension for thorium, makes the scrollbars look nice.

https://github.com/Alex313031/Thorium_ScrollBars

Version 5045 opened the history page back to normal, but the settings search still crashed, and also required opening the browser in compatibility mode.

In addition, I started a new compilation on another server, and the following error occurred during compilation.

FAILED: gen/chrome/browser/metrics/variations/ui_string_overrider_factory.h gen/chrome/browser/metrics/variations/ui_string_overrider_factory.cc
python3 ../../components/variations/service/generate_ui_string_overrider.py -Nchrome_variations -ogen -Hchrome/browser/metrics/variations/ui_string_overrider_factory.h -Schrome/browser/metrics/variations/ui_string_overrider_factory.cc gen/chrome/grit/ chromium_strings.h gen/chrome/grit/generated_resources.h gen/chrome/grit/google_chrome_strings.h gen/components/strings/grit/components_chromium_strings.h gen/components/strings/grit/components_google_chrome_strings.h gen/components/strings/grit /components_strings.h
Traceback (most recent call last):
File "/root/chromium/src/out/thorium/../../components/variations/service/generate_ui_string_overrider.py", line 307, in
sys.exit(main())
File "/root/chromium/src/out/thorium/../../components/variations/service/generate_ui_string_overrider.py", line 293, in main
source_file_content = _GenerateSourceFileContent(
File "/root/chromium/src/out/thorium/../../components/variations/service/generate_ui_string_overrider.py", line 181, in _GenerateSourceFileContent
raise HashCollisionError(error_message)
main.HashCollisionError:

It is followed by a bunch of information starting with IDS.

@Alex313031
Copy link
Owner

Alex313031 commented May 6, 2022

@gz83 Thats the most common error. Those IDS errors are related to the .grdp files in thorium, which store strings and are used for branding, i.e. they are identicle to the chromium ones except instances of "chromium" are replaced with Thorium. I'll fix it right now.
Again, because Thorium is based on tip of tree stuff changes alot. Often if I havent built in a couple days I have to rebase stuff, and sometimes more often, as can be seen today since I've had to update multiple files. How about we exchange some socials, that way you can get ahold of me easier. Thats how me and @midzer do it, he'll just text or facetime me and say "hey about to do a thorium rebuild can you do a rebase" Im almost always on my computer and even if not, im usually at home and my computer is in my bedroom, so its usually no big deal for me to just check and make sure no files have been updated whenever you do a build. I have pretty much everything, we could text, call, facetime, I've got reddit, facebook, twitter, tumblr, instagram, snapchat, IIRC, etc.

Also, so this is an AVX2 release, and you used the Thorium api keys? If so, send it via wormhole or something and I'll publish it with you in the tag

@gz83
Copy link
Collaborator Author

gz83 commented May 6, 2022

@gz83 Thats the most common error. Those IDS errors are related to the .grdp files in thorium, which store strings and are used for branding, i.e. they are identicle to the chromium ones except instances of "chromium" are replaced with Thorium. I'll fix it right now. Again, because Thorium is based on tip of tree stuff changes alot. Often if I havent built in a couple days I have to rebase stuff, and sometimes more often, as can be seen today since I've had to update multiple files. How about we exchange some socials, that way you can get ahold of me easier. Thats how me and @midzer do it, he'll just text or facetime me and say "hey about to do a thorium rebuild can you do a rebase" Im almost always on my computer and even if not, im usually at home and my computer is in my bedroom, so its usually no big deal for me to just check and make sure no files have been updated whenever you do a build. I have pretty much everything, we could text, call, facetime, I've got reddit, facebook, twitter, tumblr, instagram, snapchat, IIRC, etc.

Also, so this is an AVX2 release, and you used the Thorium api keys? If so, send it via wormhole or something and I'll publish it with you in the tag

I have uploaded the 5045 version in wormhole, there are mini_installer and portable version, the API information used in this version is provided to me by you, and other content has not been modified. The link to wormhole is: https://wormhole.app/Lrnyz#xrFbR0Cl12fB583J0hq54Q

I can exchange twitter contacts with you, my twitter link is https://twitter.com/ . Also, I'm currently following you on twitter.

@Alex313031
Copy link
Owner

@gz83 Hey thanks! That really helps! You named them all correctly, and did the portable zip all correctly, great work, made it easy for me lol. I will publish and add you to the thorium repo. And I told @midzer this too so dont feel like im picking on you, maybe Im just a control freak lol, but please DO NOT make changes to the thorium repo directly. Make an issue, add to the discussions, or make a pull request.

@Alex313031
Copy link
Owner

@gz83 Made the release >> https://github.com/Alex313031/Thorium-AVX2/releases/tag/M103.0.5045.0 and mentioned you at the top. Also, I'm going to move this discussion to the main thorium discussions in the main repo.

@gz83
Copy link
Collaborator Author

gz83 commented May 7, 2022

@gz83 Hey thanks! That really helps! You named them all correctly, and did the portable zip all correctly, great work, made it easy for me lol. I will publish and add you to the thorium repo. And I told @midzer this too so dont feel like im picking on you, maybe Im just a control freak lol, but please DO NOT make changes to the thorium repo directly. Make an issue, add to the discussions, or make a pull request.

I am very happy to be able to join your team. I will continue to contribute to Thorium in the future. At the same time, I will also abide by the rules you have set. I wish Thorium better and better.

@gz83
Copy link
Collaborator Author

gz83 commented May 7, 2022

@gz83 Made the release >> https://github.com/Alex313031/Thorium-AVX2/releases/tag/M103.0.5045.0 and mentioned you at the top. Also, I'm going to move this discussion to the main thorium discussions in the main repo.

Okay, I know.

@Alex313031
Copy link
Owner

@gz83 Closing this now. Will continue it in the main repo discussions. Will also make a new discussions here too, to be used only for things that are Win AVX2 specific.

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

No branches or pull requests

2 participants