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

Troubleshooting building the binary package on Ubuntu 24.10 #352

Open
Ashkian opened this issue Dec 17, 2024 · 5 comments
Open

Troubleshooting building the binary package on Ubuntu 24.10 #352

Ashkian opened this issue Dec 17, 2024 · 5 comments

Comments

@Ashkian
Copy link

Ashkian commented Dec 17, 2024

1 -running the following command results the following message, what does it mean, is it a issue?
command:
make convert
result:

...
The text leading up to this was:
--------------------------
|--- a/chrome/browser/resources/default_apps/external_extensions.json
|+++ b/chrome/browser/resources/default_apps/external_extensions.json
--------------------------
No file to patch.Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|--- a/chrome/installer/setup/google_chrome_behaviors.cc
|+++ b/chrome/installer/setup/google_chrome_behaviors.cc
--------------------------
No file to patch.Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|# Remove unused Safe Browsing and Sign-in fields from Preferences file
|# TODO: This patch should probably be split up and merged into
|# disable-signin.patch and fix-building-without-safebrowsing.patch
|
|--- a/android_webview/browser/aw_browser_context.cc
|+++ b/android_webview/browser/aw_browser_context.cc
--------------------------
No file to patch.Skipping patch.
2 out of 2 hunks ignored
...

2- running the following command results the following message, how to solve the issue?
command:
dpkg-buildpackage -b -uc
result:

...
[344/68287] AR obj/third_party/protobuf/libprotobuf_lite.a
bfd plugin: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (91) (Producer: 'LLVM19.1.1' Reader: 'LLVM 16.0.6')
...
bfd plugin: LLVM gold plugin has failed to create LTO module: Invalid attribute group entry (Producer: 'LLVM19.1.1' Reader: 'LLVM 16.0.6')
...

Steps on Ubuntu 24.10:

sudo apt install curl
sudo apt install git
sudo apt install dpkg-dev
sudo apt install make
sudo apt install devscripts
sudo apt install quilt
sudo apt install rsync
sudo apt install equivs
sudo apt install debhelper
sudo apt install lld-19
sudo apt install clang-19
sudo apt install clang-format-19
sudo apt install libclang-rt-19-dev
sudo apt install rustc
sudo apt install bindgen
sudo apt install pkg-config
sudo apt install ninja-build
sudo apt install python3
sudo apt install python3-jinja2
sudo apt install python3-pkg-resources
sudo apt install ca-certificates
sudo apt install elfutils
sudo apt install wget
sudo apt install flex
sudo apt install yasm
sudo apt install xvfb
sudo apt install wdiff
sudo apt install gperf
sudo apt install bison
sudo apt install nodejs
sudo apt install rollup
sudo apt install valgrind
sudo apt install xz-utils
sudo apt install x11-apps
sudo apt install xcb-proto
sudo apt install xfonts-base
sudo apt install libdav1d-dev
sudo apt install libx11-xcb-dev
sudo apt install libxshmfence-dev
sudo apt install libgl-dev
sudo apt install libglu1-mesa-dev
sudo apt install libegl1-mesa-dev
sudo apt install libgles2-mesa-dev
sudo apt install libopenh264-dev
sudo apt install generate-ninja
sudo apt install mesa-common-dev
sudo apt install rapidjson-dev
sudo apt install libva-dev
sudo apt install libxt-dev
sudo apt install libgbm-dev
sudo apt install libpng-dev
sudo apt install libxss-dev
sudo apt install libelf-dev
sudo apt install libpci-dev
sudo apt install libcap-dev
sudo apt install libdrm-dev
sudo apt install libffi-dev
sudo apt install libhwy-dev
sudo apt install libkrb5-dev
sudo apt install libexif-dev
sudo apt install libflac-dev
sudo apt install libudev-dev
sudo apt install libpipewire-0.3-dev
sudo apt install libopus-dev
sudo apt install libxtst-dev
sudo apt install libjpeg-dev
sudo apt install libxml2-dev
sudo apt install libgtk-3-dev
sudo apt install libxslt1-dev
sudo apt install liblcms2-dev
sudo apt install libpulse-dev
sudo apt install libpam0g-dev
sudo apt install libtiff-dev
sudo apt install libdouble-conversion-dev
sudo apt install libxnvctrl-dev
sudo apt install libglib2.0-dev
sudo apt install libasound2-dev
sudo apt install libsecret-1-dev
sudo apt install libspeechd-dev
sudo apt install libminizip-dev
sudo apt install libhunspell-dev
sudo apt install libharfbuzz-dev
sudo apt install libxcb-dri3-dev
sudo apt install libusb-1.0-0-dev
sudo apt install libopenjp2-7-dev
sudo apt install libmodpbase64-dev
sudo apt install libnss3-dev
sudo apt install libnspr4-dev
sudo apt install libcups2-dev
sudo apt install libevent-dev
sudo apt install libevdev-dev
sudo apt install libgcrypt20-dev
sudo apt install libcurl4-openssl-dev
sudo apt install libzstd-dev
sudo apt install libc++-19-dev</dd>
sudo apt install libc++abi-19-dev</dd>
sudo apt install fonts-ipafont-gothic</dd>
sudo apt install fonts-ipafont-mincho</dd>
git clone https://github.com/ungoogled-software/ungoogled-chromium-debian.git
#Download a chromium source package from https://packages.debian.org/source/testing/chromium
git clone https://github.com/ungoogled-software/ungoogled-chromium.git
git checkout 131.0.6778.108-1
dpkg-source --skip-patches -x chromium_131.0.6778.108-1.dsc
#Edit the Makefile (VERSION = <VERSION>, INPLACE = 1, DISTRIBUTION = oracular)
make convert
The text leading up to this was:
--------------------------
|--- a/chrome/browser/resources/default_apps/external_extensions.json
|+++ b/chrome/browser/resources/default_apps/external_extensions.json
--------------------------
No file to patch.Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|--- a/chrome/installer/setup/google_chrome_behaviors.cc
|+++ b/chrome/installer/setup/google_chrome_behaviors.cc
--------------------------
No file to patch.Skipping patch.
1 out of 1 hunk ignored
The text leading up to this was:
--------------------------
|# Remove unused Safe Browsing and Sign-in fields from Preferences file
|# TODO: This patch should probably be split up and merged into
|# disable-signin.patch and fix-building-without-safebrowsing.patch
|
|--- a/android_webview/browser/aw_browser_context.cc
|+++ b/android_webview/browser/aw_browser_context.cc
--------------------------
No file to patch.Skipping patch.
2 out of 2 hunks ignored
...
touch stage-5.stamp
quilt pop -afq
git clone https://bitbucket.org/xtradeb/xtradeb-convert.git
pkg/chromium.sh ungoogled-chromium-debian/debian/download_cache/chromium-131.0.6778.108/debian oracular
dpkg-buildpackage -b -uc
...
[344/68287] AR obj/third_party/protobuf/libprotobuf_lite.a
bfd plugin: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (91) (Producer: 'LLVM19.1.1' Reader: 'LLVM 16.0.6')
...
bfd plugin: LLVM gold plugin has failed to create LTO module: Invalid attribute group entry (Producer: 'LLVM19.1.1' Reader: 'LLVM 16.0.6')
...
@iskunk
Copy link
Contributor

