Question / Help build error

gypark

New Member
Hello,

I am sorry I'm not good at English.

I tried to build obs-studio in my MacBook pro (OSX 10.9.5)
I followed the instruction in INSTALL document.

However, when I run 'make', it fails with following error message.

Code:
[  0%] Built target glad
[  5%] Built target libff
[ 10%] Built target jansson
Linking C shared library libobs.dylib
Undefined symbols for architecture x86_64:
  "_BZ2_bzDecompress", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  "_BZ2_bzDecompressEnd", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  "_BZ2_bzDecompressInit", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  "_CVPixelBufferGetBaseAddress", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetBaseAddressOfPlane", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetBytesPerRow", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetBytesPerRowOfPlane", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetPixelFormatType", referenced from:
  _vda_decoder_callback in libavcodec.a(vda_h264.o)
  "_CVPixelBufferGetPlaneCount", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferIsPlanar", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferLockBaseAddress", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferRelease", referenced from:
  _release_buffer in libavcodec.a(vda_h264_dec.o)
  _vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
  _vda_h264_uninit in libavcodec.a(vda_h264.o)
  _ff_vda_output_callback in libavcodec.a(vda_h264.o)
  _release_buffer in libavcodec.a(vda_h264.o)
  _vda_h264_release_buffer in libavcodec.a(vda_h264.o)
  "_CVPixelBufferRetain", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  _vda_decoder_callback in libavcodec.a(vda_h264.o)
  _ff_vda_output_callback in libavcodec.a(vda_h264.o)
  "_CVPixelBufferUnlockBaseAddress", referenced from:
  _release_buffer in libavcodec.a(vda_h264_dec.o)
  "_VDADecoderCreate", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_VDADecoderDecode", referenced from:
  _vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
  _vda_h264_end_frame in libavcodec.a(vda_h264.o)
  "_VDADecoderDestroy", referenced from:
  _ff_vda_destroy_decoder in libavcodec.a(vda_h264.o)
  "_VDADecoderFlush", referenced from:
  _vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
  _vda_h264_end_frame in libavcodec.a(vda_h264.o)
  "_compress", referenced from:
  _encode_strip in libavcodec.a(tiffenc.o)
  (maybe you meant: _compress_uyvx_to_i420, _compress_uyvx_to_nv12 )
  "_compress2", referenced from:
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _flashsv_encode_frame in libavcodec.a(flashsvenc.o)
  "_crc32", referenced from:
  _encode_frame in libavcodec.a(pngenc.o)
  "_deflate", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _encode_frame in libavcodec.a(pngenc.o)
  _encode_frame in libavcodec.a(lclenc.o)
  _encode_frame in libavcodec.a(zmbvenc.o)
  "_deflateBound", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _encode_frame in libavcodec.a(pngenc.o)
  _encode_frame in libavcodec.a(lclenc.o)
  "_deflateEnd", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _flashsv_encode_init in libavcodec.a(flashsvenc.o)
  _flashsv_encode_end in libavcodec.a(flashsvenc.o)
  _encode_frame in libavcodec.a(pngenc.o)
  _encode_end in libavcodec.a(lclenc.o)
  _encode_init in libavcodec.a(zmbvenc.o)
  ...
  "_deflateInit2_", referenced from:
  _encode_frame in libavcodec.a(pngenc.o)
  "_deflateInit_", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _encode_init in libavcodec.a(lclenc.o)
  _encode_init in libavcodec.a(zmbvenc.o)
  "_deflateReset", referenced from:
  _encode_frame in libavcodec.a(lclenc.o)
  _encode_frame in libavcodec.a(zmbvenc.o)
  "_iconv", referenced from:
  _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_iconv_close", referenced from:
  _avcodec_open2 in libavcodec.a(utils.o)
  _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_iconv_open", referenced from:
  _avcodec_open2 in libavcodec.a(utils.o)
  _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_inflate", referenced from:
  _http_read_stream in libavformat.a(http.o)
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  _rtmp_open in libavformat.a(rtmpproto.o)
  _zlib_refill in libavformat.a(swfdec.o)
  _decode_frame_common in libavcodec.a(pngdec.o)
  _decode_text_chunk in libavcodec.a(pngdec.o)
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  ...
  "_inflateEnd", referenced from:
  _http_close in libavformat.a(http.o)
  _http_read_header in libavformat.a(http.o)
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  _rtmp_open in libavformat.a(rtmpproto.o)
  _swf_read_close in libavformat.a(swfdec.o)
  _decode_frame_apng in libavcodec.a(pngdec.o)
  _decode_frame_png in libavcodec.a(pngdec.o)
  ...
  "_inflateInit2_", referenced from:
  _http_read_header in libavformat.a(http.o)
  "_inflateInit_", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  _rtmp_open in libavformat.a(rtmpproto.o)
  _swf_read_header in libavformat.a(swfdec.o)
  _decode_frame_apng in libavcodec.a(pngdec.o)
  _decode_frame_png in libavcodec.a(pngdec.o)
  _decode_text_chunk in libavcodec.a(pngdec.o)
  _flashsv_decode_init in libavcodec.a(flashsv.o)
  ...
  "_inflateReset", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _zlib_decomp in libavcodec.a(lcldec.o)
  _decode_frame in libavcodec.a(tscc.o)
  _zerocodec_decode_frame in libavcodec.a(zerocodec.o)
  _decode_frame in libavcodec.a(zmbv.o)
  "_inflateSync", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  "_kCVPixelBufferIOSurfacePropertiesKey", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kCVPixelBufferPixelFormatTypeKey", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_Height", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_SourceFormat", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_Width", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_avcCData", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_lzma_code", referenced from:
  _decode_frame in libavcodec.a(tiff.o)
  "_lzma_end", referenced from:
  _decode_frame in libavcodec.a(tiff.o)
  "_lzma_stream_decoder", referenced from:
  _decode_frame in libavcodec.a(tiff.o)
  "_uncompress", referenced from:
  _id3v2_read_internal in libavformat.a(id3v2.o)
  _mov_read_cmov in libavformat.a(mov.o)
  _swf_read_packet in libavformat.a(swfdec.o)
  _decode_frame in libavcodec.a(cscd.o)
  _decode_frame in libavcodec.a(dxa.o)
  _decode_block in libavcodec.a(exr.o)
  _g2m_decode_frame in libavcodec.a(g2meet.o)
  ...
  "_zlibCompileFlags", referenced from:
  _http_read_header in libavformat.a(http.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libobs/libobs.0.dylib] Error 1
