Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
3030 Discussions

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

sumit_j_1
Beginner
403 Views

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
Bjoern_B_Intel
Employee
403 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
Bjoern_B_Intel
Employee
403 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
Greg_H_1
Beginner
403 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
Reply