Questions tagged [static-linking]
The static-linking tag has no summary.
48 questions
1
vote
1
answer
107
views
How do I build a statically linked copy of xz-utils?
I'm trying to build a statically linked copy of xz-utils, such that the xz do not have dependencies on libc.
I tried the usual way, which is to set LDFLAGS=-static, and works for most other packages ...
1
vote
0
answers
56
views
What is the difference between the ELF Visibility Values STV_INTERNAL and STV_HIDDEN?
I was trying to understand Visibility values in ELF file , and I couldn't Understand the difference between STV_HIDDEN and STV_INTERNAL .
After some reseach I found that this may be related to how ...
0
votes
1
answer
108
views
Compiling old packages with outdated libraries for modern distros for preservation and archival purposes
I want to compile old (2005-2012) commits of an app, the app in question uses outdated libraries that no longer exist in modern distros, for example Qt3/Qt4 and ancient OpenSSL. I was successfully ...
1
vote
0
answers
62
views
Process is not running in real-time priority
I have a Fortran based application that is running fine and it provides the correct results when I run it normally (i.e ./myapp); however, when I tried to run it with real-time priority it gives the ...
1
vote
0
answers
109
views
Why does ldd behave differently on the ldconfig binary?
When we run ldd on some file, there are two possible results:
If the file is dynamic executable, the shared dependencies are shown, for example:
# ldd /usr/bin/sleep
linux-vdso.so.1 (...
0
votes
1
answer
1k
views
Build statically linked binary on gentoo
I'm looking for a way to build a fully statically linked binary on Gentoo.
The build system is Meson. I tries --prefer-static and --default_library=static with no success.
A possible obstacle is that ...
-4
votes
1
answer
756
views
Why is my static IP address not set to what I made it in the /etc/sysconfig/network-scripts/ifcfg-enp0s3 file?
I have made the following changes to /network-scripts/ifcfg-enp0s3 file in order to try and get a static IP address (added ip i want ending in .49, added gateway, Prefix and Subnet mask (
1: https://...
1
vote
1
answer
716
views
Qt statically linked application error: linuxfb plugin not found by the application
I have successfully developed a graphical Qt 5.15.2 application using Qt Creator with dynamically linked libraries. For various reasons I have determined static linking would be better for my ...
0
votes
2
answers
160
views
Could I make an embedded program faster by statically linking it to the Linux kernel
This is probably a silly question, but is it possible to statically compile a C program along with an init system and the Linux kernel to make an embedded application? If so, is it a good idea?
39
votes
3
answers
16k
views
Do C compilers discard unused functions when statically linking to .a file?
Say I have a C program main.c that statically links to libmine.a. Statically linking to a library causes library functions to be embedded into the main executable at compile time.
If libmine.a were to ...
0
votes
1
answer
1k
views
apt packages - static vs dynamic libraries
I use Ubuntu 18.04. I install libraries using apt, for example:
sudo apt install freeglut3-dev
Does apt always install dynamic libraries or I can determine if a package contains static or dynamic ...
6
votes
1
answer
5k
views
create an statically linked executable from a dynamically linked executable and its dependencies
Take cat as an example, if I do ldd $(which cat), it shows
linux-vdso.so.1 (0x00007fff8afbb000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb3102dd000)
/lib64/ld-linux-x86-64.so.2 (...
2
votes
1
answer
1k
views
How to write a file PkgConfig.pc file that supports both static and shared linking
I am writing a little library as a self challenge. I plan to target Linux based systems.
I want to add a libname.pc file so as to add support for PkgConfig.
Here, is my current file:
prefix=/usr/local
...
2
votes
1
answer
3k
views
How to compile a program statically on NixOS?
I'm trying to compile a simple program into a static executable:
$ cat hello.c
#include <stdio.h>
int main() {
puts("Hello, world!");
}
However, I'm met with the following error:
$...
0
votes
0
answers
346
views
How to debug a cpp file that's part of a so file in the software?
So I have this software which has multiple .so files. For one of the so file and I made some changes to the code but I want to see the line by line execution of file present in the so file.
Just to ...