Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Sorry, but this looks insufficient. Can you please provide a bit more information:
what do you want to try to build, what library causes the problem?
How did you collect the libraries?
There is a thread about a similar issue: http://www.linuxquestions.org/questi...queeze-847297/
It means you may mismatched 32bit and 64bit libs. Is this your case also?
Sorry, but this looks insufficient. Can you please provide a bit more information:
what do you want to try to build?
well i should mention that i get this when running ldconfig from my newly compiled glibc , the strange thing is that i've compiled the same software several times now with the same version , same binutils , gcc and same everything else , which worked fine but now i'm getting this weird glitch apparently out of nothing , and i've absolutely no clue what possibly could have changed since my last compile ....
Quote:
Originally Posted by pan64
what library causes the problem?
How did you collect the libraries?
i don't think that any libraries are causing problems , when i chroot into my "from scratch" distro (not to be confused with LFS) i can compile and run anything i want including statically linked apps , but ldconfig and sln (all binaries that come with glibc) won't work.
i've run some tests so far and strace reveals weird stuff going on when executing ldconfig
Code:
execve("/sbin/ldconfig", ["/sbin/ldconfig"], [/* 84 vars */]) = 0
uname({sys="Linux", node="HOSTNAME", ...}) = 0
open("/dev/tty", O_RDWR|O_NOCTTY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
worth noting is that ldconfig is not supposed to open "/dev/tty" , i can't explain why it does that! when i compare this to the ldconfig strace from another box i get a completely different "healthy" line of execution..
sorry, just to be sure:
using chroot will solve your problem, but with your user account you will get this strange message?
I still think you have/use a corrupted/incompatible library. It is not the ldconfig itself, but something behind it. Maybe your /etc/ld.so.conf is corrupted.
Maybe you have a 64bit dynamic library, but you do not have the static counterpart (or that one is a 32bit release).
sorry, just to be sure:
using chroot will solve your problem, but with your user account you will get this strange message?
No , segfault happens eitherway and only with ldconfig (and all other statically linked binaries from this glibc build) , ldconfig from the host distro works fine as well as inside the chroot (in case it's copied into the chroot directory replacing the one which segfaults)
Quote:
Originally Posted by pan64
I still think you have/use a corrupted/incompatible library. It is not the ldconfig itself, but something behind it. Maybe your /etc/ld.so.conf is corrupted.
ld.so.conf can't be corrupted because it's a text file , if you mean ld.so.cache well i've deleted that , so that's out of the question.
Quote:
Originally Posted by pan64
Maybe you have a 64bit dynamic library, but you do not have the static counterpart (or that one is a 32bit release).
i think you're confusing things ... if the static library didn't exist then there would not be a statically linked binary to begin with , the fact that it does compile , assemble and then link is proof that all necessary static libraries are there.
not to mention of course that we're talking about a glibc related binary , which is built/linked right after the libc libraries are .
i can't imagine how "foreign" libs could get into the way in such a scenario.
sorry, but the message in your first post means something like a 32/64 bit mismatch. That may caused easily by reloc/segfault errors. Also using an incompatible lib may cause really stupid error messages (because the system sometimes tries to resolve unconditionally anything). Again, return back to the unexpected reloc type: it means - at least for me - that the relocation was not successful. I agree with you:
Quote:
if the static library didn't exist then there would not be a statically linked binary to begin with , the fact that it does compile , assemble and then link is proof that all necessary static libraries are there
Yes, I'm confused. Maybe your build environment is not OK.
Yes, I'm confused. Maybe your build environment is not OK.
well so am i
however i've just made another discovery which is that , if i compile glibc again within the chroot environment (which was created earlier) then ldconfig would run fine.
so it does seem that the host environment is getting sick , anyways i'm planning to replace it once the new one (which i'm building now) gets operational.
anyways , i need to fix the host environment in order to get there , so where should i start?
you mentioned "returning back to the unexpected reloc type" , now that's interesting , what do you exactly mean by that?
as for the 32/64 bit mismatch , well i don't recall deleting any x86_64 libc libaries , and btw i forgot to mention that i can successfully statically build dummy binaries without any problems at runtime
an interesting question , how can i determine which libraries get statically linked into ldconfig ?
you mentioned "returning back to the unexpected reloc type" , now that's interesting , what do you exactly mean by that?
means only returning back to that message, the possible meaning of it (that was your original question).
Quote:
Originally Posted by entz
an interesting question , how can i determine which libraries get statically linked into ldconfig ?
during the build you can see what is linked into the executable, or you can see the required dynamic libraries with ldd - all the others are statically linked.
Another thing: ldconfig may load libraries on demand, which were not linked to it at all. If this is the case you may have this 32/64 bit mismatch by those libs - or maybe you linked one version of the lib, but used another later.
What about your LD_LIBRARY_PATH? Is this ok, or contains something "strange"?
Quote:
i can compile and run anything i want including statically linked apps , but ldconfig and sln (all binaries that come with glibc) won't work.
maybe you have two different gcc runtime systems? one was coming with the os and another one was used in your builds...
i'm doing some "from-scratch" work and i ran across an unusual error that says
Code:
unexpected reloc type in static binarySegmentation fault
what exactly does this error mean?
btw this only happens when running statically linked binaries..
cheers
Does segfault happened when you run executable om the same box where you build it or on another one?
If another, do they have different glibc versions?
alright folks , thanks to everybody who so far tried to help out
i decided to go for the simple and easy way which is leaving everything as is until i refresh my box with a new distro
(which already is due for a long time)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.