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

rebranding does not work #230

Closed
LeOS-GSI opened this issue Oct 2, 2023 · 44 comments
Closed

rebranding does not work #230

LeOS-GSI opened this issue Oct 2, 2023 · 44 comments

Comments

@LeOS-GSI
Copy link

LeOS-GSI commented Oct 2, 2023

System Details

  • OS: [Mint 22 - Android Build]
  • Thorium Version latest

Problem
you are writing 'chromium' and 'thorium' folder has to be located in HOME. I can't build in HOME folder because of less space. The sources are located on external SSD. So I have set in build_android.sh the HOME value to HOME='/media/ich/exSSD3',
so my folder structure is

/media/ich/exSSD3/chromium
/media/ich/exSSD3/thorium

The builds is finishing successful, but no rebranding (all are still 'Chromium' labled and Chromeium icons are used)

So, what's wrong ? Why no rebranding and I thing none of the files in thorium folder is used.

@gz83
Copy link
Collaborator

gz83 commented Oct 2, 2023

Have you checked the compilation instructions in the docs directory? It looks like you didn't successfully apply the required files to Thorium.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

Yes, I have done, but I haven't seen any appling files

@gz83
Copy link
Collaborator

gz83 commented Oct 2, 2023

Run setup.sh --help you will get more help

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

OK, I have checked. I'm using the complete instructions of the building.md. That's why I know, that all sources should be in HOME folder

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

Yes, I have done, but I haven't seen any appling files

