Bug 1078438
Summary: | Templated types are causing "Could not find a typemap for C type" | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Miro Hrončok <mhroncok> | ||||||
Component: | perl-ExtUtils-ParseXS | Assignee: | Petr Pisar <ppisar> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Jakub Heger <jheger> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 7.0 | CC: | isenfeld, jorton, lmiksik, mkyral, ovasik, ppisar | ||||||
Target Milestone: | rc | Keywords: | FastFix, Patch, Triaged | ||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | perl-ExtUtils-ParseXS-3.18-3.el7 | Doc Type: | If docs needed, set a value | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | 1032181 | Environment: | |||||||
Last Closed: | 2017-08-01 18:14:42 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1110700, 1191021, 1380363 | ||||||||
Attachments: |
|
Description
Miro Hrončok
2014-03-19 17:17:46 UTC
ExtUtils::ParseXS::Utilities::tidy_type() does not parse and normalize some C++ type declarations properly: # perl -MExtUtils::ParseXS::Utilities=tidy_type -e 'print tidy_type(q{std::vector< unsigned int >}), qq{\n}' std::vector< unsigned int > While the output should be: std::vector<unsigned int> This is fixed by upstream perl commit: commit ae7fdf584559a304eb5992a58cd58349cc7c58da Author: Steffen Mueller <smueller> Date: Wed May 22 21:49:06 2013 +0200 EU::ParseXS: Attempt to canonicalize C++ types in tidy_type Includes moving tidy_type to ExtUtils::Typemaps where it seems to belong. It's a pretty poor canonicalizer, but better than nothing! The key change is: + # for templated C++ types, do some bit of flawed canonicalization + # wrt. templates at least + if (/[<>]/) { + s/\s*([<>])\s*/$1/g; + s/>>/> >/g; + } in tidy_type(). Created attachment 876725 [details]
Upstream fix ported to ExtUtils-ParseXS-3.18
Created attachment 876726 [details]
Test case
This test case is included in the patch and is run at build time.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:1924 |