Subject: Re: update audio/p5-CDDB
To: Juan RP <juan@xtrarom.org>
From: Chuck Cranor <chuck@ece.cmu.edu>
List: tech-pkg
Date: 01/09/2007 14:07:04
On Fri, Jan 05, 2007 at 05:09:31PM +0100, Juan RP wrote:
> Temporary workaround, try adding into the mpeg4ip Makefile:
> BUILDLINK_TRANSFORM+= rm:-laudio
> 
> I need to find more information on it... I had this problem time ago
> but it was caused by the line PKG_OPTIONS.SDL in mk.conf 
> and SDL built with different options.


hi-

    that worked, but when "make update" tried to recompile mplayer
it failed...

    I decided it was time to upgrade to 4.0_BETA2 anyway, so I rebuilt
/usr/pkg from scratch after doing that.  After rebuilding from scratch
everything (with the old /etc/mk.conf) compiled properly.

    I guess there was some state in my /var/db/pkg or /usr/pkg that was
causing the compile problem with mpeg4ip?   Recompile entire /usr/pkg
fixed it, but I wonder if there was a less heavyweight solution I should
have done?   I saved my old /var/db/pkg and /usr/pkg in case they are
of any use.   is it worth keeping the PR open, or should I close it?



     Unfortunately, there is now a new problem: audio/xmms-faad no
longer works because the shared lib it generates references an undefined
symbol:

xxxcdc> xmms
/usr/pkg/lib/xmms/Input/libmp4.so: Undefined PLT symbol "MP4GetTrackAudioType" (symnum = 64)
^C
xxxcdc> 

this is because we have assumed that the version of libmp4v2.so in
the audio/faad2 package can be replaced with the version in the 
mpeg4ip package.   Unfortunately, the multimedia/mpeg4ip vesion of 
libmp4v2.so does not have the MP4GetTrackAudioType() API:

  an older system:
	xxx[16]> nm /usr/pkg/lib/libmp4v2.so | grep MP4GetTrackAudioType
	0005879c T MP4GetTrackAudioType
	xxx[17]> grep libmp4v2.so /var/db/pkg/faad2-2.0nb4/+CONTENTS 
	lib/libmp4v2.so
	@comment Symlink:libmp4v2.so.0.0.0
	lib/libmp4v2.so.0
	@comment Symlink:libmp4v2.so.0.0.0
	lib/libmp4v2.so.0.0.0
	xxx[18]> 

   a -current system:
	xxxcdc> nm /usr/pkg/lib/libmp4v2.so | grep MP4GetTrackAudioType
	xxxcdc> grep libmp4v2.so /var/db/pkg/mpeg4ip-1.5nb3/+CONTENTS 
	lib/libmp4v2.so
	@comment Symlink:libmp4v2.so.0.0.0
	lib/libmp4v2.so.0
	@comment Symlink:libmp4v2.so.0.0.0
	lib/libmp4v2.so.0.0.0
	xxxcdc> 



Furthermore, there is a comment in the faad2 distribution that says:

in the faad2 file faad2/common/mp4v2/mp4.cpp:

	// This function should not be used anymore 
	// use MP4GetTrackEsdsObjectTypeId instead
	extern "C" u_int8_t MP4GetTrackAudioType(
     	MP4FileHandle hFile, MP4TrackId trackId)
	{


while in the mpeg4ip version of mp4.cpp it has:

	// Replacement to MP4GetTrackVideoType and MP4GetTrackAudioType
	// Basically does the same thing but with a more self-explanatory name
	extern "C" u_int8_t MP4GetTrackEsdsObjectTypeId( 
     	MP4FileHandle hFile, MP4TrackId trackId)
	{
  	if (MP4_IS_VALID_FILE_HANDLE(hFile)) {



so it looks like we need to either modify the xmms-faad2 xmms plugin
so that it calls MP4GetTrackVideoType() instead of MP4GetTrackAudioType(),
or we need to provide it with and link to the older mp4v2 lib.


chuck