Re: Any ideas? ~ Ubuntu Linux 9.10 ~ libtool link failure at lib/libgtest.la

82 views
Skip to first unread message
Message has been deleted

ali01

unread,
Oct 31, 2009, 12:55:18 AM10/31/09
to Google C++ Testing Framework
Hello everyone

Apologies for the question above. It turns out that the problem was
with g++.
I managed to compile the source. However, when I try to run a simple
test, I get the following:

----------
> g++ $(gtest-config --cppflags --cxxflags) -o ofile.o -c sr_router_entities_test.cpp
> g++ $(gtest-config --ldflags --libs) -o foo ofile.o

/vol/usr/lib/libgtest.la: file not recognized: File format not
recognized
collect2: ld returned 1 exit status
-----------

I'm running an amazon EC2 instance of Ubuntu Linux 9.10 Karmic and
I've made sure that the file libgtest.la is in LIBRARY_PATH and that
it has the appropriate permissions (-rwxr-xr-x | root).

Any help would be greatly appreciated.
Thanks,
Ali



On Oct 30, 9:23 pm, ali01 <al...@cs.stanford.edu> wrote:
> I'm running an amazon EC2 instance of Ubuntu Linux 9.10 Karmic
>
> After checking out the latest development branch from the repository
> and running autoreconf:
>
> make
>
> I get the following error:
>
> source='src/gtest.cc' object='src/gtest.lo' libtool=yes \
>         DEPDIR=.deps depmode=none /bin/bash ./build-aux/depcomp \
>         /bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -
> I. -I./build-aux  -I. -I./include    -c -o src/gtest.lo src/gtest.cc
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest.cc  -o src/.libs/gtest.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest.cc >/dev/null 2>&1
> source='src/gtest-death-test.cc' object='src/gtest-death-test.lo'
> libtool=yes \
>         DEPDIR=.deps depmode=none /bin/bash ./build-aux/depcomp \
>         /bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -
> I. -I./build-aux  -I. -I./include    -c -o src/gtest-death-test.lo src/
> gtest-death-test.cc
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-death-test.cc  -o src/.libs/gtest-death-test.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-death-test.cc >/dev/null 2>&1
> source='src/gtest-filepath.cc' object='src/gtest-filepath.lo'
> libtool=yes \
>         DEPDIR=.deps depmode=none /bin/bash ./build-aux/depcomp \
>         /bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -
> I. -I./build-aux  -I. -I./include    -c -o src/gtest-filepath.lo src/
> gtest-filepath.cc
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-filepath.cc  -o src/.libs/gtest-filepath.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-filepath.cc >/dev/null 2>&1
> source='src/gtest-port.cc' object='src/gtest-port.lo' libtool=yes \
>         DEPDIR=.deps depmode=none /bin/bash ./build-aux/depcomp \
>         /bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -
> I. -I./build-aux  -I. -I./include    -c -o src/gtest-port.lo src/gtest-
> port.cc
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-port.cc  -o src/.libs/gtest-port.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-port.cc >/dev/null 2>&1
> source='src/gtest-test-part.cc' object='src/gtest-test-part.lo'
> libtool=yes \
>         DEPDIR=.deps depmode=none /bin/bash ./build-aux/depcomp \
>         /bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -
> I. -I./build-aux  -I. -I./include    -c -o src/gtest-test-part.lo src/
> gtest-test-part.cc
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-test-part.cc  -o src/.libs/gtest-test-part.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-test-part.cc >/dev/null 2>&1
> source='src/gtest-typed-test.cc' object='src/gtest-typed-test.lo'
> libtool=yes \
>         DEPDIR=.deps depmode=none /bin/bash ./build-aux/depcomp \
>         /bin/bash ./libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -
> I. -I./build-aux  -I. -I./include    -c -o src/gtest-typed-test.lo src/
> gtest-typed-test.cc
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-typed-test.cc  -o src/.libs/gtest-typed-test.o
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I./build-aux -I. -I./
> include -c src/gtest-typed-test.cc >/dev/null 2>&1
> /bin/bash ./libtool --tag=CXX   --mode=link g++     -o lib/libgtest.la
> -rpath /vol/usr/gtest/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
> libtool: link: (cd "lib/.libs" && rm -f "libgtest.so.0" && ln -s
> "libgtest.so.0.0.0" "libgtest.so.0")
> libtool: link: (cd "lib/.libs" && rm -f "libgtest.so" && ln -s
> "libgtest.so.0.0.0" "libgtest.so")
> libtool: link: ar cru lib/.libs/libgtest.a  src/gtest.o src/gtest-
> death-test.o src/gtest-filepath.o src/gtest-port.o src/gtest-test-
> part.o src/gtest-typed-test.o
> ar: src/gtest.o: No such file or directory
> make: *** [lib/libgtest.la] Error 1
>
> Any ideas?
> Best,
> Ali

Vlad Losev

unread,
Nov 4, 2009, 12:23:55 AM11/4/09
to ali01, Google C++ Testing Framework
Hi Ali,

Try uninstalling Google Test from your system and installing the newly built version.

HTH,
Vlad

ali01

unread,
Nov 6, 2009, 8:48:38 PM11/6/09
to Google C++ Testing Framework
I will give that a try when I get a chance and will let you know about
the outcome.

Best,
Ali
Reply all
Reply to author
Forward
0 new messages