Comments (5)
Thanks for the report! I don't have access to a sun C compiler, so that's
helpful.
I've taken the awk script (with slight modifications) to replace fgrep -- even
though
we could probably figure out how to make solaris grep emulate fgrep, I'm using
enough
obscure grep flags that awk is probably safer. (Though I don't know how
portable
stuff like ARGIND is!)
As for debugging the second problem: the issue is that sun's STL has a
different type
for its hashtable iterators than gcc's STL. I'll see if I can use a typename
to work
around this.
Original comment by [email protected]
on 7 Aug 2007 at 7:47
- Changed state: Started
from sparsehash.
I looked into this more, and I was mistaken in my original diagnosis: all the
code is
sparsehash code, not the compiler's STL code at all.
I'm mystified by the error. I'll summarize the important part of it:
line 724: Error: Could not find a match for write_item needed in
test_string<google::dense_hashtable<std::string, std::string,
(There's an identical error message for read_item).
When test_string calls write_item, the write_item argument has the type of the
hashtable key, in this case std::string. But we do have a write_item that
matches
std::string:
static void write_item(FILE *fp, const string &val) {
I don't know why that doesn't match. Note the compiler doesn't complain about a
similar call to "test<google::sparse_hashtable<std::string, std::string, ...>",
which
should have identical type information.
If you can find out what's going on, I'll fix it. But otherwise, I don't
really know
what to do.
Original comment by [email protected]
on 7 Aug 2007 at 9:38
from sparsehash.
It seems to be connected to static linkage of
read_item()/write_item()/free_item()
functions. A friend of mine, Sun Micro employee who works on Sun Studio, told
me that
the Standard prohibits calls to static functions with template parameters. Sun
documentation provides a few words on the subject, see "Calling Dependent Static
Functions From a Function Template":
http://developers.sun.com/sunstudio/documentation/ss11/mr/READMEs/c++.html
If I get it right, it refers to C++ Standard 14.6.4.2 - Candidate functions
[temp.dep.candidate]:
-1- For a function call that depends on a template parameter, if the function
name is
an unqualified-id but not a template-id, the candidate functions are found
using the
usual lookup rules (basic.lookup.unqual, basic.lookup.koenig) except that:
* For the part of the lookup using unqualified name lookup (basic.lookup.unqual),
only function declarations with external linkage from the template definition
context
are found.
Removing "static" linkage declarator (please see the patch) makes the project
built
on Solaris.
Original comment by [email protected]
on 20 Aug 2007 at 2:29
Attachments:
from sparsehash.
I'm glad you figured out what's going on! I've fixed the code to use an
anonymous
namespace instead of 'static', so this should be fixed in the next release.
Original comment by [email protected]
on 20 Aug 2007 at 6:30
from sparsehash.
Sparsehash 0.9 was just released, which should fix this problem.
Original comment by [email protected]
on 9 Oct 2007 at 10:39
- Changed state: Fixed
from sparsehash.
Related Issues (20)
- Fix the compile problem's on llvm(macosx) HOT 1
- Call resize to preallocate for memory does not work
- SPARSEHASH_COMPILE_ASSERT HOT 2
- Repair compilation with clang
- Installation fails check on Red Hat 6
- Installation fails at "make" step on Red Hat Linux 6
- make check fails with GCC 4.9 on Mac OS 10.10.1
- [PATCH] Make dense_hash_map work with non-default-constructible values HOT 1
- Is it thread safe for insertion of sparse hash table? HOT 1
- Google Code is dying
- Memory Corruption HOT 2
- Compile fails on up-to-date Fedora 18 system HOT 2
- Insert deleted key into hashmap will cause size() be increased
- Cannot compile sparsehash-2.0.2 on Ubuntu 12.04LTS
- [PATCH] Fix gcc warning: format '%p' expects argument of type 'void*'
- news page specifies wrong date
- clang compile failure on FreeBSD HOT 3
- failure during "make" of sparsehash on mac osx 10.8.5 HOT 1
- Please implement a check for try in case libstdc++ implements c++11 where tr1 is merged into std HOT 4
- Latest version of xcode Command Line tools breaks sparsehash. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparsehash.