tanghong123 / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

make fails on OS X 10.4 #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure
2. make

What is the expected output? What do you see instead?

Output from beginning of error pasted below:
/bin/sh ./libtool --tag=CXX   --mode=link g++  -g -O2   -o lib/libgtest.la 
-rpath /usr/local/lib 
src/gtest.lo src/gtest-death-test.lo src/gtest-filepath.lo src/gtest-port.lo 
src/gtest-test-
part.lo src/gtest-typed-test.lo  
mkdir lib/.libs
g++ -dynamiclib ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o 
lib/.libs/libgtest.0.0.0.dylib  src/.libs/gtest.o src/.libs/gtest-death-test.o 
src/.libs/gtest-
filepath.o src/.libs/gtest-port.o src/.libs/gtest-test-part.o 
src/.libs/gtest-typed-test.o   -
install_name  /usr/local/lib/libgtest.0.dylib -compatibility_version 1 
-current_version 1.0 -Wl,-
single_module
ld: multiple definitions of symbol __ZNSt3tr110make_tupleEv
src/.libs/gtest.o definition of __ZNSt3tr110make_tupleEv in section 
(__TEXT,__text)
src/.libs/gtest-death-test.o definition of __ZNSt3tr110make_tupleEv in section 
(__TEXT,__text)
ld: multiple definitions of symbol __ZNSt3tr110make_tupleEv.eh
src/.libs/gtest.o definition of absolute __ZNSt3tr110make_tupleEv.eh (value 0x0)
src/.libs/gtest-death-test.o definition of absolute __ZNSt3tr110make_tupleEv.eh 
(value 0x0)
ld: multiple definitions of symbol 
__ZNSt3tr134_GLOBAL__N__ZNSt3tr110make_tupleEv6ignoreE
src/.libs/gtest.o definition of 
__ZNSt3tr134_GLOBAL__N__ZNSt3tr110make_tupleEv6ignoreE in 
section (__DATA,__common)
src/.libs/gtest-death-test.o definition of 
__ZNSt3tr134_GLOBAL__N__ZNSt3tr110make_tupleEv6ignoreE in section 
(__DATA,__common)
src/.libs/gtest-filepath.o definition of __ZNSt3tr110make_tupleEv in section 
(__TEXT,__text)
src/.libs/gtest-filepath.o definition of absolute __ZNSt3tr110make_tupleEv.eh 
(value 0x0)
src/.libs/gtest-filepath.o definition of 
__ZNSt3tr134_GLOBAL__N__ZNSt3tr110make_tupleEv6ignoreE in section 
(__DATA,__common)
src/.libs/gtest-port.o definition of __ZNSt3tr110make_tupleEv in section 
(__TEXT,__text)
src/.libs/gtest-port.o definition of absolute __ZNSt3tr110make_tupleEv.eh 
(value 0x0)
src/.libs/gtest-port.o definition of 
__ZNSt3tr134_GLOBAL__N__ZNSt3tr110make_tupleEv6ignoreE 
in section (__DATA,__common)
src/.libs/gtest-test-part.o definition of __ZNSt3tr110make_tupleEv in section 
(__TEXT,__text)
src/.libs/gtest-test-part.o definition of absolute __ZNSt3tr110make_tupleEv.eh 
(value 0x0)
src/.libs/gtest-test-part.o definition of 
__ZNSt3tr134_GLOBAL__N__ZNSt3tr110make_tupleEv6ignoreE in section 
(__DATA,__common)
src/.libs/gtest-typed-test.o definition of __ZNSt3tr110make_tupleEv in section 
(__TEXT,__text)
src/.libs/gtest-typed-test.o definition of absolute __ZNSt3tr110make_tupleEv.eh 
(value 0x0)
src/.libs/gtest-typed-test.o definition of 
__ZNSt3tr134_GLOBAL__N__ZNSt3tr110make_tupleEv6ignoreE in section 
(__DATA,__common)
/usr/bin/libtool: internal link edit command failed
make: *** [lib/libgtest.la] Error 1

What version of the product are you using? On what operating system?
gtest-1.2.1, OS X 10.4.11 / PPC.

Please provide any additional information below.
No problem compiling on OS X 10.5.

Original issue reported on code.google.com by Alex.Hol...@gmail.com on 19 Dec 2008 at 5:43

GoogleCodeExporter commented 9 years ago
I cannot reproduce the problem.  Have you tried to build from a freshly 
unpacked copy
of gtest?

Original comment by shiq...@gmail.com on 22 Dec 2008 at 8:19

GoogleCodeExporter commented 9 years ago
It is a freshly unpacked copy.  Attaching transcript of tar, configure && make. 
 Below is my gcc version, I don't 
believe it should be different from the base install.

Reading specs from /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/specs
Configured with: /private/var/tmp/gcc/gcc-4061.obj~8/src/configure 
--disable-checking --prefix=/usr --
mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
--program-transform-name=/^[cg][^+.-
]*$/s/$/-4.0/ --with-gxx-include-dir=/include/gcc/darwin/4.0/c++ 
--build=powerpc-apple-darwin8 --
host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)

I wasn't able to run autoreconf against trunk, as my autoconf scripts are too 
old (they are the base 10.4 install 
I believe).  I can try updating these and compiling trunk, if you think that 
would help.

Thanks

Original comment by Alex.Hol...@gmail.com on 22 Dec 2008 at 10:34

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately I still cannot repro it.

The errors suggest that gcc has trouble compiling the tr1/tuple libraray in your
environment.  That looks like either a bug in your gcc or your tr1/tuple.  My
suggestion is to add this to your compiler flags:

  -DGTEST_HAS_TR1_TUPLE=0

This will prevent gtest from using TR1 tuple, and I suspect it will bypass the 
problem.

I'm closing the bug for now.  Please reopen it if the above workaround doesn't 
work.

Original comment by zhanyong...@gmail.com on 16 Jan 2009 at 7:00