Cannot build SVN 2078

Got this error:
/usr/share/automake-1.10/am/depend2.am: am__fastdepCXX does not appear in AM_CONDITIONAL
/usr/share/automake-1.10/am/depend2.am: The usual way to define `am__fastdepCXX' is to add `AC_PROG_CXX'
/usr/share/automake-1.10/am/depend2.am: to `configure.in' and run `aclocal' and `autoconf' again.
decoder_plugins/sidplay2/Makefile.am: C++ source seen but `CXX' is undefined
decoder_plugins/sidplay2/Makefile.am: The usual way to define `CXX' is to add `AC_PROG_CXX'
decoder_plugins/sidplay2/Makefile.am: to `configure.in' and run `autoconf' again.
+ '[' 1 '!=' 0 ']'
+ cat
If you see errors it maight be necassary to install additional packages like
autoconf >= 2.60
automake >= 1.9
libltdl (libltdl3-dev debian package)
and all -devel packages mentioned in the README file

2.5.0-alpha3 compiles without problems. ArchLinux, libtool 2.2 WITH libltdl.

Add AC_PROG_CXX to configure.in. Autogen and configure scripts finished ok, but when I try to make it still fails:
make[3]: Entering directory `/home/storm/builds/cvs-svn/moc-svn/src/moc-build/decoder_plugins/mp3'<br /> /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -g -O2 -Wall -W -I/usr/include/alsa -MT libmp3_decoder_la-mp3.lo -MD -MP -MF .deps/libmp3_decoder_la-mp3.Tpo -c -o libmp3_decoder_la-mp3.lo `test -f 'mp3.c' || echo './'`mp3.c<br /> ../../libtool: line 765: X--tag=CC: command not found<br /> ../../libtool: line 798: libtool: ignoring unknown tag : command not found<br /> ../../libtool: line 765: X--mode=compile: command not found<br /> ../../libtool: line 915: *** Warning: inferring the mode of operation is deprecated.: command not found<br /> ../../libtool: line 916: *** Future versions of Libtool will require -mode=MODE be specified.: command not found<br /> ../../libtool: line 1059: Xgcc: command not found<br /> ../../libtool: line 1059: X-DHAVE_CONFIG_H: command not found<br /> ../../libtool: line 1059: X-I.: command not found<br /> ../../libtool: line 1059: X-I../..: No such file or directory<br /> ../../libtool: line 1059: X-I../..: No such file or directory<br /> ../../libtool: line 1059: X-g: command not found<br /> ../../libtool: line 1059: X-O2: command not found<br /> ../../libtool: line 1059: X-Wall: command not found<br /> ../../libtool: line 1059: X-W: command not found<br /> ../../libtool: line 1059: X-I/usr/include/alsa: No such file or directory<br /> ../../libtool: line 1059: X-MT: command not found<br /> ../../libtool: line 1059: Xlibmp3_decoder_la-mp3.lo: command not found<br /> ../../libtool: line 1059: X-MD: command not found<br /> ../../libtool: line 1059: X-MP: command not found<br /> ../../libtool: line 1059: X-MF: command not found<br /> ../../libtool: line 1059: X.deps/libmp3_decoder_la-mp3.Tpo: No such file or directory<br /> ../../libtool: line 1059: X-c: command not found<br /> ../../libtool: line 1107: Xlibmp3_decoder_la-mp3.lo: command not found<br /> ../../libtool: line 1112: libtool: compile: cannot determine name of library object from `': command not found<br /> make[3]: *** [libmp3_decoder_la-mp3.lo] Error 1<br /> make[3]: Leaving directory `/home/storm/builds/cvs-svn/moc-svn/src/moc-build/decoder_plugins/mp3'<br /> make[2]: *** [all-recursive] Error 1<br /> make[2]: Leaving directory `/home/storm/builds/cvs-svn/moc-svn/src/moc-build/decoder_plugins'<br /> make[1]: *** [all-recursive] Error 1<br /> make[1]: Leaving directory `/home/storm/builds/cvs-svn/moc-svn/src/moc-build'<br /> make: *** [all] Error 2

This problem happens when the m4/libtool.m4 and m4/lt* macros are from libtool-2.* and your system has libtool-1.5* on it. To fix this, you must run "rm m4/{libtool,lt*}.m4". Then, you must rerun "autoreconf -fvi", and then run "./configure", and then run make. I had this same problem with clamav-0.94.1rc1.

The most "direct" cause of this problem is found in the libtool script on the lines mentioned in the errors you listed:
../../libtool: line 765: X--tag=CC: command not found
If you look in the libtool script on line 765, you will find
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;

and for
../../libtool: line 798: libtool: ignoring unknown tag : command not found
you will find in libtool:
$echo "$progname: ignoring unknown tag $tagname" 1>&2

