[MPlayer-users] memalign undefined

Steven M. Schultz sms at 2BSD.COM
Tue Feb 18 06:22:23 CET 2003


Hi -

	Installing the latest libavcodec from ffmpeg results in 'memalign'
	being undefined:

gcc -O4 -march=i686 -mcpu=i686 -pipe -ffast-math -fomit-frame-pointer -D_THREAD_SAFE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibmpdemux -Iloader -Ilibvo    -I/usr/local/include/SDL -D_REENTRANT -D_THREAD_SAFE  -o mplayer mplayer.o mp_msg.o cpudetect.o codec-cfg.o cfgparser.o my_profile.o spudec.o playtree.o playtreeparser.o asxparser.o vobsub.o subreader.o sub_cc.o find_sub.o m_config.o m_option.o parser-cfg.o m_struct.o unrarlib.o mixer.o parser-mpcmd.o libvo/libvo.a libao2/libao2.a  vidix/libvidix.a  libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a   libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a -ldvdread libavcodec/libavcodec.a  -lmad -lvorbis -logg -ldv -lfaad -llzo  -lxvidcore -lpng -lz -lz -ljpeg    -ltermcap  /packages/live/liveMedia/libliveMedia.a /packages/live/groupsock/libgroupsock.a /packages/live/UsageEnvironment/libUsageEnvironment.a /packages/live/BasicUsage!
Environment/libBasicUsageEnvironment.a -lstdc++     -lGL -lXxf86dga -lXv -lXxf86vm -lXinerama -L/usr/X11R6/lib -lXext -lX11  -lmad  -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lm -L/usr/contrib/lib -lesd -laudiofile -lm -L/usr/X11R6/lib -lX11 -lXext -ldl        -L/usr/contrib/lib -lesd -laudiofile -lm      -ldl -rdynamic -ldvd -liconv  -lm
libavcodec/libavcodec.a(postprocess.o): In function `pp_get_mode_by_name_and_quality':
/packages/ffmpeg/libavcodec/libpostproc/postprocess.c:533: undefined reference to `memalign'
libavcodec/libavcodec.a(postprocess.o): In function `reallocBuffers':
/packages/ffmpeg/libavcodec/libpostproc/postprocess.c:720: undefined reference to `memalign'
/packages/ffmpeg/libavcodec/libpostproc/postprocess.c:720: undefined reference to `memalign'
/packages/ffmpeg/libavcodec/libpostproc/postprocess.c:720: undefined reference to `memalign'
/packages/ffmpeg/libavcodec/libpostproc/postprocess.c:720: undefined reference to `memalign'
libavcodec/libavcodec.a(postprocess.o):/packages/ffmpeg/libavcodec/libpostproc/postprocess.c:720: more undefined references to `memalign' follow

	This does not happen when building ffmpeg because ffmpeg tests for
	memalign being present and includes code #ifdef'd on HAVE_MEMALIGN

	What ffmpeg does is something like:

#ifdef HAVE_MEMALIGN
	code that uses memalign
#else
	ptr = malloc(size);
#endif

	An alternative approach might be to test for memalign() and if NOT
	present simply '#define memalign(a) malloc(a)"

	Steven Schultz



More information about the MPlayer-users mailing list