You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Naipaul Ojar <OJ...@uk.ibm.com> on 2006/09/08 09:54:36 UTC

make error, Link error in subversion-1.3.2 test tree

OS:- Cygwin, v1.5.21-1
Downloaded and compiled the pre-req sources for:-
  apache, BerkeleyDB.4.4, apr -1.2.7, apr-util -1.2.7

Configured Using:-
./configure --enable-dav --enable-so --with-ssl --with-berkeley-db=/usr/local/BerkeleyDB.4.4  --with-apxs=/usr/local/apache/bin/apxs \
--with-apr=/usr/local/apr-httpd --with-apr-util=/usr/local/apr-util-httpd

I am having a link error in the test tree of subversion-1.3.2, which could be due to the LD_FLAG setting:-
   -no-undefined

The more general 'make' failed and I have been investigating the test sub-tree where the error is located.

$ make test
cd subversion/tests && /bin/sh /usr/src/subversion-1.3.2/libtool --tag=CC --silent --mode=link gcc  -g -O2  -g -O2   -no-undefined
    -L/usr/local/BerkeleyDB.4.4/lib  -rpath /usr/local/lib -o libsvn_test-1.la  svn_test_editor.lo svn_test_fs.lo svn_test_main.lo
 ../../subversion/libsvn_repos/libsvn_repos-1.la ../../subversion/libsvn_fs/libsvn_fs-1.la ../../subversion/libsvn_delta/libsvn_de
lta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la /usr/local/apr-util-httpd//lib/libaprutil-1.la -ldb -lpq -lexpat -liconv /u
sr/local/apr-httpd//lib/libapr-1.la -lcrypt
.libs/svn_test_main.o: In function `get_array_size':
/usr/src/subversion-1.3.2/subversion/tests/svn_test_main.c:118: undefined reference to `_test_funcs'
/usr/src/subversion-1.3.2/subversion/tests/svn_test_main.c:118: undefined reference to `_test_funcs'
.libs/svn_test_main.o: In function `do_test_num':
/usr/src/subversion-1.3.2/subversion/tests/svn_test_main.c:151: undefined reference to `_test_funcs'
/usr/src/subversion-1.3.2/subversion/tests/svn_test_main.c:150: undefined reference to `_test_funcs'
Creating library file: .libs/libsvn_test-1.dll.a
collect2: ld returned 1 exit status
make: *** [subversion/tests/libsvn_test-1.la] Error 1

There are a number of sub-directories in the test tree and only the 'libsvn_subr' seems to be build prior to the linking
of the test tree to create the library module:- .libs/libsvn_test-1.dll.a

The offending area of code is:-
/* Determine the array size of test_funcs[], the inelegant way.  :)  */
static int
get_array_size (void)
{
  int i;

  for (i = 1; test_funcs[i].func; i++)
    {
    }

  return (i - 1);
}
But the definition of the externally defined array of functions is implemented in a module that has not been build yet:-
       subversion/tests/libsvn_repos/repos-test$(EXEEXT)

I tried to build that module, but I realised that many other modules had to be built proir to the linking of the library.

gb047358@IBM-cno001y /usr/src/subversion-1.3.2/subversion/tests
$ ls -R lib*
libsvn_delta:
delta-window-test.h  random-test.c  range-index-test.h  svndiff-test.c  vdelta-test.c  vdelta_1.txt

libsvn_diff:
diff-diff3-test.c

libsvn_fs:
fs-test.c  locks-test.c

libsvn_fs_base:
changes-test.c  fs-base-test.c  key-test.c  skel-test.c  strings-reps-test.c

libsvn_ra_local:
ra-local-test.c

libsvn_repos:
dir-delta-editor.c  dir-delta-editor.h  repos-test.c

libsvn_subr:
compat-test.c  config-test.c    hashdump-test.c  path-test.c    string-test.c  target-test.py  utf-test.c
compat-test.o  config-test.cfg  opt-test.c       stream-test.c  target-test.c  time-test.c

libsvn_vcdiff:
README  source.txt  target0.txt  target1.txt  target2.txt  target3.txt  target4.txt  target5.txt

libsvn_wc:
translate-test.c
===================================================================================
Further Investigation:-

The build-outputs.mk define the TEST_PROGRAMS and their TEST_DEPS modules
but all the dependancies have not been build prior to the linking of the library.

TEST_DEPS = subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_subr/target-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_wc/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_subr/target-test.py subversion/tests/clients/cmdline/getopt_tests.py subversion/tests/clients/cmdline/basic_tests.py subversion/tests/clients/cmdline/commit_tests.py subversion/tests/clients/cmdline/update_tests.py subversion/tests/clients/cmdline/switch_tests.py subversion/tests/clients/cmdline/prop_tests.py subversion/tests/clients/cmdline/schedule_tests.py subversion/tests/clients/cmdline/log_tests.py subversion/tests/clients/cmdline/copy_tests.py subversion/tests/clients/cmdline/diff_tests.py subversion/tests/clients/cmdline/export_tests.py subversion/tests/clients/cmdline/externals_tests.py subversion/tests/clients/cmdline/merge_tests.py subversion/tests/clients/cmdline/revert_tests.py subversion/tests/clients/cmdline/stat_tests.py subversion/tests/clients/cmdline/trans_tests.py subversion/tests/clients/cmdline/autoprop_tests.py subversion/tests/clients/cmdline/blame_tests.py subversion/tests/clients/cmdline/special_tests.py subversion/tests/clients/cmdline/svnadmin_tests.py subversion/tests/clients/cmdline/svnlook_tests.py subversion/tests/clients/cmdline/svnversion_tests.py subversion/tests/clients/cmdline/utf8_tests.py subversion/tests/clients/cmdline/history_tests.py subversion/tests/clients/cmdline/lock_tests.py subversion/tests/clients/cmdline/cat_tests.py subversion/tests/clients/cmdline/import_tests.py subversion/tests/clients/cmdline/authz_tests.py

TEST_PROGRAMS = subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_wc/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_subr/target-test.py subversion/tests/clients/cmdline/getopt_tests.py subversion/tests/clients/cmdline/basic_tests.py subversion/tests/clients/cmdline/commit_tests.py subversion/tests/clients/cmdline/update_tests.py subversion/tests/clients/cmdline/switch_tests.py subversion/tests/clients/cmdline/prop_tests.py subversion/tests/clients/cmdline/schedule_tests.py subversion/tests/clients/cmdline/log_tests.py subversion/tests/clients/cmdline/copy_tests.py subversion/tests/clients/cmdline/diff_tests.py subversion/tests/clients/cmdline/export_tests.py subversion/tests/clients/cmdline/externals_tests.py subversion/tests/clients/cmdline/merge_tests.py subversion/tests/clients/cmdline/revert_tests.py subversion/tests/clients/cmdline/stat_tests.py subversion/tests/clients/cmdline/trans_tests.py subversion/tests/clients/cmdline/autoprop_tests.py subversion/tests/clients/cmdline/blame_tests.py subversion/tests/clients/cmdline/special_tests.py subversion/tests/clients/cmdline/svnadmin_tests.py subversion/tests/clients/cmdline/svnlook_tests.py subversion/tests/clients/cmdline/svnversion_tests.py subversion/tests/clients/cmdline/utf8_tests.py subversion/tests/clients/cmdline/history_tests.py subversion/tests/clients/cmdline/lock_tests.py subversion/tests/clients/cmdline/cat_tests.py subversion/tests/clients/cmdline/import_tests.py subversion/tests/clients/cmdline/authz_tests.py