Questions tagged [static-linking]

14 questions
5
votes
0 answers

How can I get glibc as a static library?

I want to compile a program and statically link it to glibc, so it can run on other Linux distributions without the user having to do any special configuration. I tried using CFLAGS="-static -static-libgcc", but it statically links against all other…
airsquared
  • 151
  • 1
  • 5
5
votes
0 answers

hidden symbol `pthread_atfork' in /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a(pthread_atfork.oS) is referenced by DSO

I am trying to compile a large project, it includes a library: SAMG/ifort64.9.1.041-emt64/lib/libguide.so when I try to make project, there is an error message: hidden symbol `pthread_atfork' in…
3
votes
1 answer

What are dynamic and static linking?

I hear the terms "Dynamically linked" and "Statically linked" tossed around in regards to packaging, and I have never been clear on what these terms actually mean. What are dynamic and static linking?
Anon
  • 11,863
  • 22
  • 66
  • 122
2
votes
1 answer

Problem with linking with lapack

I have a problem with lapack on my new ubuntu machine (edit: Ubuntu 20.04.5 LTS). I installed liblapack-dev and libblas-dev using apt-get. I used a following code which works normally on different machine. #include #include /*…
T. Skora
  • 23
  • 4
2
votes
1 answer

Where is the static version of libudev?

Because I want my binaries to run on older distributions, I decided to build a statically linked binary. My application depends on libhid-hidraw and through that, on libudev. I have the development packages installed: sudo apt install libudev-dev…
Bram
  • 2,169
  • 24
  • 42
2
votes
1 answer

gcc static linking tries/fails to find libgcc_s.a

My C++ application works fine with default dynamic linking, but... I'm trying to statically link all libraries to the application as unfortunately users cannot seem to install appropriate libraries (or more precisely their ISPs won't on servers in…
Dave Nadler
  • 121
  • 3
1
vote
0 answers

squeak: could not find any display driver

I am building the vm for squeak on Ubuntu 14.04 32-bit. It is failing to call entry points to libraries, whether these libraries are statically linked or loaded or not loaded. I have been doing some research through other questions and found 4…
1
vote
0 answers

Custom --prefix directory when building an Ubuntu package?

I am trying to build nano package in focal fossa: sudo apt-get build-dep nano export CFLAGS=-static export LDFLAGS=-static export CPPFLAGS=-static export CFLAGS_APPEND=-static export LDFLAGS_APPEND=-static export CPPFLAGS_APPEND=-static export…
1
vote
1 answer

Is it possible to install static libraries from apt in 18.04 x86_64?

I'm trying to build a project that depends on binary distributed static libraries. The linker complains it cannot find ini_config functions, among others: config_params.c:(.text+0x16f): undefined reference to `ini_get_config_valueobj' It finds…
stamm
  • 51
  • 1
  • 4
0
votes
1 answer

Gcc does not link libraries

I'm trying to compile a program in the terminal using gcc. I'm kind of new to do this so I'm making some experiments with link various libraries. However some are working and some aren't and I wonder why and what can I do to fix this. Here's a…
0
votes
0 answers

Where to find .a or Static library files

I have been trying to build a cmake file. In this cmake file couple of static files are being searched with extension .a . I can see .so.0 files with same name. Although folder location seems to be different. Does anyone know how to find these kind…
0
votes
0 answers

How to you compile glibc (32-bit and 64-bit)?

I have a program that is being shipped out for multiple Linux platforms and requires all of the references to be compiled within the executable itself. I've gather that they would need to be compiled, the *.a library placed in a folder within the…
0
votes
0 answers

installing multilib still doesn't resolve -ltinfo when attempting to build a 32-bit binary with -lcurses

Trying to build a 32-bit app on kubuntu 18.04. I've got it to the point where I can use -m32 to compile my code in 32-bit mode, and am able to build a trivial app (once I installed multilibs). But now I'm trying to build an app that uses -lcurses,…
0
votes
1 answer

./a.out fails to load

I am trying to execute a C program via gcc compiler on ubuntu 18.04 In a folder named 'gsl', I have extracted the gsl.tar file. This is also the folder where I save all my ' '.c programs written in gedit. When to trying to execute the following via…
kedarb
  • 75
  • 1
  • 12