fpic Questions
8
Solved
I was trying to reinstall my ffmpeg, following this guide, on my ARM Ubuntu machine. Unfortunately, when I compile a program which uses this lib I get the following failure:
/usr/bin/ld: /usr/loca...
Proulx asked 11/12, 2012 at 1:23
7
How can I tell, with something like objdump, if an object file has been built with -fPIC?
Collin asked 27/8, 2009 at 11:15
5
Solved
I have some doubt about how do programs use shared library.
When I build a shared library ( with -shared -fPIC switches) I make some functions available from an external program.
Usually I do a dlo...
Exosphere asked 24/7, 2009 at 8:36
1
I am working on embedded Linux environment. I have a set of shared libraries in binary format (I don't have the source code and Makefile) and I want to check whether they have been compiled with -f...
Cazzie asked 25/12, 2012 at 16:17
2
I'm building a gst-plugin through yocto 1.6. I've linaro 4.9 cross toolchain of 32 and 64-bit.
When I'm building the plugin using 64-bit toolchain, it was success ( I got the plugin .so file) where...
7
I get this error when I do the make:
relocation R_X86_64_32 against `vtable for Torch::MemoryDataSet' can not be used
when making a shared object; recompile with -fPIC
It says that I should rec...
1
Solved
I have one interesting compilation problem.
At first, please see code to be compiled.
$ ls
Makefile main.c sub.c sub.h
$ gcc -v
...
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
## Makefi...
Cymbal asked 7/12, 2017 at 12:40
2
I'm trying to install GHC with -fPIC support in Fedora.
I've grabbed a source tarball since it seems no binary one has this.
In Build.mk i've changed the quick build type to
ifeq "$(BuildFlavour)...
Rolandorolandson asked 4/10, 2011 at 19:2
1
Solved
Consider this code:
// foo.cxx
int last;
int next() {
return ++last;
}
int index(int scale) {
return next() << scale;
}
When compiling with gcc 7.2:
$ g++ -std=c++11 -O3 -fPIC
This ...
2
Solved
I've already read the gcc manpage, but I still can't understand the difference between -fpic and -fPIC. Can someone explain it, in a very simple and clear way?
Related questions:
What does -fP...
2
Solved
We are catching errors in our CMake makefiles due to lack of -fPIC. Her's one from a ci20 MIPS dev-board:
...
[ 92%] Built target cryptopp-object
Scanning dependencies of target cryptopp-shared
Sc...
1
Solved
I'm trying to create a static library with -fPIC specified.
add_library(cpp-netlib_pic
STATIC
${SRCS})
set_property(TARGET cpp-netlib_pic PROPERTY POSITION_INDEPENDENT_CODE)
This doesn't...
5
Solved
I have read about GCC's Options for Code Generation Conventions, but could not understand what "Generate position-independent code (PIC)" does. Please give an example to explain me what does it mea...
1
I have a bunch of static libraries in my hand, which all have two versions -- 32bit and 64bit.
When I use these static libraries to compile into a shared library, weird things
happened:
1. I use...
Pithecanthropus asked 14/9, 2015 at 9:6
2
Solved
I read this post on PIC and it seems that it always be good to use PIC (whenever it is exe / static / share llibrary).
So what are the disadvantages?
Are there examples elaborating when not ...
1
Solved
I am trying to compile a shared library in Linux using a Makefile created with Cmake, but running make I obtain the following error:
Linking CXX shared library libcpp-lib.so
/usr/bin/ld: /home/d...
Ricarda asked 24/10, 2014 at 13:43
2
I am building a project which has relocatable code on bare metal. It is a Cortex M3 embedded application. I do not have a dynamic linker and have implemented all the relocations in my startup code....
Hypoblast asked 23/2, 2011 at 16:36
3
Solved
I recently received a:
...relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
error while trying to compile a program as a shared ...
Scraggly asked 27/8, 2011 at 17:45
1
Solved
I would like to create a shared library with gfortran, linking it with the static version of libgfortran for portability reasons. Unfortunately, I don't manage to link the different objects appropr...
Haruspicy asked 20/10, 2012 at 14:20
3
Solved
At least on Linux and Solaris, static libraries are really just a bunch of compiled .o's tossed into one big file. When compiling a static library, usually the -fpic flag is ommited, so the generat...
Stigmasterol asked 19/10, 2009 at 17:21
2
Solved
I made a piece of code which consists in a dynamic library (lib.c), and a main executable (main.c).
In both files I define a global variable named: int global.
Not very smart but it's not the quest...
Goddess asked 4/9, 2011 at 8:52
1
Solved
Is there any way to check if an object file(.o file) is PIC-enabled?
Agonistic asked 5/5, 2011 at 9:24
1
Solved
I have a project where I have one static library libhelper.a and another with my actual shared object library, libtestlib.so. My goal is to link libhelper.a into libtestlib.so. Is that possible on ...
Kiushu asked 25/3, 2011 at 22:44
2
Solved
I have an embedded application which will have a bootloader which will decide to run 1 of two applications directly from internal flash. I am trying to make these apps position independent so that ...
2
Solved
I am getting a linking error when compiling the numpy library against lapack indicating I need to compile lapack with -fPIC. I thought I had done just that. Is there a way to determine that the pro...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.