-
Notifications
You must be signed in to change notification settings - Fork 106
libyami compile error when static enabled. #377
Comments
Specifying |
This issue is OS platform specific. For Ubuntu, the recommendation is as above mentioned by @uartie Alternative suggestion, let's disable mixed configuration of static and shared or just don't do it. I vote for just don't do it. |
But --enable-static is standard configure option. It's should not depends on OS platform. I think @uartie can repeat this on centos(correct me if i am wrong). Since we find a workaround, we can flag it as low priority. But i tend to treat it as an issue in our configuration script. |
I only tried this on Fedora and Ubuntu. It works fine on Fedora but not on Ubuntu. I'm not sure why Ubuntu can't handle it but Fedora can. Possibly something different with the compiler/linker tools and their settings and/or versions. During the link phase on Fedora, the In this case here, simpleplayer directly depends on libyami_decoder.la which has libyami_codecparser.la listed in it's dependency_libs. The simpleplayer should not directly depend on libyami_codecparser.la, but it needs it for proper linking. IMO, this is a shortcoming/problem caused by the distro tools. Is there actually a use-case where we want both shared and static libraries compiled at the same time? |
We can't choose this for customer... It will give them negative feedback |
I found that this is a common problem on Debian (thus, Ubuntu): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702737 The problem is that these distros patched libtool to set The only reasonable hack to fix this, based on my research, is to do a sed replacement from configure.ac on the generated libtool wrapper. Others have said to recompile libtool from gnu.org or painstakingly declare all dependencies explicitly in the makefiles. I think we can all agree that these last two are not feasible solutions and just plain nonsense. |
ok, maybe i can file this in FAQ. thanks U.Artie and Sean |
Ubuntu and Debian patched libtool to set link_all_deplibs=no. Apparently this goes against what the libtool documentation states/recommends. Setting link_all_deplibs causes libtool to not properly track down all the inter-dependencies for you. That is, if A depends on B and B depends on C, then libtool will not link A to C automatically, even though it is required. Oddly, this only happens when both static and shared libraries are compiled at the same time. To workaround this, sed replace link_all_deplibs=no to link_all_deplibs=yes in the configure generated libtool wrapper. Fixes intel#377 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Oops, I didn't see your last comment before submitting the pull request to workaround the problem. If you'd still rather explain this in a FAQ then I can retract the pull request on your command. |
seems it's too ugly. File a FQA maybe better. Thanks for good finding |
ok it added to https://github.com/01org/libyami/wiki/FAQ |
this also mentioned in #368
reproduce steps:
configure option:
./autogen.sh --prefix=$LIBYAMI_PREFIX --enable-tests --enable-vp9dec --enable-docs --enable-dmabuf --disable-debug --enable-v4l2 --enable-static && make -j8
errors:
ts/yami/release/libyami/decoder/vaapidecoder_h265.cpp:520: undefined reference to h265_quant_matrix_8x8_get_raster_from_uprightdiagonal' ../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In functionYamiMediaCodec::fillScalingList32x32(_VAIQMatrixBufferHEVC, _H265ScalingList const)':
/home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:521: undefined reference to h265_quant_matrix_8x8_get_raster_from_uprightdiagonal' ../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In functionfillScalingList4x4':
/home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:518: undefined reference to h265_quant_matrix_4x4_get_raster_from_uprightdiagonal' ../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In functionfillScalingList8x8':
/home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:519: undefined reference to h265_quant_matrix_8x8_get_raster_from_uprightdiagonal' ../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In functionfillScalingList16x16':
/home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:520: undefined reference to h265_quant_matrix_8x8_get_raster_from_uprightdiagonal' ../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In functionfillScalingList32x32':
/home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:521: undefined reference to h265_quant_matrix_8x8_get_raster_from_uprightdiagonal' /home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:521: undefined reference toh265_quant_matrix_8x8_get_raster_from_uprightdiagonal'
../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In function YamiMediaCodec::VaapiDecoderH265::VaapiDecoderH265()': /home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:464: undefined reference toh265_parser_new'
../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In function YamiMediaCodec::VaapiDecoderH265::~VaapiDecoderH265()': /home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:471: undefined reference toh265_parser_free'
../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In function YamiMediaCodec::VaapiDecoderH265::decodeSlice(H265NalUnit)': /home/thomas/projects/yami/release/libyami/decoder/vaapidecoder_h265.cpp:1025: undefined reference toh265_parser_parse_slice_hdr'
../decoder/.libs/libyami_decoder.a(libyami_decoder_la-vaapidecoder_h265.o): In function `YamiMediaCodec::VaapiDecoderH265::decodeParamSet(H265NalUnit)':
The text was updated successfully, but these errors were encountered: