develooper Front page | perl.perl5.porters | Postings from April 2010

[perl #74090] seed macro clashes with gcc45's random.h file

mls @ suse . de
April 7, 2010 01:54
[perl #74090] seed macro clashes with gcc45's random.h file
Message ID:
# New Ticket Created by 
# Please include the string:  [perl #74090]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
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.


       * @brief Reseeds the %linear_congruential_engine random number generator
       *        engine sequence to the seed @p __s.
       * @param __s The new seed.
      seed(result_type __s = default_seed);

#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]
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:
    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
    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/, so=so, useshrplib=true,
  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:

@INC for perl 5.12.0:

Environment for perl 5.12.0:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About