kokizzu / re2

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

Can't make test on 64~precise1-Ubuntu #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have ubuntu preciese
2. try to install re2 like described in howto
3. see error messages 

What is the expected output? What do you see instead?
The expected outcome is compiled tests. 

The actual outcome was
g++ -o obj/dbg/test/charclass_test obj/dbg/re2/testing/charclass_test.o 
obj/dbg/util/pcre.o obj/dbg/util/random.o obj/dbg/util/thread.o 
obj/dbg/re2/testing/backtrack.o obj/dbg/re2/testing/dump.o 
obj/dbg/re2/testing/exhaustive_tester.o obj/dbg/re2/testing/null_walker.o 
obj/dbg/re2/testing/regexp_generator.o obj/dbg/re2/testing/string_generator.o 
obj/dbg/re2/testing/tester.o obj/dbg/util/test.o obj/dbg/libre2.a  
obj/dbg/util/thread.o: In function `Thread::Start()':
/home/mgsergio/software/re2/util/thread.cc:27: undefined reference to 
`pthread_create'
/home/mgsergio/software/re2/util/thread.cc:30: undefined reference to 
`pthread_detach'
obj/dbg/util/thread.o: In function `Thread::Join()':
/home/mgsergio/software/re2/util/thread.cc:37: undefined reference to 
`pthread_join'
obj/dbg/libre2.a(dfa.o): In function `re2::Mutex::ReaderLock()':

etc.

What version of the product are you using? On what operating system?
uname -a:
Linux mtmoblog01dev 3.13.0-37-generic #64~precise1-Ubuntu SMP Wed Sep 24 
21:37:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

re2 revision:
changeset:   118:1b483548272e
tag:         tip
user:        Russ Cox <rsc@swtch.com>
date:        Mon Oct 06 15:08:47 2014 -0400
summary:     doc: import clarifications from Go tree

Please provide any additional information below.
fixed by this patch
diff -r 1b483548272e Makefile
--- a/Makefile  Mon Oct 06 15:08:47 2014 -0400
+++ b/Makefile  Sat Nov 01 12:07:32 2014 +0300
@@ -12,7 +12,7 @@
 CXX?=g++
 CXXFLAGS?=-Wall -O3 -g -pthread # can override
 RE2_CXXFLAGS?=-Wno-sign-compare -c -I. $(CCPCRE)  # required
-LDFLAGS?=
+LDFLAGS?=-lpthread
 AR?=ar
 ARFLAGS?=rsc
 NM?=nm

Original issue reported on code.google.com by mrSergio...@gmail.com on 1 Nov 2014 at 9:11

GoogleCodeExporter commented 9 years ago
RE2 has moved to GitHub. I have not moved the issues over. If this issue is 
still important to you, please file a new one at 
https://github.com/google/re2/issues. Thank you.

Original comment by rsc@golang.org on 11 Dec 2014 at 4:45