make[1]: *** [libobs/CMakeFiles/libobs.dir/all] Error 2
make: *** [all] Error 2


I guess (from functions' names) that it is related with libbz2, but
I don't know how I can modify build process using cmake system.

Any help would be appreciated.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Seems to be an issue with your FFmpeg build, at least I'm guessing. OBS apparently can't link to it. It's difficult for me to help otherwise; I wouldn't recommend attempting to compile the project unless you have experience compiling projects in general. It's not a trivial task.
 

gypark

New Member
Seems to be an issue with your FFmpeg build, at least I'm guessing. OBS apparently can't link to it. It's difficult for me to help otherwise; I wouldn't recommend attempting to compile the project unless you have experience compiling projects in general. It's not a trivial task.

Hello, Jim.

Thank you for your reply.

At first, I just hoped this problem could be solved by modifying Makefile like, for example, inserting "LDLIBS = -lbz2" line.
But this project includes many directories, files and metafiles for build process. It's using CMakefile and I'm not familiar with it. I can't find even which target of all targets are causing this problem.

Could you give me any other hint about where I have to look into? I've installed ffmpeg-2.6.1 from source.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
I can't really do it without building it for you; I also built FFmpeg from source. Are you trying to add extra features to FFmpeg or are you just using core FFmpeg? You don't really need anything other than core FFmpeg for it to build properly.

Is the FFmpeg build a shared build? Maybe it's static. These errors look like something that would come from a statically built ffmpeg. It has to be shared.
 

Anshuman Sharma

New Member
Hello,

I am sorry I'm not good at English.

I tried to build obs-studio in my MacBook pro (OSX 10.9.5)
I followed the instruction in INSTALL document.

However, when I run 'make', it fails with following error message.

Code:
[  0%] Built target glad
[  5%] Built target libff
[ 10%] Built target jansson
Linking C shared library libobs.dylib
Undefined symbols for architecture x86_64:
  "_BZ2_bzDecompress", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  "_BZ2_bzDecompressEnd", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  "_BZ2_bzDecompressInit", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  "_CVPixelBufferGetBaseAddress", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetBaseAddressOfPlane", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetBytesPerRow", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetBytesPerRowOfPlane", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferGetPixelFormatType", referenced from:
  _vda_decoder_callback in libavcodec.a(vda_h264.o)
  "_CVPixelBufferGetPlaneCount", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferIsPlanar", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferLockBaseAddress", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  "_CVPixelBufferRelease", referenced from:
  _release_buffer in libavcodec.a(vda_h264_dec.o)
  _vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
  _vda_h264_uninit in libavcodec.a(vda_h264.o)
  _ff_vda_output_callback in libavcodec.a(vda_h264.o)
  _release_buffer in libavcodec.a(vda_h264.o)
  _vda_h264_release_buffer in libavcodec.a(vda_h264.o)
  "_CVPixelBufferRetain", referenced from:
  _vdadec_decode in libavcodec.a(vda_h264_dec.o)
  _vda_decoder_callback in libavcodec.a(vda_h264.o)
  _ff_vda_output_callback in libavcodec.a(vda_h264.o)
  "_CVPixelBufferUnlockBaseAddress", referenced from:
  _release_buffer in libavcodec.a(vda_h264_dec.o)
  "_VDADecoderCreate", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_VDADecoderDecode", referenced from:
  _vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
  _vda_h264_end_frame in libavcodec.a(vda_h264.o)
  "_VDADecoderDestroy", referenced from:
  _ff_vda_destroy_decoder in libavcodec.a(vda_h264.o)
  "_VDADecoderFlush", referenced from:
  _vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
  _vda_h264_end_frame in libavcodec.a(vda_h264.o)
  "_compress", referenced from:
  _encode_strip in libavcodec.a(tiffenc.o)
  (maybe you meant: _compress_uyvx_to_i420, _compress_uyvx_to_nv12 )
  "_compress2", referenced from:
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _flashsv_encode_frame in libavcodec.a(flashsvenc.o)
  "_crc32", referenced from:
  _encode_frame in libavcodec.a(pngenc.o)
  "_deflate", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _encode_frame in libavcodec.a(pngenc.o)
  _encode_frame in libavcodec.a(lclenc.o)
  _encode_frame in libavcodec.a(zmbvenc.o)
  "_deflateBound", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _encode_frame in libavcodec.a(pngenc.o)
  _encode_frame in libavcodec.a(lclenc.o)
  "_deflateEnd", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _flashsv_encode_init in libavcodec.a(flashsvenc.o)
  _flashsv_encode_end in libavcodec.a(flashsvenc.o)
  _encode_frame in libavcodec.a(pngenc.o)
  _encode_end in libavcodec.a(lclenc.o)
  _encode_init in libavcodec.a(zmbvenc.o)
  ...
  "_deflateInit2_", referenced from:
  _encode_frame in libavcodec.a(pngenc.o)
  "_deflateInit_", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _flashsv2_encode_frame in libavcodec.a(flashsv2enc.o)
  _encode_init in libavcodec.a(lclenc.o)
  _encode_init in libavcodec.a(zmbvenc.o)
  "_deflateReset", referenced from:
  _encode_frame in libavcodec.a(lclenc.o)
  _encode_frame in libavcodec.a(zmbvenc.o)
  "_iconv", referenced from:
  _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_iconv_close", referenced from:
  _avcodec_open2 in libavcodec.a(utils.o)
  _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_iconv_open", referenced from:
  _avcodec_open2 in libavcodec.a(utils.o)
  _avcodec_decode_subtitle2 in libavcodec.a(utils.o)
  "_inflate", referenced from:
  _http_read_stream in libavformat.a(http.o)
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  _rtmp_open in libavformat.a(rtmpproto.o)
  _zlib_refill in libavformat.a(swfdec.o)
  _decode_frame_common in libavcodec.a(pngdec.o)
  _decode_text_chunk in libavcodec.a(pngdec.o)
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  ...
  "_inflateEnd", referenced from:
  _http_close in libavformat.a(http.o)
  _http_read_header in libavformat.a(http.o)
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  _rtmp_open in libavformat.a(rtmpproto.o)
  _swf_read_close in libavformat.a(swfdec.o)
  _decode_frame_apng in libavcodec.a(pngdec.o)
  _decode_frame_png in libavcodec.a(pngdec.o)
  ...
  "_inflateInit2_", referenced from:
  _http_read_header in libavformat.a(http.o)
  "_inflateInit_", referenced from:
  _matroska_decode_buffer in libavformat.a(matroskadec.o)
  _rtmp_open in libavformat.a(rtmpproto.o)
  _swf_read_header in libavformat.a(swfdec.o)
  _decode_frame_apng in libavcodec.a(pngdec.o)
  _decode_frame_png in libavcodec.a(pngdec.o)
  _decode_text_chunk in libavcodec.a(pngdec.o)
  _flashsv_decode_init in libavcodec.a(flashsv.o)
  ...
  "_inflateReset", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  _zlib_decomp in libavcodec.a(lcldec.o)
  _decode_frame in libavcodec.a(tscc.o)
  _zerocodec_decode_frame in libavcodec.a(zerocodec.o)
  _decode_frame in libavcodec.a(zmbv.o)
  "_inflateSync", referenced from:
  _flashsv_decode_frame in libavcodec.a(flashsv.o)
  "_kCVPixelBufferIOSurfacePropertiesKey", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kCVPixelBufferPixelFormatTypeKey", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_Height", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_SourceFormat", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_Width", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_kVDADecoderConfiguration_avcCData", referenced from:
  _ff_vda_create_decoder in libavcodec.a(vda_h264.o)
  _ff_vda_default_init in libavcodec.a(vda_h264.o)
  "_lzma_code", referenced from:
  _decode_frame in libavcodec.a(tiff.o)
  "_lzma_end", referenced from:
  _decode_frame in libavcodec.a(tiff.o)
  "_lzma_stream_decoder", referenced from:
  _decode_frame in libavcodec.a(tiff.o)
  "_uncompress", referenced from:
  _id3v2_read_internal in libavformat.a(id3v2.o)
  _mov_read_cmov in libavformat.a(mov.o)
  _swf_read_packet in libavformat.a(swfdec.o)
  _decode_frame in libavcodec.a(cscd.o)
  _decode_frame in libavcodec.a(dxa.o)
  _decode_block in libavcodec.a(exr.o)
  _g2m_decode_frame in libavcodec.a(g2meet.o)
  ...
  "_zlibCompileFlags", referenced from:
  _http_read_header in libavformat.a(http.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libobs/libobs.0.dylib] Error 1
make[1]: *** [libobs/CMakeFiles/libobs.dir/all] Error 2
make: *** [all] Error 2


I guess (from functions' names) that it is related with libbz2, but
I don't know how I can modify build process using cmake system.

Any help would be appreciated.

Hello gypark & Jim

You are able to resolve this issue. Am also facing the same error?

Thanks
Anshuman
 

Narcogen

Active Member
Is your issue that you're trying to build the current version of OBS on a five year old version of MacOS? Because that probably would not work. I certainly doubt anyone is still testing current versions against Mavericks.
 

Anshuman Sharma

New Member
Hello Narcogen,

Am able to resolve it by making shared build. My motive it to get very low latency in local network like ~150 to 200ms with MAC & Windows. Can you please help me?

Thanks
Anshuman
 
Top