Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Decided to build new system (svn as of 2019-09-23) and try out non-systemd version with logind + pam. I've never built gobject-introspection before because i never build gnome, but, with current libsecret and upcoming version of gimp requiring it, i tried to include it. It always fails with following:
Code:
Traceback (most recent call last): [gobject-introspection]
File "tools/g-ir-scanner", line 100, in <module>
sys.exit(scanner_main(sys.argv))
File "/root/gobject-introspection-1.62.0/build/giscanner/scannermain.py", line 579, in scanner_main
shlibs = create_binary(transformer, options, args)
File "/root/gobject-introspection-1.62.0/build/giscanner/scannermain.py", line 419, in create_binary
shlibs = resolve_shlibs(options, binary, options.libraries)
File "/root/gobject-introspection-1.62.0/build/giscanner/shlibs.py", line 168, in resolve_shlibs
_resolve_non_libtool(options, binary, non_libtool))
File "/root/gobject-introspection-1.62.0/build/giscanner/shlibs.py", line 104, in _resolve_non_libtool
output = subprocess.check_output(args)
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 487, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ldd', '/root/gobject-introspection-1.62.0/build/tmp-introspectu_km3xvs/GLib-2.0']' returned non-zero exit status 1.
ninja: build stopped: subcommand failed
Looks likes a python issue? I see a 'ldd' at the bottom and that doesn't seem to work on my system. Eg. ldd /usr/bin/less yields "not a dynamic executable" - and same for libraries. Right now, I could live without introspection, except, I cant apply the elogind patch to polkit because when running autoreconf -fi after applying the patch IT complains about missing gir (grrr.)
Ignore the long tailspin and focus on the error. The rest of the tailspin doesn't matter.
Code:
subprocess.CalledProcessError: Command '['ldd', '/root/gobject-introspection-1.62.0/build/tmp-introspectu_km3xvs/GLib-2.0']' returned non-zero exit status 1.
Error 1 is permissions. You can look them up in /usr/include/asm-generic/errno.h & errno-base.h or some such files. Handy when sorting compiles.
My guess is that (/root/…<blah>…/GLib-2.0 a directory, not an executable, so ldd would understandably puke. It may be compile-time options. When I considered building gnome in BLFS back a long time ago, everyone was bitching about dependencies. I hope it's not that way still. But if you're doing SVN, you obviously enjoy suffering
That path is just where I'm building it. In that case, as root, in /root. But, I've also tried as a regular user in ~ and with the package manager (which sets CFLAGS). Same result in all cases. I don't think much has changed since 9.0 was released - same toolchain, same glibc. I will see if i can get a newer g-introspection package to try if nothing else works.
You're running ldd on a directory. ldd just throws up an output onscreen of required libs. I would imagine in a compile you'd want to be running ld (the linker) and not ldd. What is in that location anyhow?
It has something to do with how I a build glibc. The problem was the non-functioning ldd command. I hadn't noticed it before because I don't run the tests, all the sanity checks passed, and no other packages complained. I managed to get a working ldd by rebuilding glibc on a test system (same toolchain and packages) and then was able to get gobject-introspection to build. Not completely solved because glibc put stuff in the /lib64 folder, so I've still got some work to do, but I'll figure it out.
It turns out i didn't need to rebuild anything. The ldd script couldn't find the linker. A sed on /usr/bin/ldd would fix it i think, but i just created a symlink (this is a non-multilib system):
So, in summary: polkit w/ patch requires gobject-introspection which requires working ldd to build. Now i can fix polkit and (of less importance to me) rebuild the gtk stack with gir support.
Very interesting - bryan_S you actually solved the same issue I had.
For months I could not compile gobject-introspection and ldd was
always failing. Then I noticed that, indeed, ldd was not even working;
and then, also, yup, the ld*linux* was missing.
It would be nice if LFS/BLFS could mention this specifically. Anyone
with connections to the LFS/BLFS guys? That could definitely help
other people too.
Sorry to necro an old thread, but the same problem just happened to me while building LFS/BLFS. It's entirely possible that I made a mistake setting up the system initially -- there are quite a lot of manual steps.
Thank you for the excellent advice and diagnosis of the issue with ldd. After realizing that the gobject-introspection build was indeed running ldd on a directory, and also that ldd was generally not working on any executable, I followed your advice.
However the command for me was slightly different. I am posting here in case it may be relevant for someone else later:
It turns out i didn't need to rebuild anything. The ldd script couldn't find the linker. A sed on /usr/bin/ldd would fix it i think, but i just created a symlink (this is a non-multilib system):
So, in summary: polkit w/ patch requires gobject-introspection which requires working ldd to build. Now i can fix polkit and (of less importance to me) rebuild the gtk stack with gir support.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.