Difference between revisions of "HashtableFixOSX"

From Inkscape Wiki
Jump to navigation Jump to search
m (moved OSXHeaderFix to HashtableFixOSX: better name)
m
 
Line 3: Line 3:
  error: You have a broken version of the <tr1/unordered_set> header...
  error: You have a broken version of the <tr1/unordered_set> header...


This is a bug in the Apple-supplied GCC compiler. Here is how to fix it.
This is a bug due to an outdated header in the Apple-supplied GCC compiler. Here is how to fix it.


# Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&view=co SVN revision 104939] of <tt>tr1/hashtable</tt> from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]
# Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&view=co SVN revision 104939] of <tt>tr1/hashtable</tt> from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]

Latest revision as of 21:44, 23 February 2010

Most probably you are here because you encountered this error on configure:

error: You have a broken version of the <tr1/unordered_set> header...

This is a bug due to an outdated header in the Apple-supplied GCC compiler. Here is how to fix it.

  1. Download SVN revision 104939 of tr1/hashtable from the gcc-4_0-branch SVN repository
  2. Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:
  • Replace file (assuming the new file is located in ~/Downloads):
$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig

$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1

  • Check new file:
$ ls -l /usr/include/c++/4.0.0/tr1/hashtable
  • Change permissions/ownership if needed:
$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable

Now it should be fixed!