MLT compile fails [sloved]

The guide on here says to install ffmpeg and mlt from source prior to installing kdenlive from source. This is in an effort to get H.264 AVC / AAC rendering to work. Ffmpeg sort of went OK, but MLT compile fails:

cc -shared -o ../ factory.o filter_avcolour_space.o filter_avresample.o filter_avdeinterlace.o filter_swscale.o producer_avformat.o consumer_avformat.o -L../../framework -lmlt -lpthread -Wl,--no-undefined -Wl,--as-needed -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -lavformat -lavcodec -lavutil -lswscale -lavdevice
/usr/bin/ld: /usr/local/lib/libavformat.a(allformats.o): relocation R_X86_64_32 against `a64_muxer' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavformat.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [../] Error 1
make[2]: Leaving directory `/home/dad/mlt/src/modules/avformat'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/dad/mlt/src/modules'
make: *** [all] Error 1

Any idea what this means?

Using command line ffmpeg works. I can transcode a small indeo 3 avi file to H.264 AVC / AAC.

Since I am looking to get Kdenlive to be able to render things to H.264 AVC / AAC, all of this compiling of x264, ffmpeg, MLT, and Kdenlive seems to be important to me since the topic in the forum here for encoding these things says to do it from source. Oh, and you know, compiling MLT gives a LOT of compile warnings besides the error I listed above.

Oh, PS: what's the difference between the options "ffmpeg -formats" and ffmpeg -codecs"?

This is typical for a mixed 32-bits and 64-bits compile (or actually, link).

Make sure both the ffmpeg libs are compiled for 64 bits and mlt as well. Or both 32 bits.

On your question what's the difference between ffmpeg -codecs and -formats, you've got some fundamental reading to do. Ffmpeg -codecs lists the available codecs, -format lists the available containers. Read wikipedia on codecs and (multimedia) containers to learn about what is what.

OK, I did it. I followed the tutorial on here to install from source:
. I had to go back and re-do x264 and ffmpeg with enable-share (and enable-pic in x264), and enable-share in MLT. As long as they all agree -- either all static or all share it'll work. I chose all = share. Only one thing: keep a log of the build because you'll want to refer to it sooner or later.