Bug 8583 - strace shows accesses in non-existent location.
Summary: strace shows accesses in non-existent location.
Status: RESOLVED FIXED
Alias: None
Product: General Runtime
Classification: Runtime
Component: General Runtime (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Undecided minor
Target Milestone: Future
Assignee: Juro Bystricky
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-10-26 22:31 UTC by Juro Bystricky
Modified: 2018-10-11 15:16 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juro Bystricky 2015-10-26 22:31:25 UTC
Install a  buildtools-tarball such as poky-glibc-i686-buildtools-tarball-i586-buildtools-nativesdk-standalone-xxxx.sh in a non-default location.
Source the environment, i.e.:

$ . environment-setup-i686-pokysdk-linux

Run a command such as:

$ strace make 2>&1  | grep /opt

Observe:
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/en_CA.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/en_CA.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/en_CA/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/en.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/en.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/en/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/include", 0xffc768e0) = -1 ENOENT (No such file or directory)


So some files are assumed to be in default (but potentially non-existent) location.
Although this does not seem to be harmful, it should be either fixed or justified.
Comment 1 Juro Bystricky 2015-12-02 22:06:29 UTC
The culprit seems to be libc-2.22.so, as it contains some hard-coded links that may not exist:

strings -f *.so | grep /opt/poky
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/gconv
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/gconv/gconv-modules.cache
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/locale
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/locale/%L/%N:/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/locale/%L/LC_MESSAGES/%N:/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/locale/%l/%N:/opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/locale/%l/LC_MESSAGES/%N:
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/etc/localtime
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/glibc/getconf
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/lib/locale/locale-archive
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/locale
libc-2.22.so: /opt/poky/2.0/sysroots/i686-pokysdk-linux/usr/share/zoneinfo
Comment 2 Juro Bystricky 2016-03-14 17:52:56 UTC
Meant to say hard-coded paths (not links).
Comment 3 Richard Purdie 2018-10-11 15:16:04 UTC
We now include locale data in the sdks and uninative so these paths are now handled correctly. If there are any remaining issues we'd handle in separate bugs.