You are herevlc build for RHEL5

vlc build for RHEL5


By thomas - Posted on 03 April 2008

There were a few problems building vlc for rhel5, quite a few dependencies as well. Here are my spec and src.rpm

At one point the compile will crash due to min() not begin defined. mkv.cpp: In member function 'virtual bool dvd_chapter_codec_c::Enter()': mkv.cpp:5848: error: no matching function for call to 'min(size_t&, long long unsigned int)' mkv.cpp: In member function 'virtual bool dvd_chapter_codec_c::Leave()': mkv.cpp:5871: error: no matching function for call to 'min(size_t&, long long unsigned int)' gmake[4]: *** [libmkv_plugin_a-mkv.o] Error 1 gmake[4]: Leaving directory `/usr/ports/multimedia/vlc/work/vlc-0.8.6e/modules/demux' gmake[3]: *** [all-modules] Error 1 gmake[3]: Leaving directory `/usr/ports/multimedia/vlc/work/vlc-0.8.6e/modules/demux' gmake[2]: *** [all-recursive] Error 1 gmake[2]: Leaving directory `/usr/ports/multimedia/vlc/work/vlc-0.8.6e/modules' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory `/usr/ports/multimedia/vlc/work/vlc-0.8.6e' gmake: *** [all] Error 2 *** Error code 2 I added a definition to min as a patch, and it seems to work fine... #define min(a,b) (((a) < (b)) ? (a):(b)) I'm not sure where min(a,b) is supposed to be defined, anyone know the real header file for that?

Tags

they solved it like this in gentoo: http://bugs.gentoo.org/attachment.cgi?id=147317

gentoo people have done it like this

--- modules/demux/mkv.cpp.orig Sun Feb 24 14:01:53 2008
+++ modules/demux/mkv.cpp Wed Mar 19 11:45:02 2008
@@ -5845,7 +5845,7 @@ bool dvd_chapter_codec_c::Enter()
binary *p_data = (*index)->GetBuffer();
size_t i_size = *p_data++;
// avoid reading too much from the buffer
- i_size = min( i_size, ((*index)->GetSize() - 1) >> 3 );
+ i_size = min( i_size, ((*index)->GetSize() - 1) >> 3 );
for ( ; i_size > 0; i_size--, p_data += 8 )
{
msg_Dbg( &sys.demuxer, "Matroska DVD enter command" );
@@ -5868,7 +5868,7 @@ bool dvd_chapter_codec_c::Leave()
binary *p_data = (*index)->GetBuffer();
size_t i_size = *p_data++;
// avoid reading too much from the buffer
- i_size = min( i_size, ((*index)->GetSize() - 1) >> 3 );
+ i_size = min( i_size, ((*index)->GetSize() - 1) >> 3 );
for ( ; i_size > 0; i_size--, p_data += 8 )
{
msg_Dbg( &sys.demuxer, "Matroska DVD leave command" )

no it means you just have to add this in the beginning of mkv.cpp

#define min(a,b) (a<b?a:b)

Yeah, it's libmatroska that's the problem, but the latest matroska I could find didn't have min defined anywhere :-(. I'll try upgrading wxGTK to 2.8 (using 2.6 was the lazy way out :-( ) RHEL5 has added a lot more of the deps lately, so I think my total package build was around 25 to get vlc deps satisfied.

Merci,
--Thomas.

Hello!
Maybe you would need to update libmatroska-devel ?
Note that the new version currently available in livna (vlc-0.8.6f-1) has a patch to support wxGTK 2.8.x, so you won't have the volume bar problem with this version.
I would be pleased to have some feedback for the RHEL-5 build, as RPM Fusion plan to support it sooner or later ;)

Nicolas (kwizart)

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options