zeusdeux / re2

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

compile failure: Solaris #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. gmake test

What is the expected output? What do you see instead?
Expected the make to success, instead saw error:

/bin/sh: syntax error at line 1: `(' unexpected
gmake: *** [obj/dbg/util/arena.o] Error 2

What version of the product are you using? On what operating system?
Current version available from mercurial.

SunOS 5.10

Please provide any additional information below.
Tried regular make, it did not like the Makefile.

Original issue reported on code.google.com by b.jetha%...@gtempaccount.com on 3 Aug 2011 at 11:20

GoogleCodeExporter commented 9 years ago
Finally got it to work!

Had to add the following to the top of Makefile:
SHELL=/bin/bash
export SHELL

Because mine was executing under bourne shell instead of bash which caused the 
strange error.

Replaced all "-pthread" options with "-pthreads" because it is different on 
Solaris.

Removed the "--version-script=libre2.symbols" option because this is not 
supported on Solaris.

Changed the "-soname" option to "-h" because it is different on Solaris.

It would really be nice if the package came with a configure file to do all 
this.

Original comment by b.jetha%...@gtempaccount.com on 5 Aug 2011 at 7:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello, i folowed steps you described and got error "tr1/unordered_set: No such 
file or directory"
I have Boost version 1.50.0 installed.

g++ -o obj/dbg/util/arena.o -fPIC  -Wall -O3 -g -pthreads -I 
/home/user/include/boost   -Wno-sign-compare -c -I.    util/arena.cc
In file included from util/arena.cc:5:
./util/util.h:45:29: tr1/unordered_set: No such file or directory
In file included from util/arena.cc:5:
./util/util.h:46: error: `std::tr1' has not been declared
./util/util.h:46: error: expected nested-name-specifier before "unordered_set"
./util/util.h:46: error: `unordered_set' has not been declared
gmake: *** [obj/dbg/util/arena.o] Error 1

I changed in /util/util.h:

#include <tr1/unordered_set>
using std::tr1::unordered_set;

to

#include <boost/tr1/unordered_set.hpp>
using boost::unordered_set;

this helps to compile util/arena.cc, but stuck on re2/dfa.cc i've with error 
"no matching function for call to boost::unordered::detail::allocator_traits, 
boost::unordered::detail::ptr_node, boost::unordered::detail::ptr_bucket"

How do you solve this? What Boost libs version do you use?

Original comment by Morozov....@gmail.com on 26 Jul 2012 at 12:56

GoogleCodeExporter commented 9 years ago
Sorry I cannot help you, I do not use boost. I ended up giving up on RE2 
because I had the requirement for compilation under CC (Sun's C++ compiler) 
which I could not get to work.

Original comment by b.jetha%...@gtempaccount.com on 27 Jul 2012 at 10:52

GoogleCodeExporter commented 9 years ago
Based on some changes mentioned above, report error says not found 
'tr1/unorder_set'. I checked g++ version, and mine is g++ 3.4, and 
tr1:unordered_set is included after g++ 4.x, so i change unordered_set to 
hash_set, and it seems work now. not sure if there's any other problem on such 
changes.

44 #if defined(__GNUC__) && !defined(USE_CXX0X)
45 
46 //#include <tr1/unordered_set>
47 //using std::tr1::unordered_set;
48 #include <ext/hash_set>
49 #define unordered_set __gnu_cxx::hash_set  
50 
51 #else
52 
53 include <unordered_set>
54 using std::unordered_set;
55 
56 #endif

Original comment by jsdoi...@gmail.com on 10 Jan 2013 at 4:22

GoogleCodeExporter commented 9 years ago

Original comment by rsc@golang.org on 10 Jan 2014 at 3:07

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