iskunk commented Dec 17, 2024

Hello @Ashkian,

**1 -running the following command results the following message, what does it mean, is it a issue?

Not an issue. That is simply the automated patching system dropping patch hunks for files that have been removed from ungoogled-chromium.

2- running the following command results the following message, how to solve the issue? command: dpkg-buildpackage -b -uc result:

...
[344/68287] AR obj/third_party/protobuf/libprotobuf_lite.a
bfd plugin: LLVM gold plugin has failed to create LTO module: Unknown attribute kind (91) (Producer: 'LLVM19.1.1' Reader: 'LLVM 16.0.6')
...
bfd plugin: LLVM gold plugin has failed to create LTO module: Invalid attribute group entry (Producer: 'LLVM19.1.1' Reader: 'LLVM 16.0.6')
...

You have LLVM-16 packages installed. None are listed in the set of commands you gave, but they must have been either present on your system beforehand, or installed as dependencies of one of those packages. Make sure that you have only LLVM-19 packages installed. A combination of the two will result in an old linker reading code from a new compiler, which doesn't work.

@Ashkian
Copy link
Author

Ashkian commented Dec 17, 2024

Hello @iskunk and thanks for reply,
how to Make sure that I have only LLVM-19 packages installed?

@iskunk
Copy link
Contributor

iskunk commented Dec 17, 2024

how to Make sure that I have only LLVM-19 packages installed?

You'll need to review the list of packages installed on your system, using e.g. dpkg -l.

@Ashkian
Copy link
Author

Ashkian commented Dec 21, 2024

Thanks for the @iskunk advice,
removing older llvm fixed the following issue
LLVM gold plugin has failed to create LTO module
but NOTE
do not remove libllvm18:amd64 which is required for rustc (removing it will remove rustc)

after fixing the above issue, I continued building process but I faced the following clang warnings, which one is issue and how to fix?

