[Ffmpeg-devel] FreeBSD 6.1 amd64 and current SVN

Tatu Kilappa trilkk
Sun Oct 29 00:10:21 CEST 2006

>> # if __FreeBSD__ >= 502100 || __FreeBSD__ == 6
> Actually, this is GCC dependent I'm afraid, as __FreeBSD__ is in the
> default defines of the compiler. Most likely the GCC 3.4 shipped with
> base system... ...Using it to desume the version is not correct
> anyway, instead one should use the __FreeBSD_version macro from
> <osreldate.h>:
> #define __FreeBSD_version 602100
> this is from a 6.2-BETA2 insteall.

So how should this be fixed? Shall I just check if the system is
FreeBSD (for example by checking that __FreeBSD__ is defined at all),
and if yes, then include <osreldate.h>, possibly with #undef to
__FreeBSD__ beforehand?

Personally, I'd just write Autotools -style cheks that produce output
of the like #define HAVE_SYS_???_IOCTL_METEOR_H and we could forget the
whole FreeBSD dependency stuff and focus on finding the headers, that's
were the problem was anyway.

Tell your preferred approach and I'll make a patch and submit wherever
you like, this mailing list perhaps?

> > Also, search from /usr/local/include and /usr/local/lib is not
> > enabled by default...
> /usr/local/* is used only from ports, that is not the only way to
> install software on a FreeBSD system...

Okay, user error. Disregard that.

> > You could also add a note in the FAQ about the link order. If an
> > user is stupid enough to issue `pkg-config --libs avcodec`...
> Can you post the error? Because it seems pretty strange that this way
> it failed, as -lavutil should have been more than one time in the
> linking line.

Also my error. I have a SCons compiler script that does not duplicate
linker flags (since --as-needed is not usually specified). Sorry for
the trouble.

Yet another thing about compiling. I have linux-ppc (current Debian
testing, GCC 4.1.2) box where I also compiled the program, and ran into
problems trying to enable XviD (latest SVN, refreshed today). The check
fails with ERROR: XviD not found. I read the logs and it appeared the
problem was that it did not find math library with the compiler string
it was using.

I edited configure line 1310:
enabled xvid    && require XviD xvid.h xvid_global -lxvidcore

Changing the line to:
enabled xvid    && require XviD xvid.h xvid_global -lxvidcore -lm

Solved the problem.

-Tatu Kilappa <trilkk at iki.fi>

More information about the ffmpeg-devel mailing list