The problem is that the variable $echo is not set. If you look near the top of the libtool script file, there is probably a declaration of the variable ECHO="echo" or something similar. This definition is inserted into your libtool file from the m4/libtool.m4 scripts if I remember correctly. The rest of your libtool script is from your system, and uses the $echo variable rather than the $ECHO one, thus each time libtool tries to tell you something or even push a variable through a sed script, you get the "command not found" error. This is fixed by removing the libtool-related macro files from the programs macro directory and letting autoreconf -fvi grab the libtool-related macros from your system.

The SID-decoder is AFAIK the only component that requires a C++ compiler (I created this decoder). It seems like something is missing to setup the compilation on your system - I've never seen that error before.

I'll try to reproduce this with ArchLinux and find a solution.

I was not able to build revision 2078 due to problems with the native language support but I was not able to reproduce the described error. The language-problems seem to be fixed in revision 2081 and I had no problems building this revison (with and without sid decoder) in ArchLinux.
Could you try rev 2081 and see if it works for you ?

Still without success... Cannot build SVN 2081. Automake failed. I tried to remove sidplay2 libs but it doesn't change anything. Same error.
[storm@silence moc]$ ./autogen.sh<br /> + test -f Makefile<br /> + autopoint -f<br /> + aclocal -I m4<br /> + autoheader<br /> + automake -W all -a<br /> /usr/share/automake-1.10/am/depend2.am: am__fastdepCXX does not appear in AM_CONDITIONAL<br /> /usr/share/automake-1.10/am/depend2.am: The usual way to define `am__fastdepCXX' is to add `AC_PROG_CXX'<br /> /usr/share/automake-1.10/am/depend2.am: to `configure.in' and run `aclocal' and `autoconf' again.<br /> decoder_plugins/sidplay2/Makefile.am: C++ source seen but `CXX' is undefined<br /> decoder_plugins/sidplay2/Makefile.am: The usual way to define `CXX' is to add `AC_PROG_CXX'<br /> decoder_plugins/sidplay2/Makefile.am: to `configure.in' and run `autoconf' again.<br /> + autoconf -W syntax<br /> + '[' 0 '!=' 0 ']'

Continued...
Add AC_PROG_CXX to configure.in. Autogen finished ok. Manually set LIBTOOL var to '/usr/bin/libtool' instead of '$(SHELL) $(top_builddir)/libtool' which was set by script.
Compilation started and continues until this:
gcc -DHAVE_CONFIG_H -I. -DSYSTEM_THEMES_DIR=\"/usr/share/moc/themes\" -DPLUGIN_DIR=\"/usr/lib/moc/decoder_plugins\" -DLOCALEDIR=\"/usr/share/locale\" -g -O2 -Wall -W -I/usr/include/alsa -MT ltdl.o -MD -MP -MF .deps/ltdl.Tpo -c -o ltdl.o ltdl.c<br /> ltdl.c:318:1: warning: "strchr" redefined<br /> In file included from /usr/include/string.h:423,<br /> from ltdl.c:51:<br /> /usr/include/bits/string2.h:396:1: warning: this is the location of the previous definition<br /> ltdl.c:863: error: ‘LTDL_OBJDIR’ undeclared here (not in a function)<br /> ltdl.c: In function ‘sys_dl_open’:<br /> ltdl.c:1104: warning: unused parameter ‘loader_data’<br /> ltdl.c: In function ‘sys_dl_close’:<br /> ltdl.c:1119: warning: unused parameter ‘loader_data’<br /> ltdl.c: In function ‘sys_dl_sym’:<br /> ltdl.c:1135: warning: unused parameter ‘loader_data’<br /> ltdl.c: In function ‘presym_init’:<br /> ltdl.c:1948: warning: unused parameter ‘loader_data’<br /> ltdl.c: In function ‘presym_exit’:<br /> ltdl.c:1989: warning: unused parameter ‘loader_data’<br /> ltdl.c: In function ‘presym_open’:<br /> ltdl.c:2035: warning: unused parameter ‘loader_data’<br /> ltdl.c: In function ‘presym_close’:<br /> ltdl.c:2085: warning: unused parameter ‘loader_data’<br /> ltdl.c: In function ‘presym_sym’:<br /> ltdl.c:2095: warning: unused parameter ‘loader_data’<br /> ltdl.c: At top level:<br /> ltdl.c:2150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br /> ltdl.c: In function ‘tryall_dlopen_module’:<br /> ltdl.c:2485: warning: implicit declaration of function ‘sprintf’<br /> ltdl.c:2485: warning: incompatible implicit declaration of built-in function ‘sprintf’<br /> ltdl.c: In function ‘foreach_dirinpath’:<br /> ltdl.c:2684: warning: comparison between signed and unsigned<br /> ltdl.c:2693: warning: comparison between signed and unsigned<br /> ltdl.c: In function ‘find_file_callback’:<br /> ltdl.c:2730: error: ‘FILE’ undeclared (first use in this function)<br /> ltdl.c:2730: error: (Each undeclared identifier is reported only once<br /> ltdl.c:2730: error: for each function it appears in.)<br /> ltdl.c:2730: error: ‘pfile’ undeclared (first use in this function)<br /> ltdl.c:2730: error: invalid operands to binary *<br /> ltdl.c:2730: error: expected expression before ‘)’ token<br /> ltdl.c:2730: error: invalid operands to binary *<br /> ltdl.c:2730: warning: statement with no effect<br /> ltdl.c:2737: warning: implicit declaration of function ‘fopen’<br /> ltdl.c:2737: error: assignment of read-only location<br /> ltdl.c:2727: warning: unused parameter ‘data2’<br /> ltdl.c: At top level:<br /> ltdl.c:2752: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token<br /> ltdl.c:2757: error: expected identifier or ‘(’ before ‘{’ token<br /> ltdl.c: In function ‘find_handle_callback’:<br /> ltdl.c:2769: warning: unused parameter ‘ignored’<br /> ltdl.c: In function ‘load_deplibs’:<br /> ltdl.c:2807: warning: unused parameter ‘deplibs’<br /> ltdl.c: In function ‘try_dlopen’:<br /> ltdl.c:3113: error: ‘FILE’ undeclared (first use in this function)<br /> ltdl.c:3113: error: ‘file’ undeclared (first use in this function)<br /> ltdl.c:3113: error: invalid operands to binary *<br /> ltdl.c:3113: warning: statement with no effect<br /> ltdl.c:3137: warning: comparison between signed and unsigned<br /> ltdl.c:3139: warning: implicit declaration of function ‘isalnum’<br /> ltdl.c:3162: warning: implicit declaration of function ‘find_file’<br /> ltdl.c:3162: warning: statement with no effect<br /> ltdl.c:3169: warning: statement with no effect<br /> ltdl.c:3189: warning: statement with no effect<br /> ltdl.c:3205: warning: implicit declaration of function ‘fclose’<br /> ltdl.c:3211: warning: implicit declaration of function ‘feof’<br /> ltdl.c:3213: warning: implicit declaration of function ‘fgets’<br /> ltdl.c: In function ‘lt_dlopenext’:<br /> ltdl.c:3473: warning: the address of ‘archive_ext’ will always evaluate as ‘true’<br /> ltdl.c: In function ‘lt_dlpath_insertdir’:<br /> ltdl.c:3989: warning: comparison between signed and unsigned<br /> make[2]: *** [ltdl.o] Error 1<br /> make[2]: Leaving directory `/home/storm/builds/cvs-svn/moc-svn/src'<br /> make[1]: *** [all-recursive] Error 1<br /> make[1]: Leaving directory `/home/storm/builds/cvs-svn/moc-svn/src'<br /> make: *** [all] Error 2<br />