OK, but now I'm getting a lot of compiler errors. like:
ninja: Entering directory out/thorium'
[1 processes, 0/1 @ 0.0/s : 0.176s ] Regenerating ninja files
ERROR at //build/config/compiler/BUILD.gn:2462:16: Undefined identifier
} else if (optimize_for_fuzzing) {
^-------------------
See //build/config/BUILDCONFIG.gn:347:3: which caused the file to be included.
"//build/config/compiler:no_rtti",
^--------------------------------
FAILED: build.ninja.stamp`

@gz83
Copy link
Collaborator

gz83 commented Oct 2, 2023

Did you get the full chromium code checkout? Also, which chromium branch are you currently switching to?

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

Did you get the full chromium code checkout

yes

Did you get the full chromium code checkout?
yes

Also, which chromium branch are you currently switching to
119.0.6042.0

It's what used automatically when running all points of building.md

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

as I can see , the setup.sh --android is running into this issue:
cp: unable to call stat for 'thorium-l/src/.': file or directory not found

all other files are copied

@gz83
Copy link
Collaborator

gz83 commented Oct 2, 2023

Thorium is built on the chromium stable branch, and you need to reprocess the code checkout according to the compilation guidelines.

Using the version.sh script will help you switch to the correct branch, but there is still an issue where the version.sh script was updated a few days ago and the Thorium repo is not currently updated to branch 117, you will need to manually roll back the latest commit in the version.sh script.

By the way, you also need to successfully introduce the libjxl submodule and the associated code before compiling.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

By the way, you also need to successfully introduce the libjxl submodule and the associated code before compiling.

yes, I have just seen, that folder is empty in my sources

@gz83
Copy link
Collaborator

gz83 commented Oct 2, 2023

as I can see , the setup.sh --android is running into this issue: cp: unable to call stat for 'thorium-l/src/.': file or directory not found

all other files are copied

Your code checkout path and Thorium repo storage path are not correct, you need to refer to the command inside the sh script to change the path again.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

and by the way, it would be nice, if these steps

  • setup.sh
  • version.sh
    will be included in building.md

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

Your code checkout path and Thorium repo storage path are not correct, you need to refer to the command inside the sh script to change the path again.

all done, but as I have written above, the folder is empty in my local sources. It was not synced

@gz83
Copy link
Collaborator

gz83 commented Oct 2, 2023

The approximate steps to compile Thorium are:

  1. Clone the Thorium repository and its submodules using the git clone --recursive command. Clone the complete Chromium code and synchronize and install the required dependencies.

  2. Use the version.sh script to switch chromium branches, and the setup.sh script to copy the files needed by Thorium.

  3. Pass in the args parameter and build using the build.sh script.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 2, 2023

OK, thx, I will restart

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023

The approximate steps to compile Thorium are:

1. Clone the Thorium repository and its submodules using the git clone --recursive command. Clone the complete Chromium code and synchronize and install the required dependencies.

2. Use the version.sh script to switch chromium branches, and the setup.sh script to copy the files needed by Thorium.

3. Pass in the args parameter and build using the build.sh script.

I have start from beginning on. All fresh synced.
THOR_VER="116.0.5845.234"
using arm64 args.gn
But when generating scripts I'm getting this errors:

ich@ich:/media/ich/exSSD3/chromium/src$ gn args out/leosium Waiting for editor on "/media/ich/exSSD3/chromium/src/out/leosium/args.gn"... Generating files... ERROR at //build/config/compiler/BUILD.gn:186:15: Duplicate build argument declaration. use_cxx17 = false ^---- Here you're declaring an argument that was already declared elsewhere. You can only declare each argument once in the entire build so there is one canonical place for documentation and the default value. Either move this argument to the build config file (for visibility everywhere) or to a .gni file that you "import" from the files where you need it (preferred). See //build_overrides/build.gni:61:15: Previous declaration. use_cxx17 = false ^---- See also "gn help buildargs" for more on how build arguments work. See //build/config/BUILDCONFIG.gn:336:3: which caused the file to be included. "//build/config/compiler:chromium_code", ^-------------------------------------- ich@ich:/media/ich/exSSD3/chromium/src$ gn args out/leosium Waiting for editor on "/media/ich/exSSD3/chromium/src/out/leosium/args.gn"... Generating files... ERROR at //build/config/compiler/BUILD.gn:186:15: Duplicate build argument declaration. use_cxx17 = false ^---- Here you're declaring an argument that was already declared elsewhere. You can only declare each argument once in the entire build so there is one canonical place for documentation and the default value. Either move this argument to the build config file (for visibility everywhere) or to a .gni file that you "import" from the files where you need it (preferred). See //build_overrides/build.gni:61:15: Previous declaration. use_cxx17 = false ^---- See also "gn help buildargs" for more on how build arguments work. See //build/config/BUILDCONFIG.gn:336:3: which caused the file to be included. "//build/config/compiler:chromium_code", ^-------------------------------------- ich@ich:/media/ich/exSSD3/chromium/src$

so what's now wrong or missing ??

@gz83
Copy link
Collaborator

gz83 commented Oct 3, 2023

The approximate steps to compile Thorium are:

1. Clone the Thorium repository and its submodules using the git clone --recursive command. Clone the complete Chromium code and synchronize and install the required dependencies.

2. Use the version.sh script to switch chromium branches, and the setup.sh script to copy the files needed by Thorium.

3. Pass in the args parameter and build using the build.sh script.

I have start from beginning on. All fresh synced. THOR_VER="116.0.5845.234" using arm64 args.gn But when generating scripts I'm getting this errors:

ich@ich:/media/ich/exSSD3/chromium/src$ gn args out/leosium Waiting for editor on "/media/ich/exSSD3/chromium/src/out/leosium/args.gn"... Generating files... ERROR at //build/config/compiler/BUILD.gn:186:15: Duplicate build argument declaration. use_cxx17 = false ^---- Here you're declaring an argument that was already declared elsewhere. You can only declare each argument once in the entire build so there is one canonical place for documentation and the default value. Either move this argument to the build config file (for visibility everywhere) or to a .gni file that you "import" from the files where you need it (preferred). See //build_overrides/build.gni:61:15: Previous declaration. use_cxx17 = false ^---- See also "gn help buildargs" for more on how build arguments work. See //build/config/BUILDCONFIG.gn:336:3: which caused the file to be included. "//build/config/compiler:chromium_code", ^-------------------------------------- ich@ich:/media/ich/exSSD3/chromium/src$ gn args out/leosium Waiting for editor on "/media/ich/exSSD3/chromium/src/out/leosium/args.gn"... Generating files... ERROR at //build/config/compiler/BUILD.gn:186:15: Duplicate build argument declaration. use_cxx17 = false ^---- Here you're declaring an argument that was already declared elsewhere. You can only declare each argument once in the entire build so there is one canonical place for documentation and the default value. Either move this argument to the build config file (for visibility everywhere) or to a .gni file that you "import" from the files where you need it (preferred). See //build_overrides/build.gni:61:15: Previous declaration. use_cxx17 = false ^---- See also "gn help buildargs" for more on how build arguments work. See //build/config/BUILDCONFIG.gn:336:3: which caused the file to be included. "//build/config/compiler:chromium_code", ^-------------------------------------- ich@ich:/media/ich/exSSD3/chromium/src$

so what's now wrong or missing ??

Execute git status and git log in the Chromium code checkout, and upload the output information of these two commands here.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023

I have started once more.
`gclient --no-history

in thorium folder

./version.sh
./setup.sh --android

in chromium folder

cd src
`gn args out/leosium``

Every time I'm running the last command, I'm getting different error messages. I'm changing nothing. only running gn args out/leosium
I really don't understand why. I'm building since month with Mulch webview and never getting these kind of errors. If I#m running there the args command 10 times, it will be always the same output. But now, it's always different.

attched example of args errors / and the git logs
args-error.txt
git-log.txt
git-status.txt

Sorry, the outputs are in german :/

@gz83
Copy link
Collaborator

gz83 commented Oct 3, 2023

You need to get the full Chromium code checkout (with full history, dependencies)

Also, you should not run gn args out/leosium, but gn args out/thorium, because setup.sh automatically creates the out/thorium directory (the new out/thorium directory will contain some of the files needed for thorium and is a temporary measure to fix a compilation error).

In the meantime, I took a look at the files you provided and realized that you still haven't switched to the chromium branch that thorium currently requires, so you'll need to redo that with reference to the build guidelines and what I mentioned in my previous reply.

@LeOS-GSI

@gz83
Copy link
Collaborator

gz83 commented Oct 3, 2023

The complete steps (for Android version) should be:

  1. set environment variables (fill in .bashrc)

umask 022
export EDITOR=nano
export VISUAL=nano
export NINJA_SUMMARIZE_BUILD=1
export PATH=/home/leosium/depot_tools:$PATH

  1. Get the depot_tools, the full Chromium source code (with full history, dependencies), and the full thorium repo (with libjxl submodule) in the user directory (e.g., if the current username is leosium, the user directory is /home/leosium)

git clone --recursive https://github.com/Alex313031/thorium.git &&
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git &&
mkdir chromium && cd chromium &&
fetch chromium

Executing the fetch chromium command automatically configures the correct Chromium native code checkout, and you must ensure that all commands are executed successfully.

  1. Install the required dependencies for compilation.

cd ~/chromium/src && . /build/install-build-deps.sh --android

  1. Add new content to the .gclient file

cd ~/chromium && nano .gclient

Add android in target_os =, e.g. target_os = [ 'linux', 'win', 'android' ]

  1. run gclient sync && gclient runhooks to pull Android dependencies

cd ~/chromium/src && gclient sync && gclient runhooks

  1. Go to your local thorium repo and run a series of scripts

cd ~/thorium && nano version.sh

Change 117.0.5938.144 to 116.0.5845.169 and save it.

Then run . /trunk.sh && . /version.sh && . /setup.sh --android

  1. Generate the compilation target

cd ~/chromium/src && gn args out/thorium

Fill in the args parameters you need and make sure the build target is generated successfully.

8.Run the build script to build the target.

cd ~/thorium && . /build_android.sh 24

24 is the actual number of threads in the CPU, adjust it according to your own machine configuration.

In addition, build_android.sh contains help information, run build_android.sh --help to see.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023

Ok, I have done all the points several times.
Only point 4 I never have used in all the time I'm building chromium browsers or webview. And I'm doing it since several month.

But OK, when I'm back home, I will try once more.

But I still don't understand why I'm always getting different outputs for the args scripts

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023

Add android in target_os =, e.g. target_os = [ 'linux', 'win', 'android' ]

OK I have checked. My .gclient is only using android
` {
"name": "src",
"url": "https://chromium.googlesource.com/chromium/src.git",
"managed": False,
"custom_deps": {},
"custom_vars": {},
},
]
target_os = ["android"]

