Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=195473
Summary: invalid use of ‘register’ in linkage specification
Product: Fedora Core
Version: devel
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: normal
Component: perl
AssignedTo: jvdias(a)redhat.com
ReportedBy: ellson(a)research.att.com
QAContact: dkl(a)redhat.com
CC: fedora-perl-devel-list(a)redhat.com
Description of problem:
I think the right explanation of this problem is that gcc-4.1.1-3 is a little
more pedantic than earlier versions and has exposed a bug in the perl headers.
On this basis I'm reporting the bug against perl.
Attempting to build a swig-generated perl extension, like the attached example,
produces many errors like:
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perlvars.h:35: error:
invalid use of ‘register’ in linkage specification
A workaround is to "#define register" (i.e. null out the register keywork
completely)
Version-Release number of selected component (if applicable):
perl-5.8.8-6
gcc-4.1.1-3
swig-1.3.29-0.1
How reproducible:
100%
problem verified on x86_64 and i386 platforms
Steps to Reproduce:
1. zcat bug.tgz | tar xf -
2. cd bug
3. make
Actual results:
swig -c++ -perl5 -o example_wrap.cpp example.i
/usr/bin/g++ -I`perl -e 'use Config; print $Config{archlib};'`/CORE -fPIC -DPIC
-c -o example_wrap.o example_wrap.cpp
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/thrdvar.h:34: error:
invalid use of ‘register’ in linkage specification
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/thrdvar.h:38: error:
invalid use of ‘register’ in linkage specification
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/thrdvar.h:40: error:
invalid use of ‘register’ in linkage specification
...
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perlvars.h:66: error:
invalid use of ‘register’ in linkage specification
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perlvars.h:69: error:
invalid use of ‘register’ in linkage specification
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perlvars.h:73: error:
invalid use of ‘register’ in linkage specification
example_wrap.cpp:1421: error: invalid use of ‘register’ in linkage specification
example_wrap.cpp:1871: error: invalid use of ‘register’ in linkage specification
make: *** [example_wrap.o] Error 1
Expected results:
(uncomment the hack that adds "#define register" in Makefile)
$ make clean
rm -f *.o example_wrap.cpp example.pm libexample*
$ make
swig -c++ -perl5 -o example_wrap.cpp example.i
(echo "#define register"; cat example_wrap.cpp) >example_wrap.cpp.tmp
mv -f example_wrap.cpp.tmp example_wrap.cpp
/usr/bin/g++ -I`perl -e 'use Config; print $Config{archlib};'`/CORE -fPIC -DPIC
-c -o example_wrap.o example_wrap.cpp
/usr/bin/g++ -I`perl -e 'use Config; print $Config{archlib};'`/CORE -fPIC -DPIC
-c -o example.o example.cpp
g++ -shared example_wrap.o example.o -o libexample.so
$ ./example.pl
24
Additional info:
------- Additional Comments From ellson(a)research.att.com 2006-06-15 09:19 EST -------
Created an attachment (id=130972)
--> (
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=130972&action=...)
small test case
--
Configure bugmail:
https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.