Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24678 - vlc-0.6.0(-r1,2) and gcc-2.95
Summary: vlc-0.6.0(-r1,2) and gcc-2.95
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-17 08:58 UTC by TGL
Modified: 2003-08-25 17:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
files/vlc-0.6.0-misc.patch (vlc-0.6.0-misc.patch,2.24 KB, patch)
2003-07-18 10:54 UTC, TGL
Details | Diff
vlc-0.6.0-r2.ebuild (vlc-0.6.0-r2.ebuild,5.36 KB, text/plain)
2003-07-18 10:56 UTC, TGL
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2003-07-17 08:58:22 UTC
I had an issue compiling wxvlc on my old Gentoo 1.2, gcc-2.95.3 based,
box. Here is the error:

g++ -DHAVE_CONFIG_H -I. -I. -I.  -I./include -D_FILE_OFFSET_BITS=64
-D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE
-DLOCALEDIR=\"/usr/share/locale\" -DDATA_PATH=\"/usr/share/vlc\"
-DPLUGIN_PATH=\"/usr/lib/vlc\" -DHAVE_RELEASE    -D__VLC__ -D__PLUGIN__ 
-DMODULE_NAME=wxwindows -DMODULE_NAME_IS_wxwindows -DSYS_LINUX -O3 -ffast-math
-funroll-loops -mcpu=pentiumpro -fomit-frame-pointer     -fPIC
-I/usr/lib/wx/include/gtk-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I./include -D_FILE_OFFSET_BITS=64
-D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE
-DLOCALEDIR=\"/usr/share/locale\" -DDATA_PATH=\"/usr/share/vlc\"
-DPLUGIN_PATH=\"/usr/lib/vlc\" -DHAVE_RELEASE    -D__VLC__ -D__PLUGIN__ 
-DMODULE_NAME=wxwindows -DMODULE_NAME_IS_wxwindows -Wsign-compare -Wsign-compare
-Wall  -finline-limit-30000 -pipe -c -o
modules/gui/wxwindows/modules_gui_wxwindows_libwxwindows_plugin_a-menus.o `test
-f 'modules/gui/wxwindows/menus.cpp' || echo './'`modules/gui/wxwindows/menus.cpp
modules/gui/wxwindows/menus.cpp: In method `class wxMenu *
Menu::CreateChoicesMenu(char *, vlc_object_t *)':
modules/gui/wxwindows/menus.cpp:521: ambiguous overload for `char *& ? char *& :
wxString'
modules/gui/wxwindows/menus.cpp:521: candidates are: operator ?:(bool, wxString,
wxString) <builtin>
modules/gui/wxwindows/menus.cpp:521:                 operator ?:(bool, const
wxChar *, const wxChar *) <builtin>
make[2]: ***
[modules/gui/wxwindows/modules_gui_wxwindows_libwxwindows_plugin_a-menus.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/vlc-0.6.0/work/vlc-0.6.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/vlc-0.6.0/work/vlc-0.6.0'
make: *** [all] Error 2

I have no real fix because I don't know c++ well, neither gcc subtilities, so
I've disabled wx support from the ebuild, in src_compile():
	use wxwindows || myconf="${myconf} --disable-wxwindows"

I've already reported this to the videolan bugzilla:
http://bugzilla.videolan.org/cgi-bin/bugzilla/show_bug.cgi?id=934
(but forgot to do it here, sorry about that... Anyway, now it's done.)


Reproducible: Always
Steps to Reproduce:





thomas@gromit bidouille $ emerge info
Portage 2.0.49_pre11 (default-1.0, gcc-2.95.3, glibc-2.2.5-r4,2.2.5-r8)
=================================================================
System uname: 2.4.21-ck3 i686 AMD Athlon(tm) XP 1800+
GENTOO_MIRRORS=" http://ftp.easynet.nl/mirror/gentoo/
ftp://ftp.easynet.nl/mirror/gentoo// http://ftp.tu-clausthal.de/pub/linux/gentoo/"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 oss 3dnow apm avi crypt cups encode jpeg libg++ mikmod mmx mpeg ncurses
pdflib quicktime spell truetype xml2 xmms xv alsa berkdb bonobo cdr esd gdbm ggi
gif gnome gnome-libs gpm gphoto2 gtk gtkhtml guile imlib java libwww motif
mozilla mysql nas oggvorbis opengl pam perl png python qt readline ruby scanner
sdl slang snmp ssl svga tcltk tcpd tetex tiff X aalib acpi acpi4linux apache2
clamav curl dga -directfb doc dvd faad fbcon flash foomaticdb gd ggz imap ipv6
jack junit lcms leim lirc mbox memlimit moznocompose moznoirc moznomail mozsvg
nls objc pda plotutils pnp ppds samba sasl slp smooth tmpfs usb v4l wmf Xaw3d
xface xml xvid xosd zeo zlib -arts -kde -ldap -pcmcia xfs"
COMPILER=""
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=i686 -O2 -pipe"
CXXFLAGS="-march=i686 -O2 -pipe"
ACCEPT_KEYWORDS="x86 ~x86"
MAKEOPTS="-j1"
AUTOCLEAN="yes"
SYNC="rsync://rsync.fr.gentoo.org/gentoo-portage"
FEATURES="ccache userpriv usersandbox sandbox digest manifest fixpackages"
Comment 1 TGL 2003-07-18 10:52:47 UTC
I've finally managed to build vlc-0.6.0 on my gcc-2.95.3 gentoo. 

For the first bug (the one reported above), I've found the fix in the current vlc CVS tree: 

----------------------------------------------------------------------------
--- vlc-0.6.0.orig/modules/gui/wxwindows/menus.cpp 
+++ vlc-0.6.0/modules/gui/wxwindows/menus.cpp 
@@ -516,7 +516,8 @@
           menuitem =
               new wxMenuItemExt( menu, ++i_item_id,
                                  text_list.p_list->p_values[i].psz_string ?
-                                 wxU(text_list.p_list->p_values[i].psz_string):
+                                 (wxString)wxU(
+                                   text_list.p_list->p_values[i].psz_string):
                                  wxString::Format(wxT("%d"),
                                  val_list.p_list->p_values[i].i_int),
                                  wxT(""), wxITEM_RADIO, strdup(psz_var),
----------------------------------------------------------------------------

I then had a second issue, also in the wxwindows code, but this one is, from what I've read, a gcc bug:

----------------------------------------------------------------------------
g++ -DHAVE_CONFIG_H -I. -I. -I.  -I./include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -DLOCALEDIR=\"/usr/share/locale\" -DDATA_PATH=\"/usr/share/vlc\" -DPLUGIN_PATH=\"/usr/lib/vlc\" -DHAVE_RELEASE    -D__VLC__ -D__PLUGIN__  -DMODULE_NAME=wxwindows -DMODULE_NAME_IS_wxwindows -DSYS_LINUX -O3 -ffast-math -funroll-loops -mcpu=pentiumpro -fomit-frame-pointer     -fPIC -I/usr/lib/wx/include/gtk2-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I./include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -DLOCALEDIR=\"/usr/share/locale\" -DDATA_PATH=\"/usr/share/vlc\" -DPLUGIN_PATH=\"/usr/lib/vlc\" -DHAVE_RELEASE    -D__VLC__ -D__PLUGIN__  -DMODULE_NAME=wxwindows -DMODULE_NAME_IS_wxwindows -Wsign-compare -Wsign-compare -Wall  -finline-limit-30000 -pipe -c -o modules/gui/wxwindows/modules_gui_wxwindows_libwxwindows_plugin_a-subtitles.o `test -f 'modules/gui/wxwindows/subtitles.cpp' || echo './'`modules/gui/wxwindows/subtitles.cpp
modules/gui/wxwindows/subtitles.cpp: In method `SubsFileDialog::SubsFileDialog(intf_thread_t *, wxWindow *)':
modules/gui/wxwindows/subtitles.cpp:171: Unable to generate reloads for:
(insn 3769 3767 3771 (parallel[
            (set (reg:SI 6 %ebp)
                (fix:SI (fix:SF (reg/v:SF 658))))
            (clobber (mem:HI (plus:SI (reg:SI 6 %ebp)
                        (const_int -18 [0xffffffee])) 0))
            (clobber (mem:HI (plus:SI (reg:SI 6 %ebp)
                        (const_int -20 [0xffffffec])) 0))
            (clobber (mem:SI (plus:SI (reg:SI 6 %ebp)
                        (const_int -24 [0xffffffe8])) 0))
            (clobber (scratch:HI))
        ] ) 145 {fix_truncsfsi2+1} (nil)
    (expr_list:REG_DEAD (reg/v:SF 658)
        (expr_list:REG_UNUSED (scratch:HI)
            (nil))))
make[2]: *** [modules/gui/wxwindows/modules_gui_wxwindows_libwxwindows_plugin_a-subtitles.o] Error 1
----------------------------------------------------------------------------

I've found that it does not happen if I remove "-fomit-frame-pointer" flag, introduced by the "CFLAGS_nodebug" Makefile variable. I've not been able to patch the Makefile(.in/am) to remove this flag only for this "subtitles.cpp" target, so I've made a really ugly hack in the ebuild: 
 - first, make -k to build everything I can with this optimization
 - then, make CFLAGS_nodebug="" to build what remains. 

----------------------------------------------------------------------------
src_compile() {
<snip>
	make -k || make CFLAGS_nodebug="" || die "make of VLC failed"
}
----------------------------------------------------------------------------

I then had yet another issue with in the skin module. I don't know if this one is gcc-2.95.3 specific or not.

----------------------------------------------------------------------------
gcc -DHAVE_CONFIG_H -I. -I. -I.  -I./include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -DLOCALEDIR=\"/usr/local/share/locale\" -DDATA_PATH=\"/usr/local/share/vlc\" -DPLUGIN_PATH=\"/usr/local/lib/vlc\"     -D__VLC__ -D__PLUGIN__ -I/usr/lib/wx/include/gtk2-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWX_SKINS -O2 -fno-rtti -Imodules/gui/skins -I/usr/X11R6/include -I/usr/X11R6/include -DX11_SKINS -DMODULE_NAME=skins -DMODULE_NAME_IS_skins -DSYS_LINUX -O2      -fPIC  -I./include -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -DLOCALEDIR=\"/usr/local/share/locale\" -DDATA_PATH=\"/usr/local/share/vlc\" -DPLUGIN_PATH=\"/usr/local/lib/vlc\"     -D__VLC__ -D__PLUGIN__ -I/usr/lib/wx/include/gtk2-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DWX_SKINS -O2 -fno-rtti -Imodules/gui/skins -I/usr/X11R6/include -I/usr/X11R6/include -DX11_SKINS -DMODULE_NAME=skins -DMODULE_NAME_IS_skins -Wsign-compare -Wall  -finline-limit-30000 -pipe -c -o modules/gui/skins/parser/modules_gui_skins_libskins_plugin_a-skin.o `test -f 'modules/gui/skins/parser/skin.c' || echo './'`modules/gui/skins/parser/skin.c
skin.act:33: ../parser/wrappers.h: No such file or directory
skin.act: In function `STag_Bitmap':
skin.act:38: warning: implicit declaration of function `AddBitmap'
skin.act: In function `STag_Event':
skin.act:43: warning: implicit declaration of function `AddEvent'
skin.act: In function `STag_Font':
skin.act:48: warning: implicit declaration of function `AddFont'
skin.act: In function `STag_ThemeInfo':
skin.act:54: warning: implicit declaration of function `AddThemeInfo'
skin.act: In function `STag_Window':
skin.act:59: warning: implicit declaration of function `StartWindow'
skin.act: In function `ETag_Window':
skin.act:65: warning: implicit declaration of function `EndWindow'
skin.act: In function `STag_ControlGroup':
skin.act:70: warning: implicit declaration of function `StartControlGroup'
skin.act: In function `ETag_ControlGroup':
skin.act:75: warning: implicit declaration of function `EndControlGroup'
skin.act: In function `STag_Anchor':
skin.act:80: warning: implicit declaration of function `AddAnchor'
skin.act: In function `STag_ImageControl':
skin.act:85: warning: implicit declaration of function `AddImage'
skin.act: In function `STag_RectangleControl':
skin.act:90: warning: implicit declaration of function `AddRectangle'
skin.act: In function `STag_ButtonControl':
skin.act:96: warning: implicit declaration of function `AddButton'
skin.act: In function `STag_CheckBoxControl':
skin.act:106: warning: implicit declaration of function `AddCheckBox'
skin.act: In function `STag_SliderControl':
skin.act:118: warning: implicit declaration of function `AddSlider'
skin.act: In function `STag_TextControl':
skin.act:124: warning: implicit declaration of function `AddText'
skin.act: In function `STag_PlayListControl':
skin.act:131: warning: implicit declaration of function `AddPlayList'
skin.act: In function `ETag_PlayListControl':
skin.act:138: warning: implicit declaration of function `AddPlayListEnd'
skin.act: In function `STag_Theme':
skin.act:143: warning: implicit declaration of function `StartTheme'
skin.act: In function `ETag_Theme':
skin.act:148: warning: implicit declaration of function `EndTheme'
make[2]: *** [modules/gui/skins/parser/modules_gui_skins_libskins_plugin_a-skin.o] Error 1
----------------------------------------------------------------------------

I've solved this one by patching "skin.c" to change the path to the missing header, but it would probably be better to add a correct -I flag:

----------------------------------------------------------------------------
--- vlc-0.6.0.orig/modules/gui/skins/parser/skin.c
+++ vlc-0.6.0/modules/gui/skins/parser/skin.c
@@ -28,7 +28,7 @@
 #line 31 "skin.act"
  
          
-            #include "../parser/wrappers.h"
+            #include "modules/gui/skins/parser/wrappers.h"
          
      
 void STag_Bitmap(void)
----------------------------------------------------------------------------

And the last thing I've changed is cosmetic, and not gcc-2.95 specific: there was no way to launch the skinable vlc without setting it as the default interface in the options file, so I've added a shortcut, "svlc", for this interface in the ebuild:

----------------------------------------------------------------------------
src_install() {
<snip>
	use imlib && use wxwindows && dosym /usr/bin/vlc /usr/bin/svlc
<snip>
}
----------------------------------------------------------------------------

And in the skin_main.cpp module:

----------------------------------------------------------------------------
--- vlc-0.6.0.orig/modules/gui/skins/src/skin_main.cpp
+++ vlc-0.6.0/modules/gui/skins/src/skin_main.cpp
@@ -368,6 +368,7 @@
     set_description( _("Skinnable Interface") );
     set_capability( "interface", 30 );
     set_callbacks( Open, Close );
+    set_program( "svlc" );
 vlc_module_end();
  
  
----------------------------------------------------------------------------

I will attach the version of ebuild and patch I've finally successfully used, so that you can pick up what you think should be added to the official ebuild. I hope it won't break on gcc-3.x (or maybe you can "inherit gcc" and only apply  this changes if $(gcc-version) = 2.95).
Comment 2 TGL 2003-07-18 10:54:43 UTC
Created attachment 14668 [details, diff]
files/vlc-0.6.0-misc.patch

The above described fixes against vlc-0.6.0 sources.
Comment 3 TGL 2003-07-18 10:56:01 UTC
Created attachment 14669 [details]
vlc-0.6.0-r2.ebuild

The corresponding updated ebuild.
Comment 4 Derk-Jan Hartman 2003-07-20 13:49:54 UTC
The problem with:
modules/gui/wxwindows/subtitles.cpp

is truly a gcc related problem, as far as the VLC team can asses. All the other issues now 
fixed upstream as well.
Comment 5 Nick Hadaway 2003-07-23 12:00:52 UTC
as 0.6.1 is in the test phase upstream... i am going to leave 0.6.0-r1 as it is in portage.  As soon as 0.6.1 is released I will post a message here so you can re-test the new version with the fix0red code.
Comment 6 Nick Hadaway 2003-08-01 01:50:03 UTC
vlc-0.6.1 has been added to portage.  Please let me know if you have any problems.
Comment 7 TGL 2003-08-12 21:00:29 UTC
Thanks for the update, and sorry for the late reply, I was in vacations. The only compiling issue I still have is the gcc bug in wxwindows code with -fomit-frame-pointer. I've used about the same workaround than with 0.6.0, ie compiling all I can with the flag enabled, and then remove it and call "make" again to compile the remaining files:
  emake -k \
    || ( sed -i s:"-fomit-frame-pointer":: vlc-config && emake ) \
    || die "make of VLC failed"

I've not done much runtime tests so far, I'll bug you if I have some issues. 
Comment 8 Nick Hadaway 2003-08-13 19:56:27 UTC
and vlc-0.6.2 is now in portage

I've gotta take some time and figure out a "proper" way to do the build on a gcc2 system... while your workaround gets you through the build it isn't a good thing to add to the build.  There has to be a better way to work around this issue.

I need to look more into how vlc determines what cflags to use.

Comment 9 Nick Hadaway 2003-08-15 18:57:23 UTC
vlc-0.6.2 has been updated in portage.  Now it strips -fomit-frame-pointer from vlc-config if you are using gcc2.  Let me know if you find any further problems.
Comment 10 TGL 2003-08-19 08:11:52 UTC
Sorry (again) for the late reply, I've been quite busy.

With your patch to vlc-config, compilation fails at some point in some asm code. I guess some register lacks because of the frame pointer being kept. What can be done is to only strip the -fomit-frame-pointer flag for the wxwindows module. Here is the sed patch to vlc-config I've successfully used, as a replacement of yours:

	if [ `gcc-major-version` -eq 2 ]; then
		sed -i s:"^    wxwindows)$":"    wxwindows)\n      cppflags=\"\`echo \${cppflags} | sed s\:-fomit-frame-pointer\:\:\`\"": vlc-config
	fi

(where the sed command is a single line, in case it has been cut here)
Here is what it produces in vlc-config:

[...]
    wxwindows)
      cppflags="`echo ${cppflags} | sed s:-fomit-frame-pointer::`"
[...]
Comment 11 Nick Hadaway 2003-08-19 09:19:41 UTC
cvs is being worked on right now... but the update is poised and ready to be committed... i'll post again as soon as it is up so you can test it. :)
Comment 12 TGL 2003-08-25 17:41:09 UTC
ping!
is cvs still being worked on? ;)