Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ld]

The tag has no usage guidance.

0
votes
0answers
16 views

Install libraries needed for cmake in GuixSD

I am trying to compile Xash3D on GuixSD v1.0.0 and gcc 8.3.0. As is shown below, ld is giving me errors, that ctr1.o and ctri.o are missing. These files exist under a different directoy, under /gnu/...
0
votes
1answer
28 views

Is loader for a particular “executable format” configurable in Linux?

This question is in continuation of How does compiler lay out code in memory, which is posted at stack-overflow. I have few questions with respect to ld (GNU) utility available in Linux. Whenever ...
17
votes
1answer
2k views

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

I have a binary executable named "alpha" that requires a linked library (libz.so.1.2.7) which is placed at /home/username/myproduct/lib/libz.so.1.2.7 I export the same to my terminal instance before ...
0
votes
0answers
16 views

GNU Linker Colorization

Compiling code with GCC or Clang can result in some colorful error outputs. Linking code, however, doesn't enjoy the same luxury. It seems like the GNU Linker doesn't support colorized error output ...
0
votes
1answer
116 views

How to install libpq.so.4.x on Debian 9

I try to compil from source PHP5.3.29 on Debian 9. The make command stopped in error at this step LDFLAGS="-Wl,-rpath=/opt/OpenSSL/openssl-1.0.1u/lib,-rpath=/opt/CURL/curl-7.26.0/lib" make .../... (...
2
votes
1answer
139 views

Can’t run the ownCloud client on Linux Mint 19 Tara (Qt issues)

I have a problem running the ownCloud client on Linux Mint 19 Tara. It doesn’t start. If run from the command line, it gives me these errors: pavel@lenovo ~ $ owncloud owncloud: /usr/lib/x86_64-linux-...
2
votes
2answers
147 views

Different standards of ELF (SysV vs TIS) and Linux?

There are at least two standards of Executable and Linkable Format (ELF), one of them System V Application Binary Interface AMD64 Architecture Processor Supplement (With LP64 and ILP32 Programming ...
4
votes
1answer
134 views

How to prevent a process from writing to the systemd journal?

I am using a third party .NET Core application (a binary distribution used by a VS Code extension) that unfortunately has diagnostic logging enabled with no apparent way to disable it (I did already ...
0
votes
1answer
286 views

Linking with GCC doesn't detect -fPIC flag

I am trying to link some files. Here is my command: gcc -T linker.ld -o Stack\ Berry.bin -ffreestanding -O2 -nostlib kernel.o boot.o -fPIC -lgcc How ever, I get this error: /usr/bin/ld: boot.o: ...
1
vote
2answers
3k views

How to link to a shared library with a relative path?

In the man page for ld.so(8), it says that When resolving library dependencies, the dynamic linker first inspects each dependency string to see if it contains a slash (this can occur if a library ...
2
votes
0answers
81 views

Charm crypto library - unit tests failing with undefined symbol: BN_is_negative

I'm trying to build and test the python Charm crypto library from source. It compiles and installs ok, but I get 91 cases of undefined symbol: BN_is_negative when running sudo make test: /charm/charm/...
0
votes
1answer
64 views

Filter out command line options before passing to a program

I am running cmake and it is passing a flag to my linker that is unrecognized (-rdynamic), and it's causing an error. I cannot figure out where it is getting this flag from, so I want to just filter ...
1
vote
1answer
391 views

What does “unused direct dependencies” mean?

When using the ldd command there is an option, -u, to print unused direct dependencies as stated in the on-line help. For example: ldd -u /bin/gcc Unused direct dependencies: /lib64/...
2
votes
1answer
309 views

What are difference between the ELF symbol visibility levels?

The NASM docs on "elf Extensions to the GLOBAL Directive" say, Optionally, you can control the ELF visibility of the symbol. Just add one of the visibility keywords: default, internal, hidden, or ...
0
votes
1answer
306 views

Running a custom-compiled executable returns “No such file or directory”

I have an executable but when I run it I get "No such file or directory" $ chmod a+x bin $ file bin bin: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/...
4
votes
2answers
726 views

What is the difference between “LSB executable” (ET_EXEC) and “LSB shared object” (ET_DYN)?

With two files, one compiled and linked with gcc and the other manually with nasm and ld I get ELF 32-bit LSB shared object ... ELF 32-bit LSB executable ... What's the difference between these two ...
0
votes
1answer
575 views

GNU Linker differences between the different 32bit emulation modes?

What is the difference between the 386 and 32 bit options in ld -V? elf32_x86_64 elf_i386 i386linux i386pep i386pe And, where can I find the documentation on these "emulation modes"
0
votes
1answer
644 views

How to run programs with ld-linux.so?

The dynamic linker can be run either indirectly by running some dynamically linked program or shared object (in which case no command-line options to the dynamic linker can be passed and, in the ELF ...
0
votes
1answer
59 views

Looking for a workaround to a GNU linker bug

Since a while (probably 12 years), the GNU linker includes support for linker map files for versioned shared libraries as introduced by Sun in 1993. Unfortunately, the GNU linker rejects correct ...
0
votes
1answer
328 views

Are there any circumstances in which ld ignores LD_LIBRARY_PATH?

I've just come across a little problem with ld which I just can't explain. Let's say I have compiled a library in my home directory and installed it all under ~/root. The shared library file can be ...
-1
votes
2answers
96 views

Getting strange LD_PRELOAD errors and missing include files - is my distro busted?

For the past half-day or so, I've been having at least the following problems: I get errors about missing LD_PRELOAD entries: My LD_PRELOAD contains /lib64/libstdc++.so.6 (not sure if that makes ...
2
votes
1answer
273 views

De-prioritize ld.conf.so.d library path resolution

From a separate question, and other articles on the subject, it appears that additional library paths defined by ld.so.conf.d will always be resolved (i.e. in the case of a name clash, such as when ...
0
votes
0answers
62 views

Cannot install GCC ld error not using custom prefix when loading lto-wrapper

I am trying to install GCC 4.9.4 in a non-standard location on Red Hat Linux using the documentation provided. https://gcc.gnu.org/install/ I do not have sudo, but I have write access to the folder /...
2
votes
2answers
652 views

How to investigate and fix missing libraries and/or skipping incompatible library?

I have one secret library built for CentOS 6.5 as a package. I can't build package for CentOS 7.4, make install fails on this line: $ gcc -static -O3 -Wno-long-long -funroll-loops -Wall -g -DLINUX ...
2
votes
1answer
1k views

Fedora 27 /usr/bin/ld: cannot find -lstdc++

I have Fedora 27. I am building something from source. (It is https://github.com/xmrig/xmrig-nvidia if that matters). Make gets to linking and then fails with this message: /usr/bin/ld: cannot find -...
2
votes
1answer
640 views

undefined reference, even when the linked library does exist

I'm trying to compile VTK from source and I received the following error. I'm running Fedora 27, kernel version 4.14.11-300.fc27.x86_64 /usr/lib64/libSM.so: undefined reference to `uuid_generate@...
4
votes
4answers
1k views

Overwriting a running executable or .so

I have a question about overwriting a running executable, or overwriting a shared library (.so) file that's in use by one or more running programs. Back in the day, for the obvious reasons, ...
0
votes
0answers
893 views

binary can't find specific library, but can find others in the same directory

I have a binary that I can compile with either clang or gcc, and the directory for the application is something like this: /app root dir /bin /<application> /lib /<application ...
15
votes
1answer
5k views

Is it normal that LD_LIBRARY_PATH variable is missing from an environment?

I have found by coincidence that on my Debian Jessie there is no LD_LIBRARY_PATH variable (to be exact printenv | grep LD shows nothing related to linker and echo "$LD_LIBRARY_PATH" shows also nothing)...
1
vote
1answer
77 views

LD option for deterministic loading of program and shared objects?

I'm working on an unusual problem on a BeagleBone Black. The "unusual" part is stepping under the debug causes a SIGILL that was not formerly present. Addresses are moving around between runs due to ...
5
votes
0answers
98 views

How to Run ld in Script with A Smaller Memory Footprint?

I'm trying to build Swift 3 on FreeBSD. The last thing I need to do is run the build-script. My problem is that at some point the script runs: Linking CXX executable bin/llvm-lto Which ...
2
votes
2answers
658 views

ldconfig cannot link to specific files

I installed ATLAS (with Netlib LAPACK) in a Docker image, and now every time I run ldconfig, I get the following errors: ldconfig: Can't link /usr/local/lib//usr/local/lib/libtatlas.so to libtatlas....
8
votes
1answer
2k views

Difference between 'ld' and 'ld.so'?

While both are called "linker" and are used to link binaries, I can't really figure out how they differ from each other. Can anyone tell me their differences?
8
votes
1answer
20k views

What is the default value of LD_LIBRARY_PATH? [duplicate]

In my case, it seems as if LD_LIBRARY_PATH is set to the empty string. But all standard system tools still work fine, so I guess the dynamic linker checks for that case and uses some default for ...
3
votes
2answers
1k views

Cannot find shared object file even though it's in library path

I am trying to install plexmediaplayer from source. This involves compiling libmpv.so.1 which I've done and installed under /usr/local/lib When I run plexmediaplayer, I get the following error: $ ...
7
votes
1answer
9k views

Where to get “/etc/ld.so.nohwcap” file from? [duplicate]

When I run a command through strace utility I can see access errors such as access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) Now I've read somewhere that what's ...
3
votes
0answers
2k views

ld cannot find existing library

I'm trying to build a large application, yet for some reason linking fails and ld responds /usr/bin/ld: cannot find -l/usr/lib/x86_64-linux-gnu/libX11.so Steps I've tried: libx11-dev is correctly ...
1
vote
1answer
413 views

Cannot chroot bash after setting RUNPATH in ld-linux-x86-64.so.2 with patchelf 0.6 and 0.8

I am testing how dynamic linking works with RUNPATH variable, and trying to run bash in a minimal chroot directory: $ find dir_chroot/ -type f dir_chroot/bin/bash dir_chroot/lib/x86_64-linux-gnu/libc....
4
votes
0answers
337 views

Why ldd doesn't show filename paths for dependencies?

I'm experimenting with ELF RUNPATH variable for dynamic dependencies. Along the way I got a copy of bash binary with changed RUNPATH, running ldd on it returns: $ ldd ./bash linux-vdso.so.1 =>...
2
votes
2answers
218 views

redirect application listening on localhost to listening on external interface / alternative to bindp ( libindp.so )

imagine a server application that listens on localhost only, that has no settings to listen on other interfaces one wants to force make it listen on other interfaces such as eth0 bindp (libindp.so) ...
1
vote
1answer
78 views

Script started by daemon cannot not find shared library

I am extending snmpd with the extend directive to call some scripts for some OIDs. The script itself calls a custom helper program that gets extracts some value. The helper runs fine when it is ...
0
votes
1answer
2k views

How can I build my shared library (.so) so that symbols from a different shared library are also included? [closed]

My shared library libnew.so uses some symbols form an already built third-party shared library libold.so. I would like to build an executable binary file that should be only linked against libnew.so. ...
2
votes
1answer
2k views

How to Resolve undefined reference to 'RAND_egd'

Debian 8 Jessie, OpenSSL version 1.1.0, cURL version: 7.50.2 I am trying to build curl on a Linux Debian system. All stages go well up until trying to build with make command. The linking stage fails ...
2
votes
1answer
4k views

ld can't find .so

I installed zeromq 3.2.5 from source $ wget http://download.zeromq.org/zeromq-3.2.5.tar.gz $ tar xf zeromq-3.2.5.tar.gz $ cd zeromq-3.2.5 $ ./configure && make -j4 $ sudo make install This ...
0
votes
1answer
1k views

Force linker to find stdc++ library in non-standard directory

I've read a lot of guidance that says the LD_LIBRARY_PATH is searched before anything else, but one of my .so libraries is linking with libtdc++.so.6 in /usr/lib64. ldd mylib.so: ... libstdc++.so.6 =&...
12
votes
3answers
25k views

Find out if library is in path

Assuming I want to test if a library is installed and usable by a program. I can use ldconfig -p | grep mylib to find out if it's installed on the system. but what if the library is only known via ...
4
votes
2answers
639 views

stdbuf supposed behavior for subprocesses

I didn't exactly find something about the following in the man-page. How is the supposed behavior in subprocesses spawned by a process which was itself spawned by stdbuf? E.g.: stdbuf -oL myprog ...
4
votes
3answers
28k views

ldd don't find path, How to add

i know this question isn't very new but it seems as if i didn't be able to fix my problem on myself. ldd generate the following output u123@PC-Ubuntu:~$ ldd /home/u123/Programme/TestPr/Debug/TestPr ...
1
vote
0answers
155 views

prelink - weird massive modification after installing zabbix-agent

I thought I knew something about prelink, but I ran into weirdest issue yesterday. I know I shouldn't use prelink, but I've noticed it is enabled on one of CentOS 6 systems under my administration ...
0
votes
1answer
985 views

GCC 5.1.0 fails to compile following the LFS guide — pass 2; linking errors?

I'm trying to follow the LFS guide for compiling the GCC 5.1 with binutils 5.25 and glibc 2.21 and the process fails when reaching the "gcc pass 2" step giving me the error: ld: /tools/lib/../lib64/...