Version: (using Devel) Compiler: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465) OS: OS X Installed from: Compiled sources uname -a Darwin cathy.bclary.com 9.7.0 Darwin Kernel Version 9.7.0: Tue Mar 31 22:52:17 PDT 2009; root:xnu-1228.12.14~1/RELEASE_I386 i386 i386 1. svn co svn://svn.valgrind.org/valgrind/trunk valgrind 2. cd valgrind 3. ./autogen.sh 4. ./configure 5. make ... gcc -arch i386 -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -mmacosx-version-min=10.5 -fno-stack-protector -mdynamic-no-pic -O2 -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -nodefaultlibs -nostartfiles -Wl,-u,__start -Wl,-e,__start -Wl,-bind_at_load /usr/lib/dyld -arch i386 -Wl,-seg1addr,0xf0080000 -Wl,-stack_addr,0xf0080000 -Wl,-stack_size,0x80000 -Wl,-pagezero_size,0xf0000000 -o memcheck-x86-darwin memcheck_x86_darwin-mc_leakcheck.o memcheck_x86_darwin-mc_malloc_wrappers.o memcheck_x86_darwin-mc_main.o memcheck_x86_darwin-mc_translate.o memcheck_x86_darwin-mc_machine.o memcheck_x86_darwin-mc_errors.o ../coregrind/libcoregrind-x86-darwin.a ../VEX/libvex-x86-darwin.a -lgcc ld: in ../VEX/libvex-x86-darwin.a, archive has no table of contents collect2: ld returned 1 exit status make[3]: *** [memcheck-x86-darwin] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 $ svn info Path: . URL: svn://svn.valgrind.org/valgrind/trunk Repository Root: svn://svn.valgrind.org/valgrind Repository UUID: a5019735-40e9-0310-863c-91ae7b9d1cf9 Revision: 10248 Node Kind: directory Schedule: normal Last Changed Author: njn Last Changed Rev: 10248 Last Changed Date: 2009-06-04 16:17:12 -0700 (Thu, 04 Jun 2009)
Bob, can you attach a file containing the full output of 'configure' and 'make'? Hopefully seeing the make output for the building of libvex-x86-darwin.a will indicate something.
Created attachment 34272 [details] configure output
Created attachment 34273 [details] make output
It's a mystery to me, but Googling came up with some suggestions. - Try running 'ranlib' on libvex-x86-darwin.a and then rerunning 'make'. - Does the path containing Valgrind have any spaces? If so, try removing them. http://www.haskell.org/pipermail/glasgow-haskell-users/2007-October/013322.html http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg16863.html If 'ranlib' fixes it, the above pages suggest that adding -s to our invocation of 'ar' might fix the problem.
ranlib "fixed" it. Thanks!
Created attachment 34277 [details] patch So the question now is: why the problem on Bob's machine? On my Mac, 'ar' unbelievably doesn't support -h or --help or -v or --version so I can't work out what version number it is. Anyway, it seems that we use "ar cru" in most of Valgrind, but "ar clq" for libvex.a. I barely understand all that stuff, but Bob, can you try the attached patch in the VEX/ directory/? You'll need to run 'make clean' and then 'make'. Thanks.
Created attachment 34289 [details] ar man page No, it didn't work. I think on my system at least it requires the -s option to write the object index into the archive. See attached ar.man
Created attachment 34290 [details] patch this works for me.
I was wondering why 'ar cru' was working for the other .a files built (eg. libcoregrind-x86-darwin) but now I realise that ranlib (which is equivalent to 'ar s') is run on them subsequently, but not for libvex-x86-darwin.a, because libvex-x86-darwin.a is generated via a hand-written Makefile rather than an autotool-generated one.
Fixed in Vex r1900. Thanks for the report.
svn up works. thanks. verified.