[vlc-devel] Problems with Mac OS X compile

Dave Still dave at stilldesigning.com
Fri Jun 20 22:41:29 CEST 2008


On Jun 20, 2008, at 12:16 PM, Pavlov Konstantin wrote:

> On Fri, Jun 20, 2008 at 09:43:35AM -0700, Dave Still wrote:
>> I'm trying to compile latest git on Mac OS X 10.5.3 with latest X-
>> Code / iPhone dev kit, and I'm running into some problems.  Using the
>> instructions at http://wiki.videolan.org/OSXCompile
>> An examination of config.log reveals that /lib/cpp does not exist,  
>> but
>> then again, it never did and I was able to compile on OS X before.
>> When I try configuring with just "./configure", the config script
>> completes, but I get the following compile error:
>>
>> gcc -std=gnu99 -mmacosx-version-min=10.4  -o .libs/
>> libavcodec_plugin.dylib -bundle  .libs/libavcodec_plugin_la-
>> avcodec.o .libs/libavcodec_plugin_la-video.o .libs/
>> libavcodec_plugin_la-audio.o .libs/libavcodec_plugin_la-
>> deinterlace.o .libs/libavcodec_plugin_la-encoder.o  -L/Users/
>> stealthdave/Source/vlc/./extras/contrib/lib -lpthread -L/Users/
>> stealthdave/Source/vlc/extras/contrib/lib -lavcodec -lavutil -
>> lm ../../../src/.libs/libvlccore.dylib /Users/stealthdave/Source/ 
>> vlc/./
>> extras/contrib/lib/libgcrypt.dylib /Users/stealthdave/Source/vlc/./
>> extras/contrib/lib/libintl.dylib /usr/lib/libiconv.dylib /usr/lib/
>> libc.dylib -mmacosx-version-min=10.4 -march=pentium-m - 
>> mtune=prescott -
>> Wl,-read_only_relocs -Wl,suppress -Wl,-headerpad_max_install_names
>> Undefined symbols:
>>  "_a52_samples", referenced from:
>>      _a52_samples$non_lazy_ptr in libavcodec.a(liba52.o)
>>  "_deflate", referenced from:
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(zmbvenc.o)
>>      _encode_frame in libavcodec.a(lclenc.o)
>>      _encode_frame in libavcodec.a(lclenc.o)
>>  "_a52_frame", referenced from:
>>      _a52_frame$non_lazy_ptr in libavcodec.a(liba52.o)
>>  "_deflateEnd", referenced from:
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_end in libavcodec.a(zmbvenc.o)
>>      _flashsv_encode_end in libavcodec.a(flashsvenc.o)
>>      _encode_end in libavcodec.a(lclenc.o)
>>  "_faacEncGetDecoderSpecificInfo", referenced from:
>>      _Faac_encode_init in libavcodec.a(libfaac.o)
>>  "_compress", referenced from:
>>      _encode_strip in libavcodec.a(tiffenc.o)
>>  "_a52_syncinfo", referenced from:
>>      _a52_syncinfo$non_lazy_ptr in libavcodec.a(liba52.o)
>>  "_lame_set_bWriteVbrTag", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_lame_set_VBR", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_crc32", referenced from:
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>      _encode_frame in libavcodec.a(pngenc.o)
>>  "_lame_encode_buffer", referenced from:
>>      _MP3lame_encode_frame in libavcodec.a(libmp3lame.o)
>>  "_faacEncEncode", referenced from:
>>      _Faac_encode_frame in libavcodec.a(libfaac.o)
>>  "_uncompress", referenced from:
>>      _decode_frame in libavcodec.a(dxa.o)
>>      _decode_frame in libavcodec.a(tiff.o)
>>      _decode_frame in libavcodec.a(cscd.o)
>>  "_lame_set_num_channels", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_lame_set_VBR_q", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_faacEncOpen", referenced from:
>>      _Faac_encode_init in libavcodec.a(libfaac.o)
>>  "_compress2", referenced from:
>>      _flashsv_encode_frame in libavcodec.a(flashsvenc.o)
>>  "_inflateEnd", referenced from:
>>      _decode_frame in libavcodec.a(pngdec.o)
>>      _decode_end in libavcodec.a(zmbv.o)
>>      _decode_end in libavcodec.a(lcldec.o)
>>      _flashsv_decode_end in libavcodec.a(flashsv.o)
>>      _decode_end in libavcodec.a(tscc.o)
>>  "_lame_encode_buffer_interleaved", referenced from:
>>      _MP3lame_encode_frame in libavcodec.a(libmp3lame.o)
>>  "_inflate", referenced from:
>>      _decode_frame in libavcodec.a(pngdec.o)
>>      _decode_frame in libavcodec.a(zmbv.o)
>>      _decode_frame in libavcodec.a(lcldec.o)
>>      _decode_frame in libavcodec.a(lcldec.o)
>>      _decode_frame in libavcodec.a(lcldec.o)
>>      _flashsv_decode_frame in libavcodec.a(flashsv.o)
>>      _flashsv_decode_frame in libavcodec.a(flashsv.o)
>>      _decode_frame in libavcodec.a(tscc.o)
>>  "_deflateInit2_", referenced from:
>>      _encode_frame in libavcodec.a(pngenc.o)
>>  "_deflateReset", referenced from:
>>      _encode_frame in libavcodec.a(zmbvenc.o)
>>      _encode_frame in libavcodec.a(lclenc.o)
>>  "_lame_get_framesize", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_inflateReset", referenced from:
>>      _decode_frame in libavcodec.a(zmbv.o)
>>      _decode_frame in libavcodec.a(lcldec.o)
>>      _decode_frame in libavcodec.a(lcldec.o)
>>      _flashsv_decode_frame in libavcodec.a(flashsv.o)
>>      _decode_frame in libavcodec.a(tscc.o)
>>  "_lame_set_disable_reservoir", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_faacEncSetConfiguration", referenced from:
>>      _Faac_encode_init in libavcodec.a(libfaac.o)
>>  "_inflateSync", referenced from:
>>      _flashsv_decode_frame in libavcodec.a(flashsv.o)
>>  "_a52_free", referenced from:
>>      _a52_free$non_lazy_ptr in libavcodec.a(liba52.o)
>>  "_a52_init", referenced from:
>>      _a52_init$non_lazy_ptr in libavcodec.a(liba52.o)
>>  "_lame_set_brate", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_lame_init", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_a52_block", referenced from:
>>      _a52_block$non_lazy_ptr in libavcodec.a(liba52.o)
>>  "_lame_set_mode", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_deflateInit_", referenced from:
>>      _encode_init in libavcodec.a(zmbvenc.o)
>>      _encode_init in libavcodec.a(lclenc.o)
>>  "_lame_set_quality", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_inflateInit_", referenced from:
>>      _decode_frame in libavcodec.a(pngdec.o)
>>      _decode_init in libavcodec.a(zmbv.o)
>>      _decode_init in libavcodec.a(lcldec.o)
>>      _flashsv_decode_init in libavcodec.a(flashsv.o)
>>      _decode_init in libavcodec.a(tscc.o)
>>  "_lame_set_in_samplerate", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_faacEncClose", referenced from:
>>      _Faac_encode_init in libavcodec.a(libfaac.o)
>>      _Faac_encode_init in libavcodec.a(libfaac.o)
>>      _Faac_encode_close in libavcodec.a(libfaac.o)
>>  "_lame_set_out_samplerate", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_lame_init_params", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>  "_lame_encode_flush", referenced from:
>>      _MP3lame_encode_frame in libavcodec.a(libmp3lame.o)
>>  "_lame_close", referenced from:
>>      _MP3lame_encode_init in libavcodec.a(libmp3lame.o)
>>      _MP3lame_encode_close in libavcodec.a(libmp3lame.o)
>>  "_faacEncGetCurrentConfiguration", referenced from:
>>      _Faac_encode_init in libavcodec.a(libfaac.o)
>> ld: symbol(s) not found
>> collect2: ld returned 1 exit status
>> make[6]: *** [libavcodec_plugin.la] Error 1
>> make[5]: *** [all] Error 2
>> make[4]: *** [all-recursive] Error 1
>> make[3]: *** [all] Error 2
>> make[2]: *** [all-recursive] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>>
>> This leads me to ask two questions:
>>
>> 1. What is the proper compile procedure for Mac OS X? (i.e., is the
>> current Wiki page correct?)
>
> Yes it is.

