Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 216844 - media-video/vlc-0.8.6f fails to compile on uclibc due to missing iconv
Summary: media-video/vlc-0.8.6f fails to compile on uclibc due to missing iconv
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-08 09:15 UTC by Natanael Copa
Modified: 2012-03-13 02:06 UTC (History)
1 user (show)

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


Attachments
vlc-0.8.6e-r1.ebuild (vlc-0.8.6e-r1.ebuild,9.04 KB, text/plain)
2008-04-08 09:17 UTC, Natanael Copa
Details
vlc-0.8.6f.ebuild (vlc-0.8.6f.ebuild,9.26 KB, text/plain)
2008-04-29 14:15 UTC, Natanael Copa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Natanael Copa 2008-04-08 09:15:50 UTC
missing iconv is a common problem with uclibc. Many apps have --disable-nls but few have this implemented properly. this is the case with vlc.

I have tried to fix it but it seems like it actually needs iconv. It is possile to work around this by using the mini-iconv and link it statically. (its approx 2k so link dynamically would increase the disk usage)
Comment 1 Natanael Copa 2008-04-08 09:17:21 UTC
Created attachment 149088 [details]
vlc-0.8.6e-r1.ebuild

--- vlc-0.8.6e-r1.ebuild.orig	2008-04-08 09:16:33 +0000
+++ vlc-0.8.6e-r1.ebuild	2008-04-08 09:02:24 +0000
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/vlc/vlc-0.8.6e-r1.ebuild,v 1.7 2008/03/27 11:36:27 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/vlc/vlc-0.8.6e-r1.ebuild,v 1.6 2008/03/24 17:57:15 klausman Exp $
 
 WANT_AUTOMAKE=latest
 WANT_AUTOCONF=latest
@@ -25,7 +25,8 @@
 fi
 
 SRC_URI="${SRC_URI}
-	mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2"
+	mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2
+	http://distrib-coffee.ipsl.jussieu.fr/pub/linux/alpine/alpine/mini-iconv/mini-iconv.tar.bz2"
 
 LICENSE="GPL-2"
 SLOT="0"
@@ -36,7 +37,7 @@
 oss aalib ggi libcaca esd arts alsa wxwindows ncurses xosd lirc stream
 mp3 xv bidi sdl sdl-image png xml samba daap corba modplug speex shout rtsp
 win32codecs skins hal avahi xinerama cddb directfb upnp nsplugin seamonkey
-optimisememory libnotify jack musepack x264 dc1394 gnome"
+optimisememory libnotify jack musepack x264 dc1394 gnome nls"
 
 RDEPEND="
 		>=media-video/ffmpeg-0.4.9_p20050226-r1
@@ -158,6 +159,15 @@
 	local XPIDL=""
 	local MOZILLA_CONFIG=""
 
+	if ! use nls; then
+		# build statically against the mini-iconv
+		cd "${WORKDIR}/mini-iconv"
+		emake static || die "mini-iconv"
+		emake install DESTDIR="${WORKDIR}" PREFIX="/mini-iconv" 
+		myconf="${myconf} --with-libiconv-prefix=${WORKDIR}/mini-iconv"
+		cd "${S}"
+	fi
+
 	use vlm && \
 		myconf="${myconf} --enable-vlm --enable-sout" || \
 		myconf="${myconf} --disable-vlm"
@@ -253,6 +263,7 @@
 		$(use_enable x264) \
 		$(use_enable dc1394) \
 		$(use_enable directfb) \
+		$(use_enable nls) \
 		--enable-ffmpeg \
 		--disable-faad \
 		--disable-dv \
Comment 2 Natanael Copa 2008-04-08 09:25:32 UTC
btw... the mini-conv was found here:
http://tinderbox.dev.gentoo.org/portage/local/misc/mini-iconv/

The tarball should probably be hosted on mirror://gentoo

Comment 3 Natanael Copa 2008-04-29 14:15:12 UTC
Created attachment 151340 [details]
vlc-0.8.6f.ebuild

uses uiconv rather than mini-iconv. Difference is that uiconv actually manage to convert from and to iso-8859-1 and utf-8 while mini-iconv only claims to do so while it only manage to handle ascii (7 bit).
Comment 4 SpanKY gentoo-dev 2008-05-04 09:10:20 UTC
ive attempted before to get vlc working without iconv (after hacking down into the code to stub things out) and could never get it to work without

adding mini-iconv into ebuilds isnt acceptable ... if it cant be integrated generically (which is to say you emerge the package and then the iconv detection/linking happens magically in all other packages), then there's nothing to be done ... the proposed changes certainly should not be added to the vlc ebuild
Comment 5 Natanael Copa 2008-05-05 07:23:56 UTC
(In reply to comment #4)
> ive attempted before to get vlc working without iconv (after hacking down into
> the code to stub things out) and could never get it to work without
> 
> adding mini-iconv into ebuilds isnt acceptable ... if it cant be integrated
> generically (which is to say you emerge the package and then the iconv
> detection/linking happens magically in all other packages), then there's
> nothing to be done ... the proposed changes certainly should not be added to
> the vlc ebuild

correct me if I'm wrong, but I don't think you want it automatically detected and linked in. I believe that there are way too many programs that will find it and link it in that really don't need to, adding completely unnecessary bloat. could be a dynamic lib but IIRC that caused problems with the gcc upgrades. Thats the reason the gnu iconv is masked.

The only apps that really *need* iconv are very few. So far I have only met glib and vlc of 400-500 uclibc apps.
Comment 6 SpanKY gentoo-dev 2008-05-05 08:13:37 UTC
thats the point of USE flags ... to prevent automatic detection (when possible)

in the case of vlc/glib, it is not possible
Comment 7 Alexis Ballier gentoo-dev 2012-03-09 21:17:10 UTC
well, this bug is quite old, please contact upstream if this still fails
Comment 8 SpanKY gentoo-dev 2012-03-13 02:06:58 UTC
it does fail, but i don't think this is something to fix in vlc.  i know it works with GNU libiconv on uClibc systems.