Questions tagged [ld]

These questions are about ld: a dynamic linker/loader which combines object files, archive files and shared libraries before the final compilation of a program.

Filter by
Sorted by
Tagged with
1
vote
0answers
22 views

Which library is producing this error: undefined reference to `TIFFTileRowSize@LIBTIFF_4.0'?

I'm building Ignition (https://ignitionrobotics.org/home) from source on Ubuntu 18.04.5 with gcc-10.1.0, and it seems that some dependencies are missing or have wrong versions. Here are linker errors ...
0
votes
0answers
49 views

Make error: DSO missing from command line when installing YOLOV4

I am trying to install YOLOV4 in Linux and when I run make.I get this error: lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line. Maybe the problem is related the ...
1
vote
0answers
26 views

Linking an assembly program

I'm trying to compile and link an assembly program. assembly file (main.asm): .section .text .global main main: mov $msg, %rdi call printf xor %rax, %rax mov $80, %rdi syscall ...
0
votes
1answer
235 views

CentOS 8 - /usr/bin/ld: cannot find -lnsl

I am working on a new CentOS 8 server to replace an aging CentOS 6 server. Most everything is working and I am having the primary users test out everything they use the server for. Many errors have ...
-1
votes
1answer
50 views

Trying to compile X Window System and getting errors that I don't know

I have double-checked that I have every dependency to build X and that they are all at the latest version. I'm not even sure where to begin with these errors, so I was hoping someone here could help ...
1
vote
0answers
91 views

Is it possible to use lazy dynamic linking on Linux?

On UNIX, I may use a commandline like: cc -o executable *.o -zlazyload -lsomelib with the result that the libraries listed to the right of -zlazyload are marked with the LAZYLOAD ELF tag in the ...
-4
votes
2answers
178 views

What is the linker and what is the loader in dynamic linking?

CSAPP (3ed) says in p733 that 7.9 Loading Executable Object Files To run an executable object file prog, we can type its name to the Linux shell’s command line: linux> ./prog Since prog does not ...
-1
votes
1answer
58 views

Does `dlopen()` performs dynamic linking by invoking dynamic linker `ld-linux.so`?

CSAPP says Linux systems provide a simple interface to the dynamic linker that allows application programs to load and link shared libraries at run time. #include <dlfcn.h> void *dlopen(const ...
0
votes
1answer
283 views

dnf broken by installation - how does /usr/lib64 get on the search path and why isn't it earlier?

After installing the an RPM on centos8 I found that the package manager dnf - inexplicably stopped working with a cryptic error: Traceback (most recent call last): File "/usr/lib64/python3.6/site-...
0
votes
0answers
26 views

Why xdg-open can't load lib from LD_PRELOAD from .desktop?

I has /usr/share/applications/wfica.desktop, which contains: Exec=env LD_PRELOAD="/lib64/libcrypto.so.1.0.2o" /opt/Citrix/ICAClient/wfica -icaroot /opt/Citrix/ICAClient %f When I run that ...
0
votes
0answers
28 views

vlc's so not found (ld -laxvlc -llibvlc -llibvlccore -lnpvlc) not found

I am trying to build a Qt web app, but it is giving me linking error for certain VLC libraries /usr/bin/ld: cannot find -laxvlc /usr/bin/ld: cannot find -llibvlc /usr/bin/ld: cannot find -llibvlccore /...
1
vote
1answer
31 views

pyspotify compilation ld error

I'm trying to install mopidy-spotify on my freebox delta that allow me to install vm and is arm64 based After many problems, i've manage to get most of the dependencies working and to get rid of most ...
0
votes
0answers
66 views

ld :cannot find -l<something>, but ld -l<something> --verbose finds it

I am trying to build a qmake project. In the .pro file I specify -lhello. It exists in /usr/lib/x86_64-linux-gnu and I have added the associated -L flag to specify its location. I am still getting ...
1
vote
1answer
212 views

What mandates the _start entrypoint (kernel, ld-linux.so, etc.)?

I know that ELF executable files need to have a visible _start subroutine where the execution begins. However, from what I can understand, the Kernel actually calls in ld-linux.so (or some other ...
1
vote
2answers
32 views

How to use gcc dynamic linker

test.c: #include <stdio.h> int main(){ return printf("helloworld %d",a); } lib.c: int a=0; test.c is using the variable a from lib.c. I turned it into the shared library lib.so. gcc ...
3
votes
1answer
209 views

ld linker ignores LD_LIBRARY_PATH

I'm having trouble linking the Intel MKL libraries to use in building Julia with MKL support. I've had this problem with other projects as well, but here I'll focus on Julia. I have MKL installed in /...
1
vote
0answers
91 views

ldconfig creating links with strange names after patching libraries with patchelf?

I am patching several libraries on my development server to remove unneeded dependencies using the patchelf tool. These get packaged into an RPM and installed on my runtime system. After the install, ...
0
votes
0answers
922 views

Why gdb can't find my shared object library?

Please IGNORE my post. I must have been the 1000000th person to discover that gdb resets LD_LIBRARY_PATH. Sorry if you have wasted some of your time! For the record, the solution is not to say ...
0
votes
2answers
192 views

Operation not permitted - libwine.so.1

I run Fedora 30 on my laptop. Yesterday I tried to install wine using the following commands: $ sudo dnf config-manager --add-repo https://dl.winehq.org/wine-builds/fedora/30/winehq.repo $ sudo dnf -...
0
votes
1answer
403 views

Cannot execute ld : error 126

I have f30 installed 3 weeks and I keep seeing this error when I try to compile C++ of maybe fortran code. It is an error connected to ld : error: ld returned 126 exit status I've tried to look into ...
1
vote
1answer
4k views

Make error: DSO missing from command line

I am attempting to install rejoystick, and when I run make, I get this: Making all in src make[1]: Entering directory '/home/chrx/Downloads/joystick/rejoystick-0.8.1/src' make[2]: Entering directory '...
1
vote
0answers
83 views

ld can't find MKL library after adding it to ld.so.conf.d

I'm trying to link a a library, libmkl_rt.so, while compiling Julia in Fedora 30. The library is located in /opt/intel/compilers_and_libraries_2019.4.243/linux/mkl/lib/intel64_lin/. Running ld -...
4
votes
3answers
680 views

Compile program in GNU GuixSD with cmake

I am trying to compile Xash3D on GuixSD v1.0.0 and gcc 8.3.0. As is shown below, ld (GNU Linker) is giving me errors, that ctr1.o and ctri.o are missing. These files exist elsewhere under multiple ...
0
votes
1answer
144 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
99 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 ...
1
vote
1answer
447 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
280 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
680 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
870 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
984 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: ...
3
votes
2answers
14k 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
210 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
319 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 ...
2
votes
1answer
2k 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/...
3
votes
1answer
2k 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
1k 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/...
9
votes
2answers
6k 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 ...
2
votes
1answer
3k 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
5k 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
73 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 ...
4
votes
1answer
2k 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
226 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
830 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
90 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
2k 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 ...
5
votes
1answer
3k 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 -...
4
votes
1answer
1k 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@...
7
votes
4answers
3k 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
1k 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 ...