I'm not a coder but it seems like libtool issues, no?

I've just patch moc in gentoo with following patch,

diff -ur moc-2.5.0-alpha3.orig/configure.in moc-2.5.0-alpha3/configure.in
--- moc-2.5.0-alpha3.orig/configure.in 2008-02-26 00:37:30.000000000 +0200
+++ moc-2.5.0-alpha3/configure.in 2008-05-08 21:17:21.000000000 +0300
@@ -8,6 +8,7 @@

AC_CANONICAL_HOST
AC_PROG_CC
+AC_PROG_CXX
AC_PROG_INSTALL

AC_PROG_AWK
diff -ur moc-2.5.0-alpha3.orig/Makefile.am moc-2.5.0-alpha3/Makefile.am
--- moc-2.5.0-alpha3.orig/Makefile.am 2007-12-15 09:38:57.000000000 +0200
+++ moc-2.5.0-alpha3/Makefile.am 2008-05-08 21:20:59.000000000 +0300
@@ -40,8 +40,6 @@
themes.h \
keys.c \
keys.h \
- ltdl.c \
- ltdl.h \
io.c \
io.h \
compat.c \
@@ -70,7 +68,7 @@
jack.c \
jack.h
man_MANS = mocp.1
-mocp_LDADD = @EXTRA_OBJS@
+mocp_LDADD = @EXTRA_OBJS@ -lltdl
mocp_DEPENDENCIES = @EXTRA_OBJS@
mocp_LDFLAGS = @EXTRA_LIBS@ $(RCC_LIBS)
EXTRA_DIST = config.example mocp.1 THANKS keymap.example Doxyfile \