lamuguo / re2

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

Compilation problem on OSX #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Use the brew package manager (http://mxcl.github.com/homebrew/) to install 
RE2:
brew install -w re2

What is the expected output? What do you see instead?
Compilation!  Instead: "Undefined symbols:..."

What version of the product are you using? On what operating system?
See output for full platform info.

Please provide any additional information below.

OUTPUT:

/usr/local/bin/hg
==> Cloning https://re2.googlecode.com/hg
Updating /Users/kbritton/Library/Caches/Homebrew/re2--hg
hg pull
pulling from https://re2.googlecode.com/hg
searching for changes
no changes found
hg update
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
hg archive -y -t files /private/tmp/homebrew-re2-HEAD-K6A1
==> make
make 
g++ -o obj/util/arena.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG util/arena.cc
g++ -o obj/util/stringpiece.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.  
  -DNDEBUG util/stringpiece.cc
g++ -o obj/util/rune.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG util/rune.cc
g++ -o obj/util/hash.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG util/hash.cc
g++ -o obj/util/stringprintf.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I. 
   -DNDEBUG util/stringprintf.cc
g++ -o obj/util/strutil.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG util/strutil.cc
g++ -o obj/util/valgrind.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG util/valgrind.cc
g++ -o obj/re2/bitstate.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/bitstate.cc
g++ -o obj/re2/compile.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/compile.cc
g++ -o obj/re2/dfa.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/dfa.cc
g++ -o obj/re2/filtered_re2.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.  
  -DNDEBUG re2/filtered_re2.cc
g++ -o obj/re2/mimics_pcre.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.   
 -DNDEBUG re2/mimics_pcre.cc
g++ -o obj/re2/nfa.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/nfa.cc
g++ -o obj/re2/onepass.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/onepass.cc
g++ -o obj/re2/parse.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/parse.cc
g++ -o obj/re2/perl_groups.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.   
 -DNDEBUG re2/perl_groups.cc
g++ -o obj/re2/prefilter.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/prefilter.cc
g++ -o obj/re2/prefilter_tree.o -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/prefilter_tree.cc
g++ -o obj/re2/prog.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/prog.cc
g++ -o obj/re2/re2.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/re2.cc
g++ -o obj/re2/regexp.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/regexp.cc
g++ -o obj/re2/set.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/set.cc
g++ -o obj/re2/simplify.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/simplify.cc
g++ -o obj/re2/tostring.o -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.    
-DNDEBUG re2/tostring.cc
g++ -o obj/re2/unicode_casefold.o -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/unicode_casefold.cc
g++ -o obj/re2/unicode_groups.o -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/unicode_groups.cc
g++ -o obj/so/util/arena.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG util/arena.cc
g++ -o obj/so/util/hash.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG util/hash.cc
g++ -o obj/so/util/rune.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG util/rune.cc
g++ -o obj/so/util/stringpiece.o -fPIC -Wall -O3 -g -pthread   
-Wno-sign-compare -c -I.    -DNDEBUG util/stringpiece.cc
g++ -o obj/so/util/stringprintf.o -fPIC -Wall -O3 -g -pthread   
-Wno-sign-compare -c -I.    -DNDEBUG util/stringprintf.cc
g++ -o obj/so/util/strutil.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG util/strutil.cc
g++ -o obj/so/util/valgrind.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare 
-c -I.    -DNDEBUG util/valgrind.cc
g++ -o obj/so/re2/bitstate.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/bitstate.cc
g++ -o obj/so/re2/compile.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/compile.cc
g++ -o obj/so/re2/dfa.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.  
  -DNDEBUG re2/dfa.cc
g++ -o obj/so/re2/filtered_re2.o -fPIC -Wall -O3 -g -pthread   
-Wno-sign-compare -c -I.    -DNDEBUG re2/filtered_re2.cc
g++ -o obj/so/re2/mimics_pcre.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare 
-c -I.    -DNDEBUG re2/mimics_pcre.cc
g++ -o obj/so/re2/nfa.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.  
  -DNDEBUG re2/nfa.cc
g++ -o obj/so/re2/onepass.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/onepass.cc
g++ -o obj/so/re2/parse.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/parse.cc
g++ -o obj/so/re2/prefilter.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare 
-c -I.    -DNDEBUG re2/prefilter.cc
g++ -o obj/so/re2/perl_groups.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare 
-c -I.    -DNDEBUG re2/perl_groups.cc
g++ -o obj/so/re2/prefilter_tree.o -fPIC -Wall -O3 -g -pthread   
-Wno-sign-compare -c -I.    -DNDEBUG re2/prefilter_tree.cc
g++ -o obj/so/re2/prog.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c -I. 
   -DNDEBUG re2/prog.cc
g++ -o obj/so/re2/re2.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.  
  -DNDEBUG re2/re2.cc
g++ -o obj/so/re2/regexp.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/regexp.cc
g++ -o obj/so/re2/set.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c -I.  
  -DNDEBUG re2/set.cc