`
so that could not be the issue

@gz83
Copy link
Collaborator

gz83 commented Oct 3, 2023

I suggest you follow the steps I gave above to redo code pulling and other operations.

Also, from your description, it looks like there should be no problem with your .gclient file.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023

OK; I give up. I have deleted all 'old' folders and restarted. Used step by step from your above post. but at the end I'm getting this error:


ich@ich:/media/ich/exSSD3/chromium/src$ gn args out/thorium
Waiting for editor on "/media/ich/exSSD3/chromium/src/out/thorium/args.gn"...
Generating files...
ERROR at //skia/BUILD.gn:646:18: Undefined identifier
      sources += skia_pdf_jpeginfo_lib
                 ^--------------------
See //BUILD.gn:114:7: which caused the file to be included.
      "//skia:skia_unittests",
      ^----------------------

In the last 2 days I have downloaded around 500gb chromium and Thorium sources. And I never get it running.
Could be that the root cause is something because I'm building on external SSD. But I think I have changed all scripts where $HOME or ~ used to point on the right folders.

So I will search for an other FOSS chromium build with working tutorial

@Alex313031
Copy link
Owner

@LeOS-GSI One thing, I recently added to all the build scripts is to change the location of the chromium repo, to solve exactly the problem you are describing.

Notice

# chromium/src dir env variable

it defaults to $HOME/chromium/src

However, if you set the CR_DIR variable in your .bashrc to the absolute path of someplace else, it will work.

The thorium repo must be cloned in $HOME, but it is not that large. For example, I build on an external SSD. SO in my bashrc i have
`export CR_DIR="/media/alex/SSD01/chromium/src"

@gz83
Copy link
Collaborator

