https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Bug ID: 1078438 Summary: Templated types are causing "Could not find a typemap for C type" Product: Red Hat Enterprise Linux 7 Version: 7.0 Component: perl-ExtUtils-ParseXS Assignee: perl-maint-list@redhat.com Reporter: mhroncok@redhat.com QA Contact: qe-baseos-apps@redhat.com CC: perl-devel@lists.fedoraproject.org, ppisar@redhat.com Depends On: 1032181 Blocks: 1032056
+++ This bug was initially created as a clone of Bug #1032181 +++
Description of problem: When using perl-ExtUtils-ParseXS to build XS stuff (I don't know the terminology here, sorry), errors like this happens: https://rt.cpan.org/Public/Bug/Display.html?id=86367
Version-Release number of selected component (if applicable): perl-ExtUtils-ParseXS-3.18-291.fc20.noarch
How reproducible: Happend when building slic3r-xs
Steps to Reproduce: 1. Get slic3r tarball from https://github.com/alexrj/Slic3r/archive/1.0.0RC1.tar.gz 2. unpack && cd Slic3r-1.0.0RC1/xs/ # be usre to be in xs folder 3. perl Build.PL && ./Build
Actual results: <snip> Could not find a typemap for C type 'std::vector< double >'. The following C types are mapped by the current typemap: 'AV *', <snip>, 'wchar_t *' in /usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t "/home/churchyard/Stažené/Slic3r-1.0.0RC1/xs/xsp/typemap.xspt" "/home/churchyard/Stažené/Slic3r-1.0.0RC1/xs/xsp/TriangleMesh.xsp", line 138
Expected results: No errors, just warnings
Additional info: This is fixed in upstream release 3.22 and also in development release 3.18_03.
Fix is in Bug #1032181.
See the error in this build.log: http://copr-be.cloud.fedoraproject.org/results/churchyard/epel7-3dprint/epel...
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1032056 [Bug 1032056] Slic3r 1.0.0RC1 is available https://bugzilla.redhat.com/show_bug.cgi?id=1032181 [Bug 1032181] Templated types are causing "Could not find a typemap for C type"
https://bugzilla.redhat.com/show_bug.cgi?id=1078438 Bug 1078438 depends on bug 1032181, which changed state.
Bug 1032181 Summary: Templated types are causing "Could not find a typemap for C type" https://bugzilla.redhat.com/show_bug.cgi?id=1032181
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |ERRATA
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Petr Pisar ppisar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Patch Status|NEW |ASSIGNED Blocks|1032056 | Depends On|1032181 |
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1032056 [Bug 1032056] Slic3r 1.0.0RC1 is available https://bugzilla.redhat.com/show_bug.cgi?id=1032181 [Bug 1032181] Templated types are causing "Could not find a typemap for C type"
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
--- Comment #2 from Petr Pisar ppisar@redhat.com --- 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@cpan.org 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().
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
--- Comment #3 from Petr Pisar ppisar@redhat.com --- Created attachment 876725 --> https://bugzilla.redhat.com/attachment.cgi?id=876725&action=edit Upstream fix ported to ExtUtils-ParseXS-3.18
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
--- Comment #4 from Petr Pisar ppisar@redhat.com --- Created attachment 876726 --> https://bugzilla.redhat.com/attachment.cgi?id=876726&action=edit Test case
This test case is included in the patch and is run at build time.
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Petr Pisar ppisar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- External Bug ID| |CPAN 86367
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Ondrej Vasik ovasik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1110700
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Ondrej Vasik ovasik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1191021
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Ondrej Vasik ovasik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ovasik@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Joe Orton jorton@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jorton@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Iveta Wiedermann isenfeld@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |isenfeld@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Libor Miksik lmiksik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lmiksik@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Petr Pisar ppisar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |FastFix
https://bugzilla.redhat.com/show_bug.cgi?id=1078438
Petr Pisar ppisar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|perl-devel@lists.fedoraproj | |ect.org |
perl-devel@lists.fedoraproject.org