[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: subversion cross compile (arm)

From: Takács András <wakoond_at_gmail.com>
Date: Thu, 2 Dec 2010 08:40:21 +0100

Hi All, Hi daniel,

Daniel, thanks a lot your help, I'm getting more closer to the origin
of the issue. (I hope.)
I CC'ed the dev@ list as well, so I'm summarize the problem again.

I'm cross compiling subversion for an ARM9 based development board (mini2440).
(You'll find my configure options below.)
This is a totaly clean environbent. There are just the libraries of
toolchain (codesourcery).
I built apr, apr-util, zlib, and sqlite from subversion-deps package,
and the subversion itself.
It is version 1.6.15.

I'm createing a new repository with svn create, and after it I'm
trying svn mkdir file:///...
The result is:
svn: Commit failed (details follow):
svn: Corrupt node-revision '0.0.t0-0'
svn: Malformed text representation offset line in node-rev

Based on Daniel's help, I started to patch fs_fs.c, and adding debug
messages to it:
/ # svnadmin create /var/svn/testrepo <=== I'm creating the repository
/ # cat /var/svn/testrepo/db/revs/0/0 <=== Checking the revision
file. Seems to be OK.
PLAIN
END
ENDREP
id: 0.0.r0/17
type: dir
count: 0
text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
cpath: /

17 107
/ # svn mkdir file:///var/svn/testrepo/xxx -m "mmmmm"
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev <=== It is the
bottom of the get_node_revision_body function
fs_fs: [LINE 2140] calling read_rep_offsets '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e'
read_rep_offsets: [LINE 1947] '0 0 4 4
2d2977d1c96f487abe4a1e202dd03b4e' <== The string parameter of
read_rep_offsets
read_rep_offsets: [LINE 1956] '0' <=== Return str of first apr_strtok
read_rep_offsets: [LINE 1973] '0' <=== Return str of second apr_strtok
read_rep_offsets: [LINE 1984] '4' <=== Return str of third apr_strtok
read_rep_offsets: [LINE 1995] '4' <=== Return str of fourth apr_strtok
read_rep_offsets: [LINE 2009] '2d2977d1c96f487abe4a1e202dd03b4e' <===
Return str of fifth apr_strtok
fs_fs: [LINE 2082] calling svn_fs_fs__read_noderev
apr_strtok: [LINE 35] '0.0.t0-0'
apr_strtok: [LINE 58] '0'
apr_strtok: [LINE 35] '0.t0-0'
apr_strtok: [LINE 58] '0'
apr_strtok: [LINE 35] 't0-0'
apr_strtok: [LINE 58] 't0-0'
fs_fs: [LINE 2140] calling read_rep_offsets '0 4 4 4621479420036127952 (null)'
read_rep_offsets: [LINE 1947] '0 4 4 4621479420036127952 (null)'
read_rep_offsets: [LINE 1956] '0'
read_rep_offsets: [LINE 1973] '4'
read_rep_offsets: [LINE 1984] '4'
read_rep_offsets: [LINE 1995] '4621479420036127952'
subversion/libsvn_fs_fs/fs_fs.c:2239: (apr_err=160004)
svn: Corrupt node-revision '0.0.t0-0'
subversion/libsvn_fs_fs/fs_fs.c:2006: (apr_err=160004)
svn: Malformed text representation offset line in node-rev
read_rep_offsets: apr_strtok #4 last_string '' string '0' str '(null)'
strlen(str) 6 (APR_MD5_DIGESTS
IZE*2) 32 revision 0 offset 4 size 0 expsize 4
/ #

I figured out, that the first execution of fs_fs__read_noderev is
parsing the /var/svn/testrepo/db/revs/0/0 file.
What is the input of the second execution? I see thet it is in wrong
format, but what is the origin of this?

Thanks a lot!

Regards,
András

----------------------------------------------------------------------------------------------------------------------------------------------------

Toolchain: arm-2008q3-72-arm-none-linux-gnueabi-i686-pc-linux-gnu
Cross gcc: arm-none-linux-gnueabi-gcc
Cross cflags: -march=armv4t -mtune=arm920t

Apr configure:
               ./configure \
                       --prefix=/usr \
                       --host=$(CROSS_COMPILE) \
                       ac_cv_file__dev_zero="yes" \
                       ac_cv_func_setpgrp_void="yes" \
                       apr_cv_process_shared_works="yes" \
                       apr_cv_mutex_robust_shared="no" \
                       apr_cv_tcp_nodelay_with_cork="yes" \
                       ac_cv_sizeof_struct_iovec="8" \
                       apr_cv_mutex_recursive="yes" \
                       CFLAGS=$(CROSS_CFLAGS) \
                       LDFLAGS=$(CROSS_LDFLAGS)

Apr-utils configure:
               ./configure \
                       --with-apr=<MY_APR_BUILD_DIR> \
                       --prefix=/usr \
                       --host=$(CROSS_COMPILE) \
                       CFLAGS=$(CROSS_CFLAGS) \
                       LDFLAGS=$(CROSS_LDFLAGS); \

Subversion configure:
       ./configure \
               --with-apr=$(PACKAGES_DIR)/apr/$(TARGET_PACKAGE)/apr \
               --with-apr-util=$(PACKAGES_DIR)/apr-util/$(TARGET_PACKAGE)/apr-util
\
               --with-sqlite="$(TARGET_DEV_ROOT)/usr" \
               --with-zlib="$(TARGET_DEV_ROOT)/usr" \
               --host=$(CROSS_COMPILE) \
               --prefix=/usr \
               CFLAGS=$(CROSS_CFLAGS) \
               LDFLAGS=$(CROSS_LDFLAGS)

Other compiled libraries: sqlite3, zlib
I'm usung the latest, 1.6.15 subversion and subversion-deps packages.
(I compiled all libraries from subversion-deps, no other installed library)

--
Takács András
Skype: wakoond
GTalk: wakoond
MSN: wakoond_at_freestart.hu
Received on 2010-12-02 08:52:51 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.