g++ -o obj/so/re2/simplify.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/simplify.cc
g++ -o obj/so/re2/tostring.o -fPIC -Wall -O3 -g -pthread   -Wno-sign-compare -c 
-I.    -DNDEBUG re2/tostring.cc
g++ -o obj/so/re2/unicode_casefold.o -fPIC -Wall -O3 -g -pthread   
-Wno-sign-compare -c -I.    -DNDEBUG re2/unicode_casefold.cc
g++ -o obj/so/re2/unicode_groups.o -fPIC -Wall -O3 -g -pthread   
-Wno-sign-compare -c -I.    -DNDEBUG re2/unicode_groups.cc
ar rsc obj/libre2.a obj/util/arena.o obj/util/hash.o obj/util/rune.o 
obj/util/stringpiece.o obj/util/stringprintf.o obj/util/strutil.o 
obj/util/valgrind.o obj/re2/bitstate.o obj/re2/compile.o obj/re2/dfa.o 
obj/re2/filtered_re2.o obj/re2/mimics_pcre.o obj/re2/nfa.o obj/re2/onepass.o 
obj/re2/parse.o obj/re2/perl_groups.o obj/re2/prefilter.o 
obj/re2/prefilter_tree.o obj/re2/prog.o obj/re2/re2.o obj/re2/regexp.o 
obj/re2/set.o obj/re2/simplify.o obj/re2/tostring.o obj/re2/unicode_casefold.o 
obj/re2/unicode_groups.o 
g++ -dynamiclib -pthread -exported_symbols_list libre2.symbols.darwin -o 
obj/so/libre2.dylib.0 obj/so/util/arena.o obj/so/util/hash.o obj/so/util/rune.o 
obj/so/util/stringpiece.o obj/so/util/stringprintf.o obj/so/util/strutil.o 
obj/so/util/valgrind.o obj/so/re2/bitstate.o obj/so/re2/compile.o 
obj/so/re2/dfa.o obj/so/re2/filtered_re2.o obj/so/re2/mimics_pcre.o 
obj/so/re2/nfa.o obj/so/re2/onepass.o obj/so/re2/parse.o 
obj/so/re2/perl_groups.o obj/so/re2/prefilter.o obj/so/re2/prefilter_tree.o 
obj/so/re2/prog.o obj/so/re2/re2.o obj/so/re2/regexp.o obj/so/re2/set.o 
obj/so/re2/simplify.o obj/so/re2/tostring.o obj/so/re2/unicode_casefold.o 
obj/so/re2/unicode_groups.o
Undefined symbols:
  "operator==(re2::StringPiece const&, re2::StringPiece const&)", referenced from:
     -exported_symbol[s_list] command line option
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [obj/so/libre2.dylib] Error 1
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/re2.rb#L14
==> Environment
HOMEBREW_VERSION: 0.8
HEAD: 94fed7e533acaab5f1bece6aa605fb6fcdfc8b82
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_LIBRARY_PATH: /usr/local/Library/Homebrew
Hardware: quad-core 64-bit arrandale
OS X: 10.6.7
Kernel Architecture: i386
Ruby: 1.8.7-174
/usr/bin/ruby => 
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Xcode: 3.2.6
GCC-4.0: build 5494 
GCC-4.2: build 5666 
LLVM: build 2335 
MacPorts or Fink? false
X11 installed? true
==> Build Flags
CC: /usr/bin/cc => /usr/bin/gcc-4.2
CXX: /usr/bin/c++ => /usr/bin/c++-4.2
LD: /usr/bin/cc => /usr/bin/gcc-4.2
CFLAGS: -O3 -w -pipe
CXXFLAGS: -O3 -w -pipe
MAKEFLAGS: -j4

Error: Failed executing: make 

Original issue reported on code.google.com by kenbrit...@gmail.com on 5 May 2011 at 6:13

GoogleCodeExporter commented 9 years ago
Introduced in af73701f0348. Can be fixed with the following diff.
diff -r af73701f0348 libre2.symbols
--- a/libre2.symbols    Sun May 01 15:26:33 2011 -0400
+++ b/libre2.symbols    Wed May 11 18:40:04 2011 +0200
@@ -6,8 +6,6 @@
                # re2::StringPiece*
                _ZN3re211StringPiece*;
                _ZNK3re211StringPiece*;
-               # operator==(re2::StringPiece const&, re2::StringPiece const&)
-               _ZeqRKN3re211StringPieceES2_;
                # operator<<(std::ostream&, re2::StringPiece const&)
                _ZlsRSoRKN3re211StringPieceE;
        local:
diff -r af73701f0348 libre2.symbols.darwin
--- a/libre2.symbols.darwin     Sun May 01 15:26:33 2011 -0400
+++ b/libre2.symbols.darwin     Wed May 11 18:40:04 2011 +0200
@@ -5,7 +5,5 @@
 # re2::StringPiece*
 __ZN3re211StringPiece*
 __ZNK3re211StringPiece*
-# operator==(re2::StringPiece const&, re2::StringPiece const&)
-__ZeqRKN3re211StringPieceES2_
 # operator<<(std::ostream&, re2::StringPiece const&)
 __ZlsRSoRKN3re211StringPieceE

Original comment by tuncer.a...@gmail.com on 11 May 2011 at 4:40

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 4b4bc44d4581.

Original comment by rsc@swtch.com on 16 May 2011 at 1:56