Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 936245 - cross-aarch64-linux-gnu/gcc-13.3.1_p20240614:13: cannot build due to "fatal error: crypt.h: No such file or directory"
Summary: cross-aarch64-linux-gnu/gcc-13.3.1_p20240614:13: cannot build due to "fatal e...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal major (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/bugzilla/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-18 08:54 UTC by Antonio Quartulli
Modified: 2024-08-06 16:40 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Quartulli 2024-07-18 08:54:13 UTC
gcc-13.3.1 for aarch64 is failing to compile with the sanitize flag enabled.
It seems to be a known old issue, as described in the reported URL.

crosstool-ng is now carrying a patch to fix this issue (attached to the GCC bug report at the mentioned URL), which maybe should be ported to gentoo-crossdev too.

Reproducible: Always
Comment 1 Stefan Trenker 2024-07-18 15:05:48 UTC
I ran into the same issue when building cross-aarch64-unknown-linux-gnu/gcc-13.3.1_p20240614.

As workaround i emerged sys-libs/libxcrypt using the following command:

ROOT=/usr/aarch64-unknown-linux-gnu/ emerge --nodeps sys-libs/libxcrypt
Comment 2 Mike Gilbert gentoo-dev 2024-07-23 15:48:35 UTC
You need to install libxcrypt as mentioned in comment 1.

Recent versions of crossdev will do that for you when creating a new cross compiler.
Comment 3 Aidan Marks 2024-07-23 21:04:22 UTC
I tried:

ROOT=/usr/armv6j-unknown-linux-gnueabihf/ emerge --nodeps sys-libs/libxcrypt

and it fails at install stage, ldconfig exec format error:

>>> Installing (1 of 1) sys-libs/libxcrypt-4.4.36-r3::gentoo to /usr/armv6j-unknown-linux-gnueabihf/
Process Process-20:
Traceback (most recent call last):
  File "/usr/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.12/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.12/site-packages/portage/util/_async/ForkProcess.py", line 326, in _bootstrap
    sys.exit(target(*(args or []), **(kwargs or {})))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/dbapi/_MergeProcess.py", line 276, in _target
    rval = mylink.merge(
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/dbapi/vartree.py", line 1895, in wrapper
    return f(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/dbapi/vartree.py", line 6041, in merge
    retval = self.treewalk(
             ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/dbapi/vartree.py", line 5247, in treewalk
    env_update(
  File "/usr/lib/python3.12/site-packages/portage/proxy/objectproxy.py", line 30, in __call__
    return result(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/util/env_update.py", line 81, in env_update
    return _env_update(
           ^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/portage/util/env_update.py", line 384, in _env_update
    ret = subprocess.run(
          ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/usr/armv6j-unknown-linux-gnueabihf/sbin/ldconfig'

>>> Completed (1 of 1) sys-libs/libxcrypt-4.4.36-r3::gentoo to /usr/armv6j-unknown-linux-gnueabihf/

>>> Failed to install sys-libs/libxcrypt-4.4.36-r3 to /usr/armv6j-unknown-linux-gnueabihf/, Log file:

>>>  '/nas/tmp/portage/sys-libs/libxcrypt-4.4.36-r3/temp/build.log'
Comment 4 Mike Gilbert gentoo-dev 2024-07-24 00:09:57 UTC
Sorry, comment 1 is incorrect. You should install libxcrypt in your cross root using a proper cross compiler.
Comment 5 Mike Gilbert gentoo-dev 2024-07-24 00:14:23 UTC
You could also install cross-aarch64-linux-gnu/libxcrypt by setting up a symlink in your cross repo.
Comment 6 Mike Gilbert gentoo-dev 2024-07-24 00:19:57 UTC
Oh, it seems I a misremember why we added cross support to libxcrypt. It was for LLVM, not crossdev (GNU toolchain).

https://github.com/gentoo/gentoo/pull/20601

It's possible crossdev needs an update indeed. However, installing sys-libs/libxcrypt in ROOT using a proper cross-emerge should still resolve the issue.
Comment 7 Mike Gilbert gentoo-dev 2024-07-24 00:28:15 UTC
Err, crossdev doesn't really do patching; we handle that in the ebuilds. Assigning to toolchain.
Comment 8 Viorel Munteanu gentoo-dev 2024-08-06 16:40:59 UTC
In my case this worked:

armv7a-unknown-linux-gnueabihf-emerge --nodeps sys-libs/libxcrypt