ninja: Entering directory `out/ReleasePackage'
[1/5624] LIB obj/chrome/browser/safe_browsing/safe_browsing.lib
[2/5624] LINK(DLL) chrome.dll chrome.dll.lib
FAILED: chrome.dll chrome.dll.lib
C:/depot_tools/python276_bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x86 False link.exe /nologo /IMPLIB:./chrome.dll.lib /DLL /OUT:./chrome.dll /PDB:./chrome.dll.pdb @./chrome.dll.rsp
LINK : fatal error LNK1181: Can't open input file “obj/chrome/browser/safe_browsing/safe_browsing.lib”
ninja: build stopped: subcommand failed.
so, the same as macOS then... https://github.com/Eloston/ungoogled-chromium/issues/301
so how to fix it for 62
No idea. If no one figures it out beforehand, I'll investigate after progress is made with version 63.
I has fixed it for windows. This is my patch:
@PonyPC can you please recap what you did? So I could try to reproduce it for macOS.
@PonyPC I, too, would like to know your method. Based on your patch, I only see removal of Safe Browsing code from various files.
build/toolchain/win/tool_wrapper.py or .ninja files?EDIT: I will include these changes in 63. Thanks for the help!
Well, you're right. I did missing add GN config to git and I'll upload the patch again include these, sorry for that.
How do I know?
There isn't a safe_browsing.lib in "obj\chrome\browser\safe_browsing", I checked "chrome\browser\safe_browsing\BUILD.gn" and found that there is no source file so that the compiler can not generate library. I tried add some sources which build without errors, and found that corrupt references, fix it. Then try to remove the static_library("safe_browsing"), the compiler figure out which contains safe_browsing.
How do I do?
@PonyPC can you upload your version somewhere?
I would like to test some recent version of ungoogled chromium. The last one is very old.
@PonyPC Ah, I see. GN was the missing link that made everything here "click" for me.
From what I understand, the static_library keyword in GN causes the linker to look for a corresponding static library file, hence your original error. So you removed the GN dependency, which removed the visibility of header and source files in chrome/*/safe_browsing. To fix it, you patched out those references (many of which are Windows-specific since the existing Safe Browsing patch removes the cross-platform references), which made the build work.
@tectiv3 you can remove the //chrome/browser/safe_browsing line that @PonyPC has done, and then try building. You will encounter errors about missing headers and such in chrome/*/safe_browsing/ and related paths; just patch them out in the same manner that is done in the existing patches. If trial-and-error isn't your style (or is too sloppy), you could use some code analysis tool to find includes of the path chrome/browser/safe_browsing or chrome/common/safe_browsing, and patch those files.
@ribatamu FYI, because @PonyPC seems to be using Depot Tools, there is a high probability that domain substitution or source cleaning were not used. As a result, Google binaries were involved in the build and could be included, and there may be an occasional leak from the browser (e.g. #302).
@Eloston no it's exactly my style =) yeah, was going to do exactly that
@ribatamu sorry, my binary version contains custom modifies.
Actually, I patched my version without domain substitution. But if patch them all, you can still use depot tools. You can fetch build params from ungoogle script and parsing them to ninja
Only the windows version I have environment to build, those platform I can't fix it.
yep, I was able to build successfully. Just needed to remove a couple of entries from various Build.gn files, there was no need in fixing sources.
I will prepare a patch tomorrow.
Most helpful comment
@Eloston no it's exactly my style =) yeah, was going to do exactly that