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
0
votes
1answer
33 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
15 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
19 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
19 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
33 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
69 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
29 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 ...
0
votes
0answers
30 views

Determine what sets my LD_LIBRARY_PATH

I'm logging in to a remote machine using ssh. When I log in, my environment has: LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/openmpi/lib64 which I do not want to have. Unfortunately, I can't figure out where ...
0
votes
0answers
174 views

Problem using ./ld-linux-x86-64.so.2 with newer glibc

I recently compiled a glibc newer than the one I keep on my system, with the purpose of running a pre compiled binary. When I try to run it with: ./ld-linux-x86-64.so.2 /media/34GB/Arquivos-de-...
3
votes
1answer
160 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
68 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
441 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
125 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
282 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
3k 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
56 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
590 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
90 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 ...
1
vote
0answers
82 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
375 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
262 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
554 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
603 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
866 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
12k 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
179 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
238 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
1k 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
1k 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
899 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/...
6
votes
2answers
4k 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
2k 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
4k 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
69 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 ...
3
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
189 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
714 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
88 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 ...
4
votes
1answer
2k 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@...
5
votes
4answers
2k 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 ...
16
votes
1answer
9k 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
121 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 ...
4
votes
0answers
199 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
1k 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....
9
votes
1answer
3k 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?
11
votes
1answer
33k 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 ...