Bug 173464 - media-libs/flac-1.2.1-r3: autoconf fails due to missing AM_ICONV on uclibc
Bug#: 173464 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: sound@gentoo.org Reported By: natanael.copa@gmail.com
Component: Ebuilds
URL: 
Summary: media-libs/flac-1.2.1-r3: autoconf fails due to missing AM_ICONV on uclibc
Keywords:  
Status Whiteboard: 
Opened: 2007-04-05 13:55 0000
Description:   Opened: 2007-04-05 13:55 0000
cat /var/tmp/portage/media-libs/flac-1.1.2-r8/temp/autoconf-25344.out
***** autoconf *****

configure.in:180: error: possibly undefined macro: AM_ICONV
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.in:181: error: possibly undefined macro: AM_LANGINFO_CODESET

------- Comment #1 From SpanKY 2007-04-07 10:50:39 0000 -------
no way around it i dont think ... either you bundled the gettext m4 garbage
with flac so that those macros are included or you emerge gettext on your
machine to get the appropriate .m4 files, or you dont run autotools at all for
flac ...

------- Comment #2 From Francisco José Cañizares Santofimia 2007-07-16 09:43:46 0000 -------
Same problem here compiling flac 1.1.4

------- Comment #3 From Francisco José Cañizares Santofimia 2007-07-16 09:44:13 0000 -------
Same problem here compiling flac 1.1.4

------- Comment #4 From Francisco José Cañizares Santofimia 2007-07-16 20:49:42 0000 -------
Recompiling gettext solved the issue for me.

------- Comment #5 From SpanKY 2007-09-15 01:05:30 0000 -------
this isnt an embedded specific issue ... same problem should occur on a
USE=-nls system that has gettext uninstalled

a better question is how come upstream hasnt merged our patches yet to the
build system

------- Comment #6 From Natanael Copa 2008-02-21 15:00:21 0000 -------
Created an attachment (id=144215) [details]
flac-1.2.1-r2.ebuild.patch

I suggest this as a walkaround the need for gettext. Instead of patching
configure.in, just add the CFLAGS to emake to enforce them. this works on
uclibc.

------- Comment #7 From Samuli Suominen 2008-02-21 17:11:01 0000 -------
added a fix (I hope) to already existing flac-1.2.1-r2.. 

------- Comment #8 From Natanael Copa 2008-03-17 13:03:48 0000 -------
Still don't work. When I made the original patch I actually tried to include
the AM_ICONV stuff as in tree now. I never got it working, gave up and went for
the quick and dirty emake CFLAGS="$CFLAGS".

 * Running aclocal -I ../m4 -I m4 ...                                     [ ok
]
 * Running autoconf ...                                                   [ !!
]

 * Failed Running autoconf !
 * 
 * Include in your bugreport the contents of:
 * 
 *   /var/tmp/portage/media-libs/flac-1.2.1-r2/temp/autoconf-7879.out

...

 # cat /var/tmp/portage/media-libs/flac-1.2.1-r2/temp/autoconf-7879.out
***** autoconf *****

configure.in:259: warning: AC_LIB_PREPARE_PREFIX is m4_require'd but not
m4_defun'd
../m4/iconv.m4:9: AM_ICONV_LINKFLAGS_BODY is expanded from...
../m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
../m4/iconv.m4:154: AM_ICONV is expanded from...
configure.in:259: the top level
configure.in:259: warning: AC_LIB_RPATH is m4_require'd but not m4_defun'd
configure:22723: error: possibly undefined macro: AC_LIB_PREPARE_PREFIX
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:22724: error: possibly undefined macro: AC_LIB_RPATH
configure:22729: error: possibly undefined macro: AC_LIB_LINKFLAGS_BODY
configure:22737: error: possibly undefined macro: AC_LIB_APPENDTOVAR

------- Comment #9 From Natanael Copa 2008-06-17 09:12:22 0000 -------
this is still an issue

------- Comment #10 From Natanael Copa 2008-06-17 09:13:43 0000 -------
Created an attachment (id=157223) [details]
lib-prefix.m4

copy this file to m4 dir

------- Comment #11 From Natanael Copa 2008-06-17 09:14:08 0000 -------
Created an attachment (id=157225) [details]
lib-link.m4

------- Comment #12 From Natanael Copa 2008-06-17 09:14:33 0000 -------
Created an attachment (id=157227) [details]
lib-ld.m4

------- Comment #13 From Natanael Copa 2008-06-17 09:15:04 0000 -------
Created an attachment (id=157231) [details]
codeset.m4

------- Comment #14 From Natanael Copa 2008-06-17 09:17:27 0000 -------
put all the .m4 fiels in $FILESDIR and this patch fixes the issue.

Long time solution would probably to split the gettext package or create an
gettext-m4 package that only includes the .m4 files from gettext.

--- flac-1.2.1-r3.ebuild.orig   2008-06-17 09:15:30 +0000
+++ flac-1.2.1-r3.ebuild        2008-06-17 09:06:48 +0000
@@ -33,6 +33,7 @@
 src_unpack() {
        base_src_unpack
        cd "${S}"
+       cp "${FILESDIR}"/*.m4 m4
        AT_M4DIR="m4" eautoreconf
 }


------- Comment #15 From Samuli Suominen 2009-07-23 08:23:47 0000 -------
thanks, finally did that