Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Trying to compile GTest, not linking pthread correctly?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jay Pipes  
View profile  
 More options Nov 11 2012, 10:09 pm
From: Jay Pipes <jaypi...@gmail.com>
Date: Sun, 11 Nov 2012 19:09:47 -0800 (PST)
Local: Sun, Nov 11 2012 10:09 pm
Subject: Trying to compile GTest, not linking pthread correctly?

Hello, looking for a bit of help with waf. Very impressed with it so far,
but I've run into a bit of a problem...

I'm using the GTest library within my project, located in /tests/gtest. I
have some simple wscripts in each main directory in my source tree.

Here is the file layout: http://pastebin.com/BWuUnPuB

And here are the wscript files in question:

/wscript: http://pastebin.com/3GbbD3Ne
/tests/wscript: http://pastebin.com/Am7MtwM4
/tests/gtest/wscript: http://pastebin.com/DsiBzejy

So far, so good. Keeping things as simple as possible.

However,when I run a build, the gtest shlib *seems* to get built OK -- i.e.
it doesn't error out during the compilation of the lib. However, when I
attempt to compile and link the test program (test_column_definitions) that
uses the gtest lib, I get a number of errors on linking:

tests/gtest/libgtest.so: undefined reference to `pthread_key_create'
tests/gtest/libgtest.so: undefined reference to `pthread_getspecific'
tests/gtest/libgtest.so: undefined reference to `pthread_key_delete'
tests/gtest/libgtest.so: undefined reference to `pthread_setspecific'

The verbose output of waf is here: http://pastebin.com/Vz8DUVTw

Furthermore, when looking at the command that creates the gtest library, I
see this:

['/usr/bin/g++', '-shared', 'tests/gtest/src/gtest-all.cc.1.o', '-o',
'/home/jpipes/repos/sqltoast/build/tests/gtest/libgtest.so',
'-Wl,-Bstatic', '-Wl,-Bdynamic']

And it seems to be that the -Wl -Bstatic -Wl -Bdynamic looks to be wrong?

I don't think it matters, but here is the source for
test_column_definitions.cc: http://pastebin.com/WLGNAigJ

Any thoughts or pointers would be most appreciated!

Cheers,
-jay


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.