>>>>> On Fri, 04 Apr 2014 01:25:27 +0200, Kern Sibbald said: > > On 04/03/2014 10:32 PM, Dan Langille wrote: > > On 2014-04-03 02:27 PM, Kern Sibbald wrote: > >> Strange. I build FreeBSD binaries, and I never had to make *any* > >> patches to Bacula to build an run it. I seem to be missing something > >> here. Please don't get me wrong, I am not complaining or anything like > >> that, but I have a hard time understanding what the real problem is > >> other than "printf" doesn't work like echo and what to do about it in > >> a portable way. > > > > I have no explanation as to why I'm encountering this problem, but I > > have a simple test below. > > > > > > I hope what I have here may lead to a solution. I don't have one, but > > I know why the code fails: > > > > To test, I removed the patches for 5.2.12 which change ECHO to echo > > (see my previous post below for an outline of those changes). > > > > After doing a make configure, I run make. These are the errors: > > > > # make > > ===> Building for bacula-server-5.2.12_3 > > ==>Entering directory > > /var/ports/root/bacula-server/work/bacula-5.2.12/src > > ==>Entering directory > > /var/ports/root/bacula-server/work/bacula-5.2.12/scripts > > ==>Entering directory > > /var/ports/root/bacula-server/work/bacula-5.2.12/src/cats > > "Makefile", line 518: Need an operator > > make: fatal errors encountered -- cannot continue > > ====== Error in > > /var/ports/root/bacula-server/work/bacula-5.2.12/src/cats ====== > > *** [all] Error code 1 > > 1 error > > ===> Compilation failed unexpectedly. > > Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the > > failure to > > the maintainer. > > *** [do-build] Error code 1 > > > > Stop in /root/bacula-server. > > *** [build] Error code 1 > > > > Stop in /root/bacula-server. > > > > I have copied src/cats/Makefile to > > http://www.langille.org/tmp/src-cats-Makefile.txt so you can view it. > > > > For comparison, this is the file created with the FreeBSD patches for > > echo: > > > > http://www.langille.org/tmp/src-cats-Makefile2.txt > > > > The file sizes? > > > > -rw-r--r-- 1 dan www 72754 Apr 3 19:54 src-cats-Makefile2.txt > > -rw-r--r-- 1 dan www 72757 Apr 3 19:48 src-cats-Makefile.txt > > > > > > Only 3 bytes difference. The error is clear in the diff. A missing > > newline: > > > > $ diff src-cats-Makefile.txt src-cats-Makefile2.txt > > 432c432 > > < @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> > > Makefile > > --- > >> @echo "# DO NOT DELETE: nice dependency list follows" >> Makefile > > 456c456,457 > > < # DO NOT DELETE: nice dependency list followsnbvfs.lo: bvfs.c > > ../bacula.h ../config.h /usr/include/stdint.h \ > > --- > >> # DO NOT DELETE: nice dependency list follows > >> bvfs.lo: bvfs.c ../bacula.h ../config.h /usr/include/stdint.h \ > > > > See that 'n' after 'follows'? That's not supposed to be there. It's > > supposed to be a newline. > > > > Could that be the \n from " ECHO='printf %s\n'" is causing an issue? > Yes, this is exactly where the problem is coming from. What I would > like to know is where does the line: > > " ECHO='printf %s\n'" > > come from. Hopefully it is not something in Bacula. > > Why is ECHO set to anything other than echo or /bin/echo?
IFAICT, libtool had problems with echo interpreting \t as a tab in ksh on some machines. Moreover, libtool's variable called ECHO clashes with the one set by Bacula's configure.in: AC_PATH_PROG(ECHO, echo, echo) How about renaming Bacula's ECHO variable to something like MAKEFILEECHO in the above and use ECHO=@MAKEFILEECHO@ in Make.common.in? __Martin ------------------------------------------------------------------------------ _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel