Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
19 Views

Error in sample example with the use of "-rdynamic" option in gcc.

Hi,

I was trying out sample example with following setting in gcc.

g++ -ggdb -rdynamic  -o $(EXEC) $(SRCS) $(CFLAGS) $(LFLAGS)

With this change, code gets stuck.

GDB summary,

(gdb) bt
#0  0x00007ffff59a5c10 in MFXInit () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.15
#1  0x00000000004152df in MFX_DISP_HANDLE::LoadSelectedDLL(char const*, eMfxImplType, int, int, mfxInitParam&) ()
#2  0x00000000004129a5 in MFXInitEx ()
#3  0x0000000000413a7b in MFXInit ()
#4  0x000000000040c90e in MFXVideoSession::Init (this=0x7fffffffe250, impl=3, ver=0x7fffffffe200) at /opt/intel/mediasdk//include/mfxvideo++.h:45
#5  0x000000000040d891 in Initialize (impl=3, ver=..., pSession=0x7fffffffe250, pmfxAllocator=0x0, bCreateSharedHandles=false)
    at ../common/common_utils_linux.cpp:28
#6  0x000000000040c6ff in main (argc=1, argv=0x7fffffffe5b8) at src/simple_session.cpp:47

Why after MFX_DISP_HANDLE, MFXInit() calls is made again.

WIthout "rdynamic"  code is working fine.

 

Regards,

Sumit Jha

 

0 Kudos
3 Replies
Highlighted
Employee
19 Views

Hi Sumit,

I am investigating as I can reproduce it on my system as well.

Please give me a few days to come back to you.

Thanks,

Bjoern

0 Kudos
Highlighted
Employee
19 Views

Hi Sumit,

MFXInit() function name (and symbol) is used in dispatcher libmfx.a as well as in dynamic libmfxhw64-p.so. This leads to a naming conflict during runtime when using rdynamic compiler flag. The two MFXInit functions you are seeing actually belong to different libraries.

I escalated the issue to our SDK engineering team, asking for a solution/fix.

Thanks for bringing this issue up.

Best,
Bjoern

0 Kudos
Highlighted
Beginner
19 Views

Is there a status update for this issue?  It seems to still occur with the 2017 version.  -rdynamic is useful to make backtrace_symbols() work correctly.

0 Kudos