[MPlayer-users] Compile errors on OS X 10.5.2 with Xcode 3.0 and x264 or faac enabled

The Wanderer inverseparadox at comcast.net
Wed Feb 27 00:14:13 CET 2008


dandjo at gmx.at wrote:

> Hi there,
> 
> I have some problems while compiling the latest mplayer from
> subversion with x264 and faac enabled on Mac OS X 10.5.2 with Xcode
> 3.0 (gcc 3.x). I do the following:

<snip>

> cd mplayer
> export PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig/"
> ./configure --with-freetype-config=/usr/X11R6/bin/freetype-config --enable-x264 --enable-faac

<snip>

> The mplayer compiles without any problems if x264 and faac are
> disabled. If they are enabled, I get the following error:
> 
> cc -o mplayer mplayer.o m_property.o mp_fifo.o mp_msg.o mixer.o parser-mpcmd.o command.o asxparser.o codec-cfg.o cpudetect.o edl.o find_sub.o get_path.o m_config.o m_option.o m_struct.o mpcommon.o parser-cfg.o playtree.o playtreeparser.o spudec.o sub_cc.o subopt-helper.o subreader.o vobsub.o unrar_exec.o libvo/libvo.a libao2/libao2.a input/libinput.a libmpcodecs/libmpcodecs.a libaf/libaf.a libmpdemux/libmpdemux.a stream/stream.a libswscale/libswscale.a libvo/libosd.a libavformat/libavformat.a libavcodec/libavcodec.a libavutil/libavutil.a libpostproc/libpostproc.a loader/libloader.a mp3lib/libmp3.a liba52/liba52.a libmpeg2/libmpeg2.a libfaad2/libfaad2.a tremor/libvorbisidec.a dvdread/libdvdread.a libdvdcss/libdvdcss.a osdep/libosdep.a -framework OpenAL -L/usr/local/lib  -liconv -lncurses -framework Carbon -framework QuickTime -framework CoreAudio -framework AudioUnit -framework AudioToolbox -framework Cocoa -framework QuartzCore -framework OpenGL -framework IOKit -framework 
IOKit -lz     -lm   
> Undefined symbols:
>   "_x264_nal_encode", referenced from:

<snip>

>   "_faacEncOpen", referenced from:

<snip>

> The same happens if I compile with Xcode 2.5 (gcc 3.x). What am I
> doing wrong? Thanky you for any help!

What you're doing wrong is misunderstanding the meaning of the
'--enable' flags as they exist in MPlayer's configure. It is not the
same as the meaning of those flags in many other open-source projects
you might have seen.

By using those flags, you are disabling all autodetection of those
features; when configure sees them, it assumes that you are going to
provide all of the necessary compiler flags yourself (using the
'--extra-libs', '--with-extraincdir' and '--with-extralibdir' options).
MPlayer's '--enable' options are intended only for use by developers,
and are almost completely useless for end users.

If you remove those two '--enable' flags from your command line, you
will almost certainly see configure pick up your x264 and FAAC installs
automatically, and the compile should run without problems.

If configure does *not* pick up your installs automatically, then either
you have installed the libraries in unexpected and/or unusual locations
(and s oneed to use the '--with-extra*dir' options anyway) or
autodetection is broken. In the latter case, a bug report with a full
explanation of the relevant parts of your system configuration will most
likely get developer attention.

-- 
    The Wanderer

    My usual .sig is on vacation while I adjust to my new computer



More information about the MPlayer-users mailing list