On linux, cannot create shared library (.so) with IMRSDK

On linux, cannot create shared library (.so) with IMRSDK



With linux AMT SDK, there is a problem linking with static library libimrsdk*.a when creating a shared library (.so) that use the AMT SDK !!!
The linker provide the following error:

relocation R_X86_64_PC32 against symbol 'g_lock' can not be used when making a shared object. recompile with -fPIC.

NOTE: creating an executable goes fine, but shared library that use the static library cause the above link error...

As far as aI know, the solution for the problem can be recompilation with -fPIC flag,
1) can you please provide libimrsdk*.a static library compiled with -fPIC option ?
2) or provide the IMRSDK source code so i will do that myself ?

It's urgent,

6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

What Linux version are you using?

We develop on Fedora 22.


Hey Ronnie

Is this for x86 or x64 based system? 

We need the static libraries for both systems.


Hi joe,

you have sent me a private mail/message with a respond to the above problem.
this is the message:

Greetings Ronnie S.,
Comment by JOSEPH O. (Intel):
Hey Ronnie
Attached ia a static redirection library compiled on Fedora 22 x86. The library was built using g++ compiler (version 5.3.1) with the flags –fPIC and –fPIE. Note: This is NOT a validated copy
To compile it we used openSSL 1.0.1r and e2fsprogs-devel 1.42.13 so you might need to install them.
See the documentation of how to compile the library in Linux environment. I think that for shared library you will also need to use the –fPIC flag.
Please update me whether you encounter a problem or not, then we will look at doing the library for x64.

Thanks for the reply, but

  1.       I couldn't find any attachment in the mail/message
  2.       Our current version work on fedora 22  x64. So please, can you compile a 64bit version ? (the next version we are going to develop is x86 but it will not be soon).



Leave a Comment

Please sign in to add a comment. Not a member? Join today