gz83 commented Oct 3, 2023

I think you didn't do something right in some steps, or the code is not in the right place.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023

@LeOS-GSI One thing, I recently added to all the build scripts is to change the location of the chromium repo, to solve exactly the problem you are describing.

Notice

# chromium/src dir env variable

it defaults to $HOME/chromium/src

However, if you set the CR_DIR variable in your .bashrc to the absolute path of someplace else, it will work.

The thorium repo must be cloned in $HOME, but it is not that large. For example, I build on an external SSD. SO in my bashrc i have `export CR_DIR="/media/alex/SSD01/chromium/src"

OK, I have tried it once more with your all you have written. But nothing changed, same error:

ich@ich:/media/ich/exSSD3/chromium/src$ gn args out/thorium Waiting for editor on "/media/ich/exSSD3/chromium/src/out/thorium/args.gn"... Generating files... ERROR at //skia/BUILD.gn:646:18: Undefined identifier sources += skia_pdf_jpeginfo_lib ^-------------------- See //BUILD.gn:114:7: which caused the file to be included. "//skia:skia_unittests", ^----------------------

@gz83
Copy link
Collaborator

gz83 commented Oct 3, 2023

Run git log in your local chromium code checkout and paste the output directly here

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023 via email

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 3, 2023

Run git log in your local chromium code checkout and paste the output directly here

@LeOS-GSI

sorry, but when running git log in chromium/src I'm getting a 1,4 GB txt file
GitStatus.txt

@gz83
Copy link
Collaborator

gz83 commented Oct 4, 2023

I only need the top one among the contents output by the git log command, and the others are not needed.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 4, 2023 via email

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 4, 2023

OK, I will stop for now. Android 14 sources will be available today and I hav3 to build A14 GSI. SO no time left for browser building.

If needed, I will come back here

@LeOS-GSI LeOS-GSI closed this as completed Oct 4, 2023
@gz83
Copy link
Collaborator

gz83 commented Oct 4, 2023

image

Or you can use a screenshot to upload the output of the git log, like the image above.

@LeOS-GSI

@gz83 gz83 reopened this Oct 4, 2023
@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 4, 2023

OK, I have deleted all related folders and have run to 100% all your above points. and ... ... same as before:
`
ich@ich:/media/ich/exSSD3/chromium/src$ gn args out/thorium
Waiting for editor on "/media/ich/exSSD3/chromium/src/out/thorium/args.gn"...
Generating files...
ERROR at //skia/BUILD.gn:646:18: Undefined identifier
sources += skia_pdf_jpeginfo_lib
^--------------------
See //BUILD.gn:114:7: which caused the file to be included.
"//skia:skia_unittests",
^----------------------
ich@ich:/media/ich/exSSD3/chromium/src$

`

git_log

@gz83
Copy link
Collaborator

gz83 commented Oct 4, 2023

Run the git status command and upload a screenshot here, also, please upload the args parameter you are currently using.

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 4, 2023

status.txt

https://github.com/Alex313031/thorium/blob/main/arm/android/android_ARM64_args.gn

but I have also try with only the OS and CPU lines. Same result

@gz83
Copy link
Collaborator

gz83 commented Oct 4, 2023

I noticed some files in the git status log you provided that won't be processed by the sh script, did you modify the Chromium code in addition to the Thorium files you applied?

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 4, 2023

I have nothing modified.
I have done these steps, so no need for adjusting anything.
#230 (comment)

@gz83
Copy link
Collaborator

gz83 commented Oct 5, 2023

Can you upload the skia/BUILD.gn file you currently have here?

Also, keeping the args parameter used the same, will the error message generated continue to change each time the gn args command is executed?

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 5, 2023

BUILD.txt
I have renamed to txt because .gn is not allowed the attach
and yes, I can run gn args out/thorium 100 time with different arg and will get always the same error message

@gz83
Copy link
Collaborator

gz83 commented Oct 5, 2023

I have checked the file you provided and no problems have been found yet.

Can you provide the BUILD.gn file located under the code root directory? It's in ~/chromium/src/BUILD.gn.

Normally the error you encountered should not occur. Have you modified the files in the thorium repo? (I'm not sure if I've asked this question yet)

@LeOS-GSI

@LeOS-GSI
Copy link
Author

LeOS-GSI commented Oct 5, 2023

BUILD.gn.txt

Have you modified the files in the thorium repo? (I'm not sure if I've asked this question yet)

Yes, you have asked. I don't have modified nothing

@gz83
Copy link
Collaborator

gz83 commented Oct 5, 2023

I didn't find a problem with this file either, ping Alex to see if he has a solution

@LeOS-GSI
@Alex313031

@gz83 gz83 closed this as completed Sep 2, 2024
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

3 participants