I got tired of having my daily lyx RPM build fail, so I started looking for the real cause. I think I know what happened here. The cite.C file reference was embedded into my *.po files, making it impossible to ``make dist'' and then expect to compile. This made me think that src/cite.[hC] should be inserted into src/Makefile.am. When I deleted cite.h and cite.C after a fresh get and tried to do ``make rpmdist'', it failed with the compile error. However, the same source compiles correctly with ``make''. So, the problem was somehow with the RPM creation and not necessarily a generic compile problem. I compared the makes and found that the culprit was the "-ansi" flag. kayvan@camel ~/src/lyx/sigc++]$ c++ -DHAVE_CONFIG_H -I. -I. -I. -I./.. -I./.. -ansi -Wall -c marshal.cc -o marshal.o In file included from ../sigc++/marshal.h:14, from marshal.cc:1: ../sigc++/thread.h:124: type specifier omitted for parameter ../sigc++/thread.h:124: parse error before `*' But... [kayvan@camel ~/src/lyx/sigc++]$ c++ -DHAVE_CONFIG_H -I. -I. -I. -I./.. -I./.. -Wall -c marshal.cc -o marshal.o [kayvan@camel ~/src/lyx/sigc++]$ By more looking and some trial and error, I found that the following sequence works: ``./autogen.sh; ./configure; make'' But, this does not: ``./autogen.sh; CXXFLAGS=-O2 CFLAGS=-O2 ./configure; make'' Producing this error: /bin/sh ./libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I. -I./.. -I./.. -O2 -ansi -W -Wall -Wno-return-type -c marshal.cc c++ -DHAVE_CONFIG_H -I. -I. -I. -I./.. -I./.. -O2 -ansi -W -Wall -Wno-return-type -Wp,-MD,.deps/marshal.pp -c marshal.cc -o marshal.o In file included from ../sigc++/marshal.h:14, from marshal.cc:1: ../sigc++/thread.h:124: type specifier omitted for parameter ../sigc++/thread.h:124: parse error before `*' I consider this a bug with the makefiles, since a user's optimization choice should not effect the user's ability to compile. In any case, my patch to work around this (which I think should go into the CVS) is attached. NOTE: Even with this patch, I have to remove src/cite.[hC] manually *after* my cvs update. Otherwise, the ``make rpmdist'' fails while in the po/ directory, looking for ../src/cite.C. It would be great if someone would just delete the cite.[hC] files from the CVS. ---Kayvan -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena http://www.successlinks.com/kayvan | Reach your goals now! | Robin Gregory
Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.373 diff -u -u -r1.373 ChangeLog --- ChangeLog 2000/06/16 15:13:23 1.373 +++ ChangeLog 2000/06/17 08:54:48 @@ -1,3 +1,10 @@ +2000-06-17 Kayvan A. Sylvan <[EMAIL PROTECTED]> + + * development/lyx.spec.in: Call configure with ``--without-warnings'' + to work around a bug with the Makefiles when doing ``make lyxrpm''. + This should be fine, however, since we generally don't want to be + verbose when making an RPM. + 2000-06-16 Juergen Vigna <[EMAIL PROTECTED]> * src/insets/insettabular.C (UpdateLocal): Index: development/lyx.spec.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/lyx.spec.in,v retrieving revision 1.6 diff -u -u -r1.6 lyx.spec.in --- development/lyx.spec.in 2000/03/15 01:15:13 1.6 +++ development/lyx.spec.in 2000/06/17 08:54:57 @@ -37,7 +37,8 @@ %build unset LINGUAS || true -CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr +CXXFLAGS="$RPM_OPT_FLAGS" CFLAGS="$RPM_OPT_FLAGS" \ +./configure --prefix=/usr --without-warnings make %install