Questions tagged [static-linking]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

One NIC, two static IPs for cameras, single gateway not working on Ubuntu 18.04LTS

I don't really know much about networking, so I have this problem with Ubuntu 18.04LTS and two cameras. I have 4 port NIC and 2 cameras with static ip's. The result should be that one lan cable for ...
1
vote
0answers
57 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 ...
0
votes
1answer
315 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
0answers
51 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 ...
0
votes
1answer
144 views

why static libraries use relocatable object files while share libraries use source file?

I was reading a textbook which describes static libraries anad shared libraries. There are two source files, addvec.c and multvec.c, to create a static library of them, we would use the ar tool as ...
3
votes
1answer
469 views

Build a standalone bash

I would like to build standalone bash binaries, which would hopefully work on a good portion of the linux distributions out there. Complete coverage is definitely not a goal. How would I approach this?...
1
vote
1answer
1k views

Where are static libraries used by gcc or g++ stored, and how are they identified?

I've been trying to determine if my Ubuntu (linux) system has -static libraries. When would they be located, and what suffix would identify them?
0
votes
1answer
207 views

Installing gtkmm from source

I know that gtkmm can be installed using package manager, but here I am keen to install it from source. It requires me to install the Dependencies: libsigc++ 2.0 GTK+ 3.0 glibmm cairomm pangomm ...
0
votes
1answer
328 views

Check which library compiled in linux