In which case, I get the following error from "./configure --enable- 
debug --with-macosx-sdk":

...
checking how to recognize dependent libraries... (cached) pass_all
checking dlfcn.h usability... no
checking dlfcn.h presence... yes
configure: WARNING: dlfcn.h: present but cannot be compiled
configure: WARNING: dlfcn.h:     check for missing prerequisite headers?
configure: WARNING: dlfcn.h: see the Autoconf documentation
configure: WARNING: dlfcn.h:     section "Present But Cannot Be  
Compiled"
configure: WARNING: dlfcn.h: proceeding with the preprocessor's result
configure: WARNING: dlfcn.h: in the future, the compiler will take  
precedence
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

As stated above, config.log reveals that /lib/cpp does not exist.   
After examining the logs further, I tried to configure again, this  
time with "CXXCPP='/usr/bin/cpp' ./configure --enable-debug --with- 
macosx-sdk", which let things go a little further only to crash on a  
libiconv error:

...
checking for iconv... (cached) no, consider installing GNU libiconv
configure: error: libiconv is needed for VLC to work properly

I checked, and both /usr/lib/libiconv.dylib and /usr/include/iconv.h  
exist.  I even tried adding "--with-libiconv-prefix=/usr" to the  
configure options, but to no avail.  Is Apple's libiconv not  
suitable?  I do not get these errors using just "./configure" with no  
options.  Is there a problem with my development environment?  I have  
pretty much a default XCode 3.1 installation.  I have Fink installed,  
but not the development flags, so that should not be a conflict.  I'm  
trying to build latest so that I can test the flash transcoding that I  
was previously having issues with (see http://mailman.videolan.org/pipermail/vlc-devel/2008-April/042357.html 
  ), and hopefully have them addressed before the upcoming test1  
release.

>
>
>> 2. How can I (or someone) correct the error(s) that I'm getting?
>
> Fix ffmpeg pkg-config files.  They should report needed libraries in
> Libs.private section.
>
This one is beyond me, I'm afraid.

Thanks,
- Dave

> -- 
> QOTD:
> 	On a scale of 1 to 10 I'd say...  oh, somewhere in there.



More information about the vlc-devel mailing list