Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925251 - >=www-client/firefox-123.0 fails to cross compile with new llvm-r1 eclass
Summary: >=www-client/firefox-123.0 fails to cross compile with new llvm-r1 eclass
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-22 10:56 UTC by tt_1
Modified: 2024-04-23 09:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log from armv7a (build.log,36.78 KB, text/x-log)
2024-02-22 10:57 UTC, tt_1
Details
output from emerge --info (armv7a) (emerge-info,5.04 KB, text/plain)
2024-02-22 10:58 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2024-02-22 10:56:31 UTC
this error does not happen with firefox-122.0.1 ebuild: 

 0:05.01 checking whether the C++ compiler supports -fno-sized-deallocation... yes
 0:05.03 checking whether the C++ compiler supports -fno-aligned-new... yes
 0:05.03 checking for llvm_profdata... /usr/aarch64-unknown-linux-gnu/usr/lib/llvm/17/bin/llvm-profdata
 0:05.06 checking whether llvm-profdata supports 'order' subcommand...
 0:05.06 DEBUG: Executing: `/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/17/bin/llvm-profdata order --help`
 0:05.06 Traceback (most recent call last):
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/configure.py", line 351, in <module>
 0:05.06     sys.exit(main(sys.argv))
 0:05.06              ^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/configure.py", line 141, in main
 0:05.06     sandbox.run()
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 569, in run
 0:05.06     func(*args)
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 620, in _value_for
 0:05.06     return self._value_for_depends(obj)
 0:05.06            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/util.py", line 1070, in method_call
 0:05.06     cache[args] = self.func(instance, *args)
 0:05.06                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 629, in _value_for_depends
 0:05.06     value = obj.result()
 0:05.06             ^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/util.py", line 1070, in method_call
 0:05.06     cache[args] = self.func(instance, *args)
 0:05.06                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 161, in result
 0:05.06     return self._func(*resolved_args)
 0:05.06            ^^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 1312, in wrapped
 0:05.06     return new_func(*args, **kwargs)
 0:05.06            ^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/build/moz.configure/util.configure", line 472, in wrapper
 0:05.06     return func(*args)
 0:05.06            ^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 1312, in wrapped
 0:05.06     return new_func(*args, **kwargs)
 0:05.06            ^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 912, in wrapper
 0:05.06     ret = template(*args, **kwargs)
 0:05.06           ^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/build/moz.configure/checks.configure", line 59, in wrapped
 0:05.06     ret = func(*args, **kwargs)
 0:05.06           ^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 1312, in wrapped
 0:05.06     return new_func(*args, **kwargs)
 0:05.06            ^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/build/moz.configure/lto-pgo.configure", line 17, in llvm_profdata_order
 0:05.06     retcode, _, _ = get_cmd_output(profdata, "order", "--help")
 0:05.06                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 1312, in wrapped
 0:05.06     return new_func(*args, **kwargs)
 0:05.06            ^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/build/moz.configure/util.configure", line 31, in get_cmd_output
 0:05.06     proc = subprocess.Popen(
 0:05.06            ^^^^^^^^^^^^^^^^^
 0:05.06   File "/var/tmp/portage/portage/www-client/firefox-123.0/work/firefox-123.0/python/mozbuild/mozbuild/configure/__init__.py", line 1041, in wrapper
 0:05.06     return function(*args, **kwargs)
 0:05.06            ^^^^^^^^^^^^^^^^^^^^^^^^^
 0:05.06   File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
 0:05.06     self._execute_child(args, executable, preexec_fn, close_fds,
 0:05.06   File "/usr/lib/python3.11/subprocess.py", line 1953, in _execute_child
 0:05.06     raise child_exception_type(errno_num, err_msg, err_filename)
 0:05.06 OSError: [Errno 8] Exec format error: '/usr/aarch64-unknown-linux-gnu/usr/lib/llvm/17/bin/llvm-profdata'
*** Fix above errors and then restart with "./mach build"
 * ERROR: www-client/firefox-123.0::gentoo failed (configure phase):


The diff between the two ebuilds is very small, and it most likely is llvm-r1_pkg_setup function which doesn't seem to expect a cross-compile env, where it tries to find build tools such as llvm-profgen within the aarch64 prefix

it should try to find these build tools within /usr/lib/llvm/

same error for armv7a
Comment 1 tt_1 2024-02-22 10:57:35 UTC
Created attachment 885703 [details]
build log from armv7a
Comment 2 tt_1 2024-02-22 10:58:25 UTC
Created attachment 885704 [details]
output from emerge --info (armv7a)
Comment 3 Ionen Wolkens gentoo-dev 2024-02-22 11:02:43 UTC
Haven't dug into the logic, but llvm-utils.eclass'

    local llvm_path=${ESYSROOT}/usr/lib/llvm/${slot}/bin

Sounds like it should be BROOT.
Comment 4 Ionen Wolkens gentoo-dev 2024-02-22 11:12:30 UTC
(In reply to Ionen Wolkens from comment #3)
> Haven't dug into the logic, but llvm-utils.eclass'
> 
>     local llvm_path=${ESYSROOT}/usr/lib/llvm/${slot}/bin
> 
> Sounds like it should be BROOT.
...albeit the former llvm.eclass used ESYSROOT too, maybe that bit wasn't getting used?

Haven't tested if changing this would help firefox though, so could be unrelated.
Comment 5 tt_1 2024-03-24 19:14:52 UTC
I've tested the patch with the new firefox-124.x ebuild, it works for me.