Issue 102 in data-race-test: unittest compile error

3 views
Skip to first unread message

data-ra...@googlecode.com

unread,
Apr 15, 2012, 11:20:13 AM4/15/12
to data-ra...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 102 by gokcehan...@gmail.com: unittest compile error
http://code.google.com/p/data-race-test/issues/detail?id=102

hello,

i've been trying to compile unittests;


..
Checked out external at revision 146.

Checked out revision 4197.
acer@acer-AOD255 ~/courses/58q/project $ cd tsan_test/unittest
acer@acer-AOD255 ~/courses/58q/project/tsan_test/unittest $ make
make all OS=linux ARCH=amd64
make[1]: Entering directory
`/home/acer/courses/58q/project/tsan_test/unittest'
mkdir -p bin
g++ -g -O0 -m64 -Wall -Werror -Wno-sign-compare -Wshadow
-Wno-unused-function -std=c++0x -DOS_linux -DARCH_amd64 \
-I../dynamic_annotations -I../third_party/googletest/include -I. \
-DDYNAMIC_ANNOTATIONS_ENABLED=1 -c racecheck_unittest.cc
-obin/racecheck_unittest-linux-amd64-O0.o
racecheck_unittest.cc: In member function ‘virtual void
StressTests_ManyLockSetsTest::StressTests_EvenMoreLockSetsTest_Test::TestBody()’:
racecheck_unittest.cc:1487:36: error: cast to pointer from integer of
different size [-Werror=int-to-pointer-cast]
racecheck_unittest.cc: In function ‘void NegativeTests_Strlen::WorkerX()’:
racecheck_unittest.cc:3177:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3177:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3181:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3181:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3189:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3189:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3220:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3220:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc: In member function ‘virtual void
NegativeTests_Strlen::NegativeTests_StrlenAndFriends_Test::TestBody()’:
racecheck_unittest.cc:3255:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3255:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3272:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:3272:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc: In function ‘void
LibcStringFuncitonsTests::CheckStrrchrResult()’:
racecheck_unittest.cc:8359:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
racecheck_unittest.cc:8359:3: error: passing NULL to non-pointer argument 3
of ‘static testing::AssertionResult
testing::internal::EqHelper<true>::Compare(const char*, const char*, const
T1&, T2*) [with T1 = long int, T2 = char]’ [-Werror=conversion-null]
cc1plus: all warnings being treated as errors

make[1]: *** [bin/racecheck_unittest-linux-amd64-O0.o] Error 1
make[1]: Leaving directory
`/home/acer/courses/58q/project/tsan_test/unittest'
make: *** [l64] Error 2
acer@acer-AOD255 ~/courses/58q/project/tsan_test/unittest $ uname -a
Linux acer-AOD255 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC
2011 x86_64 x86_64 x86_64 GNU/Linux
acer@acer-AOD255 ~/courses/58q/project/tsan_test/unittest $ gcc --version
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


i have also tried get_and_build_tsan.sh script
following "http://code.google.com/p/data-race-test/wiki/BuildingThreadSanitizer",
same errors. any ideas?


data-ra...@googlecode.com

unread,
Apr 16, 2012, 4:32:33 AM4/16/12
to data-ra...@googlegroups.com

Comment #1 on issue 102 by timurrrr: unittest compile error
http://code.google.com/p/data-race-test/issues/detail?id=102

Looks like the googletest revision we're using is not compileable with gcc
4.6 bundled with the Ubuntu you're using (is it 12.04?).

Possible solutions:
1) Do `svn up ../third_party/googletest` to update googletest to the most
recent revision (may break some other things)
2) Disable `-Werror=conversion-null` gcc option with CFLAGS=...

data-ra...@googlecode.com

unread,
Apr 16, 2012, 3:01:04 PM4/16/12
to data-ra...@googlegroups.com

Comment #2 on issue 102 by gokcehan...@gmail.com: unittest compile error
http://code.google.com/p/data-race-test/issues/detail?id=102

mint 12 (ubuntu 11.10)

tried g++-4.5 (4.5.3) -> no luck..
tried g++-4.4 (4.4.6) -> seems to be working
(changed from '../common.mk')

(4.4 and 4.5 binaries available in ubuntu repo along with respective
multilibs)

thanks

data-ra...@googlecode.com

unread,
Aug 2, 2013, 2:24:01 AM8/2/13
to data-ra...@googlegroups.com

Comment #3 on issue 102 by AVGru...@gmail.com: unittest compile error
http://code.google.com/p/data-race-test/issues/detail?id=102

I have tried to update the google test but only using g++4.4 solved the
problem

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

data-ra...@googlecode.com

unread,
Aug 2, 2013, 2:25:01 AM8/2/13
to data-ra...@googlegroups.com

Comment #4 on issue 102 by AVGru...@gmail.com: unittest compile error
http://code.google.com/p/data-race-test/issues/detail?id=102

Thank you!
Reply all
Reply to author
Forward
0 new messages