I want to compile a C file with gcc, to embedded arm that is running Gnu/Linux . How can I known which function/header files that I need to compile statically, and which dynamically?(I don't want to ...
1
vote
1answer
520 views

How to build instance of Emacs to run on an x86_64 system different from the one it was built on?

I want to build the latest version of Emacs (from git.sv.gnu.org) for a CentOS system, but the building must be done on a Debian system1. Both systems run on x86_64 architectures. I've seen ...
2
votes
1answer
4k views

Apache + mod_ssl build not linking to my OpenSSL build

I have spent some time searching online but none of what I found seems to help. I'm running CentOS 6 64bit and would like to compile Apache with mod_ssl and need to link it to my own OpenSSL build (...
1
vote
0answers
90 views

statically link a libtiff tool

I downloaded the latest version of libtiff, made some modifications, and now want to produce a statically-linked version of one of the components, tiffset. I disabled most of the unneeded libraries ...
2
votes
1answer
800 views

Error during static build of libvorbis and libmp3lame

I'm having trouble trying to build a static binary of ffmpeg - I've got almost the whole build working, with the exception of two libs - libvorbis and libmp3lame. These two libs are failing during ./...
1
vote
1answer
9k views

Static linking .so into my executable

I have a .cpp code I wrote, which is written around a commercial software program where they provide a big c++ library class to use. I want to static link their one shared object libtdfdll.so into my ...
1
vote
1answer
1k views

Building “cross linux system” programs, with different libc/musl interpreter

My goal is simple: I would like to create a program that bootstraps the nix package manager on any architecture, as a non-root user, with as few depends as possible. For now, what I did is the ...
1
vote
0answers
55 views

list the link files of a process [duplicate]

Saying that there is a running process named a. Is it possible to list all of the lib files that a needs, including static link files and dynamic link files (.a, .so)?
17
votes
1answer
3k views

What is bash-static used for?

What is the purpose of bash-static compared to regular bash? Is it good as a rescue shell or what is it good for?
1
vote
3answers
433 views

Installed 2 libraries side to side and need both. What solution to avoid linking problems?

I installed two versions of openCV one is openCV3 and another one openCV2.4 on my ubuntu 16.04 machine and need both. However I am now unable to compile C++ code which is intended for openCV3. I get ...
0
votes
1answer
707 views

Unable to login through putty in Centos but able to ping to the VM

I was able to login through putty until I changed the VM configuration to static ipaddress and restarted the network and rebooted the VM I see the sshd service is running as well. I am able to ping ...
3
votes
0answers
426 views

Opening a TUN device from QEmu x86 for ARMv7 fails

On Banana PI-R1 (ARMv7), with qemu-i386-static, I'm trying to execute Barracuda VPN client statically linked for x86. Following this topic works : Running X86 binaries on armv7 But, when the VPN tries ...
0
votes
1answer
8k views

Public static IP only for a Vagrantfile

I modified the Vagrantfile for taiga-vagrant based on VAGRANT DOCS/Public Networks as follows: # -*- mode: ruby -*- # vi: set ft=ruby : require "./source.rb" ROOT_PATH = File.dirname(__FILE__) ...
1
vote
1answer
2k views

Static compilation of wget

I downloaded the source code of wget and tried a static compilation. These are the steps that I followed : ./configure LDFLAGS=-static At the end the output shown is as follows : Version: ...
0
votes
1answer
10k views

Building binary with static objects included

Is it possible to build a binary with dependent .so files included so that the binary can be built once and used on machines with the same hardware and OS, without them having the .so files? For ...
2
votes
1answer
896 views

Types of dynamic linking in Unix/Linux environments

When creating a windows static library, we simply create a .lib file which should be included in the linker path. When creating a windows shared library, along with the .dll, we also a generate a ....
1
vote
1answer
1k views

Getting segmentation faults from inside glib and gobject - I THINK I want to build/statically link against an independant version of glib2

I don't yet fully understand how segfaults and backtraces work, but I get the impression that if the function at the top of the list references "glib" or "gobject", you have Bad Issues(TM) with ...
2
votes
1answer
13k views

Linking a static library when compiling a C program

I'm linking *.a file with *.c file, so I have used the following command: gcc abc.c -l ad.a (here abc is the C source file and ad is the static library file) then after executing the following ...
0
votes
4answers
2k views

Compiling C/C++ code by way of including preprocessor build instructions in an actual C/C++ source file

I've got reasons for not wanting to rely on a specific build system. I don't mean to dis anybody's favorite, but I really just want to stick to what comes with the compiler. In this case, GCC. ...
2
votes
2answers
2k views

how to add curlcpp to the library/include path?

I'm using Arch Linux and have successfully built https://github.com/JosephP91/curlcpp However, I have no idea how to build the example program. I keep getting fatal error: curl_easy.h: No such file ...
8
votes
1answer
1k views

Effect of static and dynamic linking on start address

I have a simple C program. I run: $ gcc Q1.c -Wall -save-temps -o Q1 Then I inspect the executable generated: $ objdump -f Q1 Q1: file format elf32-i386 architecture: i386, flags 0x00000112: ...
2
votes
1answer
254 views

How to link different (incompatible) libraries at runtime depending on program?

I have a number of legacy codes that need to be compiled with specific (and often conflicting) libraries. To be specific I have a program which can only be compiled with g77 and another program which ...
5
votes
1answer
7k views

Why can't ld find this library?

I'm not very knowledgeable on this topic, and therefore can't figure out why the following command does not work: $ gfortran -o dsimpletest -O dsimpletest.o ../lib/libdmumps.a \ ../lib/...
2
votes
1answer
3k views

Linker errors when compiling against glib…?

I'm having trouble compiling a simple, sample program against glib on Ubunutu. I get these errors. I can get it to compile but not link with the -c flag. Which I believe means I have the glib ...
8
votes
2answers
11k views

How can I get a static C compiler?

I'm playing around with chroot environments, and I'd like to have a portable C compiler so that I can easily set up some basic build-tools in each environment without having to move too many libraries ...
2
votes
1answer
853 views

How does prelink work

I was wondering how prelinking works. If I prelink my whole system and than delete glibc, will the system 'get up' after restart?
16
votes
3answers
14k views

Creating Static Binary

I installed an application [ e.g. fdisk ]. But it required libraries for execution. I am looking for utility/tool which will help me to create a static binary from already installed binaries. So that ...
3
votes
2answers
1k views

Linux static compilation issue

I am building testdisk as static and run make static it returns the following error /usr/bin/ld: cannot find -luuid collect2: ld returned 1 exit status What's the problem? In the makefile I have ...