Hi, ^M is CR. Given the output of "cat", it looks like the file contained:
> > > /* This file is automatically generated from > > > * subversion/libsvn_fs_fs/rep-cache-db.sql > > > * Do not edit it directly, but edit the source file and rerun 'make' > > > */ > > > > > > #define REP_CACHE_DB_SQL \ > > > "^M "\ > > > "pragma auto_vacuum = 1;^M "\ > > > "^M "\ > > > "^M "\ > > > "create table rep_cache (hash text not null primary key,^M "\ > > > " revision integer not null,^M "\ > > > " offset integer not null,^M "\ > > > " size integer not null,^M "\ > > > " expanded_size integer not null);^M "\ > > > "" If the compiler is tolerant of dodgy line breaks*, and accepts a bare CR as a Mac-style line break, then the file is invalid C. This is because it starts: > #define REP_CACHE_DB_SQL \ > " (Note that the #define ends here) > "\ > "pragma auto_vacuum = 1; > "\ etc. This is consistent with the compiler error messages. Does subversion/libsvn_fs_fs/rep-cache-db.sql have Windows style CR-LF line breaks? And does the Python script that reads it assume it has native (UNIX style) line breaks? ... Ok, I've just managed to reproduce this and confirmed my speculation above. Reproduction recipe: On Linux: > > > > 1. Get the source code subversion-1.6.9; Using the ZIP file, not the tar.gz. > > > > 2. Run 'autogensh' without error; > > > > 3. Run 'configure' without error; > > > > 4. Run 'make' with below error: Jiang: The ZIP file is only intended for building on Windows. If you're building on Linux, you should use the TAR.GZ or TAR.BZ2 files. (They are subtly different, and that difference caused the build error). Kind regards, Jon (* Such tolerance is usually a good thing; e.g. if I use Pythonwin to edit a file, it leaves existing UNIX-style line breaks alone but any new line breaks will be Windows style). -----Original Message----- From: Hyrum K. Wright [mailto:[email protected]] Sent: 26 January 2010 06:58 To: Jiang Li Cc: [email protected] Subject: Re: subversion-1.6.9 build error Glad to hear that you finally got it working. Was the problem the ^M characters? If so, I wonder if it is specific to your platform, or more general. But the entire episode does make me wonder why we require people building to generate these files locally. I'll take a look at the pre-build system and see what I can find out. -Hyrum On Jan 25, 2010, at 5:27 PM, Jiang Li wrote: > Hi Hyrum, > > You are an expert, I am able to compile v1.6.9 successfully. > > Here is my update. > > 1. I tried again by downloading subversion-deps-1.6.9 and compiled again, but with the same problem. > 2. I double check the file subversion/libsvn_fs_fs/rep-cache-db.h with 'vi' editor, I found that there are extra '^M' characters in this file. Using 'cat' will not show this. So this is the problem caused by auto-generation. I removed the extra '^M', then run 'make', it works. > > Thanks again! > Jiang Li > > > > > 2010/1/25 Jiang Li <[email protected]> > Hyrum, > > Thanks! Tomorrow I will download Subversion 1.6.9 dependency package for a try. > > I suspect the problem was caused by not using that package. I will update you the result. > > I will go offline now. Thanks again for your help! > > > Jiang Li > > 2010/1/25 Hyrum K. Wright <[email protected]> > > On Jan 25, 2010, at 8:55 AM, Jiang Li wrote: > > > Hyrum, > > > > No luck. The file will be re-generated again after running 'make'. > > As it should be. > > > 2010/1/25 Hyrum K. Wright <[email protected]> > > Can you try just removing the file and then running 'make' again? > > > > On Jan 25, 2010, at 8:48 AM, Jiang Li wrote: > > > > > Hi Hyrum, > > > > > > Thank you so much for your quick reply! > > > > > > Here is all the content of file subversion/libsvn_fs_fs/rep-cache-db.h. > > > > > > Just for your information, I just downloaded subversion 1.6.6 and I was able to compile this version successfully. I am fine with v1.6.6, but I will try to compile 1.6.9 tomorrow for a last try. This is late in my evening. I appreciate your any suggestion. > > > > > > ============ > > > $ cat rep-cache-db.h > > > /* This file is automatically generated from > > > * subversion/libsvn_fs_fs/rep-cache-db.sql > > > * Do not edit it directly, but edit the source file and rerun 'make' > > > */ > > > > > > #define REP_CACHE_DB_SQL \ > > > "\ > > > "\pragma auto_vacuum = 1; > > > "\ > > > "\ > > > "\create table rep_cache (hash text not null primary key, > > > "\ revision integer not null, > > > "\ offset integer not null, > > > "\ size integer not null, > > > "\ expanded_size integer not null); > > > "" > > > ============ > > This does not look like the correct contents of the file (there aren't any terminating " characters on each line, for instance). > > The longer term solution is for us to generate that file before creating the tarball (much as we pre-generate the swig bindings), rather than requiring people to have a locally-installed Python to generate that file locally. > > Here are the contents of rep-cache-db.h which work for me: > > ============= > /* This file is automatically generated from > * subversion/libsvn_fs_fs/rep-cache-db.sql > * Do not edit it directly, but edit the source file and rerun 'make' > */ > > #define REP_CACHE_DB_SQL \ > "pragma auto_vacuum = 1; "\ > "create table rep_cache (hash text not null primary key, "\ > " revision integer not null, "\ > " offset integer not null, "\ > " size integer not null, "\ > " expanded_size integer not null); "\ > "" > ============= > > > > > > > Jiang Li > > > > > > > > > 2010/1/25 Hyrum K. Wright <[email protected]> > > > > > > On Jan 25, 2010, at 6:55 AM, Jiang Li wrote: > > > > > > > Hi Friends, > > > > > > > > May I ask you a question? > > > > > > > > I just started to use Subversion. I want to compile it from source code on my Red Hat Linux ES5.4. But I face below error when running 'make'. > > > > > > > > My steps are as below: > > > > > > > > 1. Get the source code subversion-1.6.9; > > > > 2. Get sqlite-amalgamation-3_6_22.zip and neon-0.29.3.tar.gz, extract them in subversion folder and change the directory name to remove the version number; > > > > 2. Run 'autogensh' without error; > > > > 3. Run 'configure' without error; > > > > 4. Run 'make' with below error: > > > > > > > > ================= > > > > /bin/sh /tmp/subversion-1.6.9/libtool --tag=CC --silent --mode=compile gcc -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I./subversion/include -I./subversion -I/usr/include/apr-1 -I/usr/include/apr-1 -I/tmp/subversion-1.6.9/neon/src -I/usr/local/include/neon -I/tmp/subversion-1.6.9/sqlite-amalgamation -o subversion/libsvn_fs_fs/rep-cache.lo -c subversion/libsvn_fs_fs/rep-cache.c > > > > In file included from subversion/libsvn_fs_fs/rep-cache.c:28: > > > > subversion/libsvn_fs_fs/rep-cache-db.h:8: error: expected identifier or '(' before string constant > > > > subversion/libsvn_fs_fs/rep-cache-db.h:10: error: expected identifier or '(' before string constant > > > > subversion/libsvn_fs_fs/rep-cache-db.h:24: error: expected identifier or '(' before string constant > > > > subversion/libsvn_fs_fs/rep-cache-db.h:24: error: missing terminating " character > > > > subversion/libsvn_fs_fs/rep-cache.c:34: error: missing terminating " character > > > > subversion/libsvn_fs_fs/rep-cache.c: In function 'svn_fs_fs__open_rep_cache': > > > > subversion/libsvn_fs_fs/rep-cache.c:67: error: 'upgrade_sql' undeclared (first use in this function) > > > > subversion/libsvn_fs_fs/rep-cache.c:67: error: (Each undeclared identifier is reported only once > > > > subversion/libsvn_fs_fs/rep-cache.c:67: error: for each function it appears in.) > > > > make: *** [subversion/libsvn_fs_fs/rep-cache.lo] Error 1 > > > > ============== > > > > > > > > I have no idea to resolve such issue even after googling the web. Could anyone share some light on this? > > > > > > It looks like there is a problem with subversion/libsvn_fs_fs/rep-cache-db.h, which is a generated file. Could you show us the first 10 or 20 lines of that file? > > > > > > Thanks, > > > -Hyrum > > > > > > > > > > > > > ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ********************************************************************** This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd. If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Cabot Communications Limited Verona House, Filwood Road, Bristol BS16 3RY, UK +44 (0) 1179584232 Co. Registered in England number 02817269 Please contact the sender if you believe you have received this email in error. ********************************************************************** ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
