Bug 281859 - grantlee compilation fails on Leopard
Summary: grantlee compilation fails on Leopard
Status: RESOLVED FIXED
Alias: None
Product: grantlee
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: MacPorts macOS
: NOR normal
Target Milestone: 0.2
Assignee: Stephen Kelly
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-12 09:25 UTC by kde
Modified: 2012-12-14 13:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase (1.19 KB, application/octet-stream)
2011-11-06 15:28 UTC, Stephen Kelly
Details
broken container workaround (835 bytes, patch)
2011-11-06 17:07 UTC, Stephen Kelly
Details
Patch for testing. (1.33 KB, patch)
2011-11-07 01:28 UTC, Stephen Kelly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2011-09-12 09:25:28 UTC
Version:           unspecified
OS:                OS X

On behalf of the MacPorts project I want to alert you to the fact that grantlee 0.1.9 compilation succeeds on Snow Leopard (OS X 10.6.x) but fails on Leopard (OS X 10.5.x). Our bug report on this problem is here:

https://trac.macports.org/ticket/31219


Reproducible: Always

Steps to Reproduce:
On Leopard with Xcode 3.1.4 and MacPorts 2.0.3 run "sudo port install grantlee".

Actual Results:  
//usr/include/c++/4.0.0/tr1/hashtable:1045: error: no matching
function for call to ‘std::tr1::hashtable<int, std::pair<const int, int>,
std::allocator<std::pair<const int, int> >,
Internal::extract1st<std::pair<const int, int> >, std::equal_to<int>,
QtHasher<int>, Internal::mod_range_hashing, Internal::default_ranged_hash,
Internal::prime_rehash_policy, false, true,
true>::m_allocate_node(Internal::hash_node<std::pair<const int, int>,
false>*&)’
//usr/include/c++/4.0.0/tr1/hashtable:1046: error: request for
member ‘copy_code_from’ in ‘* tail’, which is of non-class type
‘Internal::hash_node<std::pair<const int, int>, false>*’

Expected Results:  
Successful compile

Snow Leopard uses Apple gcc 4.2.1 by default; Leopard uses Apple gcc 4.0.1 by default. I tried compiling with Apple gcc 4.2.1 on Leopard, but that did not help. It still used the same c++ 4.0.0 headers as above and ran into the same error. Leopard's Xcode does not provide any version of c++ headers other than 4.0.0. Snow Leopard provides 4.0.0 and 4.2.1 versions of the headers.
Comment 1 Stephen Kelly 2011-09-13 19:07:25 UTC
Thanks for the report. I'll try to find someone with a mac to help with this issue.
Comment 2 Stephen Kelly 2011-11-06 15:28:05 UTC
Created attachment 65297 [details]
Testcase

Please try the attached testcase. There will be more testcases to track down the actual problem, so ideally, get in touch with email or IRC if you're willing to try out the next testcases.
Comment 3 Stephen Kelly 2011-11-06 17:07:38 UTC
Created attachment 65305 [details]
broken container workaround


Should be fixed in 41a771b7470bb61ca8fa98f1428b43b5e06592ba.

That commit will be part of the next release. If you need a patch to version 0.1.9, you can use the attached patch, which should work, but I don't have a mac to test it.
Comment 4 kde 2011-11-06 19:06:09 UTC
I have updated grantlee in MacPorts to 0.2.0, which appears to include this patch, and the error message is the same. I've attached the full log to our ticket 31219 whose link is above. I'm happy to try out patches if you'll tell me what I need to do; for example I was not sure what to do with the files in the testcase.tar.gz attachment.
Comment 5 Stephen Kelly 2011-11-07 01:28:17 UTC
Created attachment 65323 [details]
Patch for testing.

Hi Ryan,

Version 2.0.0 does not include this patch. I've attached it for convenience. It should apply against 2.0.0.

The testcase.tar.gz is now obsolete.

Thanks,

Steve.
Comment 6 kde 2011-11-08 18:56:34 UTC
Thanks, grantlee 0.2.0 builds successfully on Leopard with the addition of that patch.
Comment 7 Laurent Montel 2012-12-14 13:10:35 UTC
We can close it as patch is fixed and kde@ryandesign.com confirms that it compiles