Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 113449 - vlc-0.8.4_beta3 compile fails if wxGTK isn't compiled with unicode
Summary: vlc-0.8.4_beta3 compile fails if wxGTK isn't compiled with unicode
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-24 04:03 UTC by Per Osbeck
Modified: 2005-12-08 05:35 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Per Osbeck 2005-11-24 04:03:58 UTC
if wxGTK is compiled without unicode flag, media-video/vlc-0.8.4_beta3 (and
beta2) fails to compile.

Reproducible: Always
Steps to Reproduce:
1. emerge wxGTK with -unicode
2. emerge vlc-0.8.4_beta3 with wxwindows


Actual Results:  
vlc compilation error:
open.cpp: In function `char* ProbeDVD(const wxChar*)':
open.cpp:1337: error: request for member `data' in `tmp_buf', which is of
non-aggregate type `const wxChar*'
open.cpp: In function `char* ProbeCDDA(const wxChar*)':
open.cpp:1407: error: request for member `data' in `tmp_buf', which is of
non-aggregate type `const wxChar*'
open.cpp: In function `char* ProbeVCD(const wxChar*)':
open.cpp:1420: error: request for member `data' in `tmp_buf', which is of
non-aggregate type `const wxChar*'
......


http://forum.videolan.org/viewtopic.php?t=13569&highlight=wxchar
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-11-24 04:16:58 UTC
emerge --info, please...
Comment 2 Per Osbeck 2005-11-24 10:31:11 UTC
Portage 2.0.53_rc7 (default-linux/x86/2005.1, gcc-4.0.2, glibc-2.3.6-r1,
2.6.15-rc2-mm1 i686)
=================================================================
System uname: 2.6.15-rc2-mm1 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.12.0_pre11
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1, 2.16.91.0.3, 2.16.91.0.4
sys-devel/libtool:   1.5.20-r1
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE=""
ARCH="x86"
AUTOCLEAN="yes"
BASH_ENV="/etc/spork/is/not/valid/profile.env"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -msse2 -msse3 -mfpmath=sse -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CLEAN_DELAY="5"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=prescott -O2 -msse2 -msse3 -mfpmath=sse -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
ELIBC="glibc"
EMERGE_WARNING_DELAY="10"
FEATURES="autoconfig ccache distcc distlocks sandbox sfperms strict"
FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P ${DISTDIR} ${URI}"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
KERNEL="linux"
LOGNAME="root"
MAKEOPTS="-j4"
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.0.2:/usr/kde/3.5/sbin:/usr/kde/3.5/bin:/usr/qt/3/bin"
PKGDIR="/usr/portage/packages"
PORTAGE_ARCHLIST="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 ppc-macos s390
sh sparc x86 x86-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_CALLER="emerge"
PORTAGE_GID="250"
PORTAGE_MASTER_PID="17416"
PORTAGE_NICENESS="9"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/fluidportage/trunk
/usr/local/bmg-main"
PRELINK_PATH=""
PRELINK_PATH_MASK=""
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P ${DISTDIR} ${URI}"
RPMDIR="/usr/portage/rpm"
RSYNC_RETRIES="3"
RSYNC_TIMEOUT="180"
SHELL="/bin/bash"
SUDO_COMMAND="/usr/bin/emerge -av --info"
SUDO_GID="100"
SUDO_UID="1000"
TERM="xterm"
USE="x86 X alsa apm audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdr
crypt cups curl dbus dri dts eds emboss exif expat fam ffmpeg firefox flac
foomaticdb fortran gdbm gif gimp glut gmp gnome gnutls gphoto2 gpm gstreamer gtk
gtk2 hal idn imlib jpeg kde kdeenablefinal lcms libg++ libwww mad matroska
mikmod mmx mng motif mozilla mp3 mpeg ncurses nls nptl ogg oggvorbis opengl pam
pcre pdflib perl png python quicktime readline ruby samba sdl smp spell sse sse2
sse3 ssl svga tcpd tiff truetype truetype-fonts type1-fonts udev usb vorbis
win32codecs xine xml2 xmms xv xvid zlib video_cards_radeon userland_GNU
kernel_linux elibc_glibc"
USER="root"
USERLAND="GNU"
USE_EXPAND="FRITZCAPI_CARDS FCDSL_CARDS VIDEO_CARDS INPUT_DEVICES LINGUAS
USERLAND KERNEL ELIBC"
VIDEO_CARDS="radeon"
XARGS="xargs -r"
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-24 11:31:24 UTC
I'll give that a try, there's a way to workaround it. 
 
Comment 4 Patrizio Bassi 2005-11-28 07:31:23 UTC
same here with 0.8.4 final  
Comment 5 ArmiDuctor 2005-11-28 08:34:29 UTC
(In reply to comment #4)
> same here with 0.8.4 final  

And with 0.8.4-r1 :-(
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-28 08:38:16 UTC
I know, until this bug get closed, it's still unfixed. I'm trying to fix it 
but that's more tricky than I thought (wx aliases a basic type to an object 
instance when switching between unicode and non-unicode, and that is the 
problem). 
Comment 7 René Marten 2005-11-28 09:10:59 UTC
same here with -r1 
Comment 8 Patrizio Bassi 2005-11-28 09:14:01 UTC
diego are u sure? 
 
do this: 
//  char *psz_device = const_cast<char *>(tmp_buf.data()); 
 
const char *psz_device = (const char*) tmp_buf; 
 
seems so easy. of course for all 3 points :) 
 
i've tested compilation only,seems good. 
can't try runtime. actually, do you tests :) 
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-28 09:18:35 UTC
That should be fine, when you're NOT using unicode. The problem is getting   
both.   
Btw the (const char*) cast need to be inside a const_cast, or it would give 
problems. 
I know there were problems with unicode/nonunicode when doing raw casts. 
 
Comment 10 Patrizio Bassi 2005-11-28 09:20:52 UTC
oops, wrong wheel click, of course "const" is not needed on the 2nd and 3rd point. 
you can drop on all. 
 
i dunno if that works on unicode system too. test. 
if not, conditional patch is easy thanks to wx eclass 
Comment 11 Joe Khoobyar 2005-11-28 13:50:00 UTC
I've got the same problem over here with 0.8.4-r1
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-28 14:16:19 UTC
... people, which part of "I know" it's difficult to understand? Please don't 
post any more "me too" comments, thanks! 
Comment 13 Patrizio Bassi 2005-11-28 23:58:21 UTC
ehhehe diego :) 
 
with wxGTK - ansi it works. 
anyone with wx-unicoded can try that? 
 
i bet it works... 
Comment 14 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-29 04:18:55 UTC
The problem is not to fix the compilation issue, that's trivial to fix. The 
problem is if the intended result is still achieved. 
And conditional patching is _always_ a no-go. 
 
Comment 15 Patrizio Bassi 2005-11-29 05:03:45 UTC
i'm not sure i understood your words.  
  
i can tell you that on ansi release, the patch works.  
  
that's why i asked "test" on unicode. 
  
i'll post something on vlc forum too.  
Comment 16 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-29 05:09:45 UTC
You checked that the code changed by the patch behaves correctly? Have a 
testcase handy (that's what I'm currently trying to find out). 
Compile-test is not enough. 
Comment 17 Patrizio Bassi 2005-11-29 05:29:25 UTC
i've been very fast but i can say: 
 
1) it's a char* convertion..so it must work! problem woulb be a corrupted string, which i 
didn't found. 
 
2) it should be asked when you open a file..select dvd/cdda... 
got no problems here. 
 
i didn't investigate too much.. 
Comment 18 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-11-29 05:37:22 UTC
It's a char* conversion that have to work with unicode, what I'm still unsure 
about the conversion is if it wants to have a iso-8859-1 or utf-8 string or an 
8-bit array of utf-16 encoded characters... 
 
Never underestimate such changes. The problem came up on vlc-devel mailing 
list, I'm waiting to see if upstream devs, that for sure know what should be 
done there, are going to prepare a fix. 
Comment 19 Patrizio Bassi 2005-11-29 05:57:16 UTC
both solution provide char*, so i don't think that's a problem with encoding strings. 
char* is a char* :) 
 
they ask for ProbeDevice() function that uses cdio_get_devices_with_cap(). 
 
i'm now more sure it can work :) 
 
i inserted an audio disk and it found it, reproduncing. 
 
with vlc 0.82 it doesn't.sufficient for me :) 
Comment 20 t35t0r 2005-12-05 19:20:19 UTC
i'm just going to use -wxwidgets for now
Comment 21 t35t0r 2005-12-05 20:01:39 UTC
ok that was dumb i just realized nothing works in this program without wxwidgets
Comment 22 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-08 04:31:20 UTC
I've made unicode support mandatory, I'd rather not start tinker with upstream 
sources if they prefer to use Unicode-only. 
 
Comment 23 Patrizio Bassi 2005-12-08 05:18:14 UTC
Diego patch is ready...this is an absurd choice.  
  
there are so many gentoo-only patches in portage for critical apps (ex mysql, apache..)  
this is absurd. 1 line patch rejected and forced unicode support.  
  
i respect your choice..but..lemme say my opinion. 
in whole portage there was only ipodder to ask that, and now we have ipodder with 
not-utf8 support. 
probably it will be the only app to force it.. 
Comment 24 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-12-08 05:28:24 UTC
I don't have problems with gentoo-only patches as long as they have the same 
identical behaviour as the original, but as VLC is probably going to continue 
with unicode-only support upstream, diverging on that might create bigger 
problems. 
I don't have the time to maintain a "forked" version, and as upstream seems to 
want unicode, I follow them on this. 
FWIW, there's no big deal in using unicode in wxGTK or not, and I don't think 
that wx interface is going to be used on embedded systems, so I don't feel 
this issue like critical. 
 
Comment 25 Patrizio Bassi 2005-12-08 05:35:25 UTC
i do agree with you but consider: 
 
1) it's not forked, it's 1 line patch! 
2) consider the release time...one rel every 7-8 months. i don't thing it's a big problem. 
it's not patching a release every week. 
3) forcing it always bad, probably against all Gentoo ideas. and unicode version is 
slower ihmo (at least on my system).