Front page | perl.perl5.porters |
Postings from April 2010
[perl #74090] seed macro clashes with gcc45's random.h file
From:
mls @ suse . de
Date:
April 7, 2010 01:54
Subject:
[perl #74090] seed macro clashes with gcc45's random.h file
Message ID:
rt-3.6.HEAD-6227-1270571693-960.74090-75-0@perl.org
# New Ticket Created by mls@suse.de
# Please include the string: [perl #74090]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74090 >
This is a bug report for perl from mls@suse.de,
generated with the help of perlbug 1.39 running under perl 5.12.0.
-----------------------------------------------------------------
[Please describe your issue here]
embed.h's seed macro definition clashes with a c++ header file from
gcc45, which defines a seed() function.
/usr/include/c++/4.5/bits/random.h:
/**
* @brief Reseeds the %linear_congruential_engine random number generator
* engine sequence to the seed @p __s.
*
* @param __s The new seed.
*/
void
seed(result_type __s = default_seed);
embed.h:
#define seed() Perl_seed(aTHX)
This results in error messages like:
/usr/include/c++/4.5/bits/random.h:185:17: error: macro "seed" passed 1 arguments, but takes just 0
/usr/include/c++/4.5/bits/random.h:198:19: error: macro "seed" passed 1 arguments, but takes just 0
The seed macro was not public in perl-5.10, this was changed in commit
0a87c459 to fix a win32 linker error.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
This perlbug was built using Perl 5.12.0 - Tue Apr 6 13:36:06 UTC 2010
It is being executed now by Perl 5.12.0 - Tue Apr 6 13:29:13 UTC 2010.
Site configuration information for perl 5.12.0:
Configured by abuild at Tue Apr 6 13:29:13 UTC 2010.
Summary of my perl5 (revision 5 version 12 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.32, archname=i586-linux-thread-multi
uname='linux build33 2.6.32 #1 smp 2010-01-06 16:07:25 +0100 i686 athlon i386 gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr -Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm -Duseshrplib=true -Doptimize=-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -fstack-protector'
ccversion='', gccversion='4.5.0 20100331 (experimental) [trunk revision 157870]', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector'
libpth=/lib /usr/lib /usr/local/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.11.1.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.11.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.12.0/i586-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -fomit-frame-pointer -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wall -pipe'
Locally applied patches:
RC1
---
@INC for perl 5.12.0:
/usr/lib/perl5/site_perl/5.12.0/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.12.0
/usr/lib/perl5/vendor_perl/5.12.0/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.12.0
/usr/lib/perl5/5.12.0/i586-linux-thread-multi
/usr/lib/perl5/5.12.0
.
---
Environment for perl 5.12.0:
HOME=/root
LANG (unset)
LANGUAGE (unset)
LC_COLLATE=POSIX
LC_CTYPE=de_DE@euro
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/suse/mls/bin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/bin:/usr/lib/java/bin:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde/bin:/usr/openwin/bin:/opt/pilotsdk/bin:/suse/mls/korn
PERL_BADLANG (unset)
SHELL=/bin/bash
-
[perl #74090] seed macro clashes with gcc45's random.h file
by mls @ suse . de