# XtraDeb workaround for https://crbug.com/40943790
...
ninja: Entering directory `out/Release'

warning: code will never be executed [-Wunreachable-code]

[30073/68287] CXX obj/components/gcm_driver/gcm_driver/gcm_client_impl.o
../../components/gcm_driver/gcm_client_impl.cc:455:21: warning: code will never be executed [-Wunreachable-code]
  455 |   std::vector<GURL> endpoints;
      |                     ^~~~~~~~~
1 warning generated.
[33130/68287] CXX obj/components/domain_reliability/domain_reliability/uploader.o
../../components/domain_reliability/uploader.cc:93:9: warning: code will never be executed [-Wunreachable-code]
   93 |         net::DefineNetworkTrafficAnnotation("domain_reliability_report_upload",
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../components/domain_reliability/uploader.cc:84:9: note: silence by adding parentheses to mark code as explicitly dead
   84 |     if (true) {
      |         ^   
      |         /* DISABLES CODE */ ( )
1 warning generated.
[34590/68287] CXX obj/components/assist_ranker/assist_ranker/ranker_url_fetcher.o
../../components/assist_ranker/ranker_url_fetcher.cc:37:7: warning: code will never be executed [-Wunreachable-code]
   37 |   if (state_ == REQUESTING) {
      |       ^~~~~~
1 warning generated.
[35434/68287] CXX obj/components/translate/core/browser/browser/translate_ranker_impl.o
../../components/translate/core/browser/translate_ranker_impl.cc:238:3: warning: code will never be executed [-Wunreachable-code]
  238 |   translate_event->set_ranker_request_timestamp_sec(
      |   ^~~~~~~~~~~~~~~
1 warning generated.

warning: 'USE_SYSTEM_ZLIB' macro redefined [-Wmacro-redefined]

[15013/68287] CXX obj/third_party/angle/libANGLE_no_vulkan/MemoryProgramCache.o
../../third_party/angle/src/libANGLE/MemoryProgramCache.cpp:11:9: warning: 'USE_SYSTEM_ZLIB' macro redefined [-Wmacro-redefined]
11 | #define USE_SYSTEM_ZLIB
|         ^
<command line>:39:9: note: previous definition is here
39 | #define USE_SYSTEM_ZLIB 1
|         ^
1 warning generated.
[15039/68287] CXX obj/third_party/angle/libANGLE_no_vulkan/angletypes.o
../../third_party/angle/src/libANGLE/angletypes.cpp:17:9: warning: 'USE_SYSTEM_ZLIB' macro redefined [-Wmacro-redefined]
   17 | #define USE_SYSTEM_ZLIB
      |         ^
<command line>:39:9: note: previous definition is here
   39 | #define USE_SYSTEM_ZLIB 1
      |         ^
1 warning generated.
[15117/68287] CXX obj/third_party/angle/src/libANGLE/renderer/vulkan/angle_vulkan_backend/vk_internal_shaders_autogen.o
../../third_party/angle/src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp:13:9: warning: 'USE_SYSTEM_ZLIB' macro redefined [-Wmacro-redefined]
   13 | #define USE_SYSTEM_ZLIB
      |         ^
<command line>:41:9: note: previous definition is here
   41 | #define USE_SYSTEM_ZLIB 1
      |         ^
1 warning generated.

warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]

[24115/68287] CXX obj/ui/gl/init/init/gl_factory_ozone.o
../../ui/gl/init/gl_factory_ozone.cc:66:3: warning: label at end of compound statement is a C++23 extension [-Wc++23-extensions]
   66 |   }
      |   ^
1 warning generated.

warning: add explicit braces to avoid dangling else [-Wdangling-else]

[33142/68287] CXX obj/components/flags_ui/flags_ui/flags_state.o
../../components/flags_ui/flags_state.cc:671:7: warning: add explicit braces to avoid dangling else [-Wdangling-else]
  671 |       else
      |       ^
1 warning generated.

warning: field 'should_autocollect_' will be initialized after field 'search_engine_choice_service_' [-Wreorder-ctor]

[33830/68287] CXX obj/components/search_engines/search_engines/template_url_service.o
../../components/search_engines/template_url_service.cc:407:7: warning: field 'should_autocollect_' will be initialized after field 'search_engine_choice_service_' [-Wreorder-ctor]
  407 |       should_autocollect_(true),
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~
      |       search_engine_choice_service_(search_engine_choice_service)
  408 |       search_engine_choice_service_(search_engine_choice_service),
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |       should_autocollect_(true)
1 warning generated.

clang details

Ubuntu clang version 19.1.1 (1ubuntu1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin
# prefer unbundled (system) libraries
./debian/scripts/unbundle

@iskunk
Copy link
Contributor

iskunk commented Dec 21, 2024

Generally, if the issue is only a warning and does not prevent the build from completing, it can be ignored. Some of those warnings are familiar and have always been present in the build.

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