Including AppImage info only for system info purposes as FreeCAD-Daily will not start at the moment but suspect it will on next update. I have successfuly compiled the code after set LDLIBRARYPATH to /usr/lib/x8664-linux-gnu and added -fPIC flag to -cc. It seems to appears only to build a shared library on Linux. Youll have to look and see what Qthreads is using to create that archive. K/N relocation RX8664PC32 cannot be used against symbol environ recompile with -fPIC. usr/bin/ld: final link failed: bad valueĬollect2: error: ld returned 1 exit status I have solved the same error for compiling FFMpeg 2.3.3 sources at Ubuntu 14.04 LTS. The ultimate answer is going to depend on the makefiles in question but using make CFLAGS-fPIC might work as might MYCFLAGS or any of a number of other such variables. does not make any assumptions about where. In brief, the term position independent code (PIC) refers to the generated machine code which is memory address agnostic, i.e. To learn what does this flag do and why you need it in this case, see Code Generation Options of the GCC manual. usr/bin/ld: /usr/local/lib/libpython3.8.a(abstract.o): relocation R_X86_64_PC32 against symbol `PyObject_SetItem' can not be used when making a shared object recompile with -fPIC Do what the compiler tells you to do, i.e. I think the following CMake article is relevant:īut I am not sure what I need to do.Code: Select all Building CXX object src/Base/CMakeFiles/FreeCADBase.dir/_/zipios++/ usr/bin/ld: final link failed: Nonrepresentable section on outputĬollect2: error: ld returned 1 exit status Short structures and unions are those whose size and alignment match that of some integer type. Also using make VERBOSE1 with cmake generated makefile builds is quite helpful when debugging builds. The precise convention for returning structures in memory depends on the target configuration macros. By the way, you should add the -fPIC flag to your build in a more permanent way in the cmake configure step rather in this transient way overriding CXXFLAGS when running make. Many configure tools check whether the compiler supports the -fPIC flag or. But when I try to do so I get error: /usr/bin/ld: ,snip>/SystemC/rel-2.3.3/圆4-linux/_release/libsystemc.a(instance_specific_): relocation R_X86_64_32 against symbol `_ZGVZN9tlm_utils42instance_specific_extension_container_pool8instanceEvE4inst' can not be used when making a PIE object recompile with -fPIC GCC-compiled files and files compiled with other compilers, particularly the Portable C Compiler (pcc). when making a shared object recompile with -fPIC. With -fPIC, that call goes through the PLT with -fPIE, it's a direct call. mcurran Re: ERROR shared object recompile with -fPIC by mcurran » Tue 2:33 am Yeah, sorry, I forgot to post my fix. The only code generation difference between -fPIC and -fPIE for the code shown is in the call from subfunc to subsubfunc. Link everything into a ycmcorebenchmarks executable. I can confirm my steps above work in Debian testing, with no extra gymnastics. Compile Boost.Filesystem and Boost.Regex into libBoostParts.a (static library with -fPIC) Compile ycmcore.so, which is the C++ part of the project (dynamic library with -fPIC) Compile libbenchmark.a - the google benchmark library. Share Improve this answer Follow answered at 18:02 Etan Reisner 76. As the text says, you need to recompile your FFmpeg/libavcodec/libavformat with pic enabled. You'll have to look and see what Qthreads is using to create that archive. Some architectures enforces this as a hard rule while for others it is optional. The ultimate answer is going to depend on the makefiles in question but using make CFLAGS-fPIC might work as might MYCFLAGS or any of a number of other such variables. I also need to link my application to the same library, on Ubuntu 18.04. fPIC stands for position independent code. I can successfully link my C++ application to that library, on the same platform. I have built the 3rd party Accellera SystemC library using CMake on Centos 7 with devtoolset-7.
0 Comments
Leave a Reply. |