Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile blead with g++ 4.8.1 #13572

Closed
p5pRT opened this issue Feb 3, 2014 · 11 comments
Closed

Can't compile blead with g++ 4.8.1 #13572

p5pRT opened this issue Feb 3, 2014 · 11 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 3, 2014

Migrated from rt.perl.org#121151 (status was 'resolved')

Searchable as RT121151$

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2014

From @khwilliamson

This is a bug report for perl from khw@​khw.(none),
generated with the help of perlbug 1.40 running under perl 5.19.9.


I get the following messages with the latest Ubuntu. Chris Williams
reproduced this on Suse. I don't know whether it's the compiler version
or what​:

g++ -c -D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -ggdb3 -O0
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.11\"
-DXS_VERSION=\"1.11\" -fPIC "-I../.." SDBM_File.c
In file included from SDBM_File.xs​:3​:0​:
../../perl.h​:3063​:79​: error​: declaration of ‘void* Perl_calloc(size_t,
size_t)’ has a different exception specifier
  # define __attribute__warn_unused_result__
__attribute__((warn_unused_result))

  ^
../../proto.h​:337​:4​: note​: in expansion of macro
‘__attribute__warn_unused_result__’
  __attribute__warn_unused_result__;
  ^
<command-line>​:0​:8​: error​: from previous declaration ‘void*
Perl_calloc(size_t, size_t) throw ()’
In file included from SDBM_File.xs​:3​:0​:
../../perl.h​:3063​:79​: error​: declaration of ‘void* Perl_malloc(size_t)’
has a different exception specifier
  # define __attribute__warn_unused_result__
__attribute__((warn_unused_result))

  ^
../../proto.h​:2492​:4​: note​: in expansion of macro
‘__attribute__warn_unused_result__’
  __attribute__warn_unused_result__;
  ^
<command-line>​:0​:8​: error​: from previous declaration ‘void*
Perl_malloc(size_t) throw ()’
In file included from ../../perl.h​:4997​:0,
  from SDBM_File.xs​:3​:
../../proto.h​:2506​:47​: error​: declaration of ‘void Perl_mfree(void*)’
has a different exception specifier
  PERL_CALLCONV Free_t Perl_mfree(Malloc_t where);
  ^
<command-line>​:0​:6​: error​: from previous declaration ‘void
Perl_mfree(void*) throw ()’
In file included from SDBM_File.xs​:3​:0​:
../../perl.h​:3063​:79​: error​: declaration of ‘void* Perl_realloc(void*,
size_t)’ has a different exception specifier
  # define __attribute__warn_unused_result__
__attribute__((warn_unused_result))

  ^
../../proto.h​:3339​:4​: note​: in expansion of macro
‘__attribute__warn_unused_result__’
  __attribute__warn_unused_result__;
  ^
<command-line>​:0​:9​: error​: from previous declaration ‘void*
Perl_realloc(void*, size_t) throw ()’
make[1]​: *** [SDBM_File.o] Error 1
make[1]​: Leaving directory `/home/khw/perl/locale/ext/SDBM_File'
Unsuccessful make(ext/SDBM_File)​: code=512 at make_ext.pl line 517.
make​: *** [lib/auto/SDBM_File/SDBM_File.so] Error 2



Flags​:
  category=library
  severity=high
  module=SDBM_File


Site configuration information for perl 5.19.9​:

Configured by khw at Sun Feb 2 22​:58​:54 MST 2014.

Summary of my perl5 (revision 5 version 19 subversion 9) configuration​:
  Commit id​: f316047262c82b5ddb0891b1a4b306b2ee2e7739
  Platform​:
  osname=linux, osvers=3.11.0-15-generic,
archname=x86_64-linux-thread-multi-ld
  uname='linux khw 3.11.0-15-generic #25-ubuntu smp thu jan 30
17​:22​:01 utc 2014 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dprefix=/home/khw/devel -Dusedevel
-D'optimize=-ggdb3' -A'optimize=-ggdb3' -A'optimize=-O0'
-Accflags='-DPERL_BOOL_AS_CHAR' -Dman1dir=none -Dman3dir=none
-DDEBUGGING -Dcc=g++ -Dusemorebits -Dusethreads'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  use64bitint=define, use64bitall=define, uselongdouble=define
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='g++', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR
-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize=' -ggdb3 -O0',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR
-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
  ccversion='', gccversion='4.8.1', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='long double', nvsize=16,
Off_t='off_t', lseeksize=8
  alignbytes=16, prototype=define
  Linker and Libraries​:
  ld='g++', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/include/c++/4.8 /usr/include/x86_64-linux-gnu/c++/4.8
/usr/include/c++/4.8/backward /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.17'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -ggdb3 -ggdb3 -O0
-L/usr/local/lib -fstack-protector'


@​INC for perl 5.19.9​:
  /home/khw/perl/locale/lib
  /home/khw/devel/lib/perl5/site_perl/5.19.9/x86_64-linux-thread-multi-ld
  /home/khw/devel/lib/perl5/site_perl/5.19.9
  /home/khw/devel/lib/perl5/5.19.9/x86_64-linux-thread-multi-ld
  /home/khw/devel/lib/perl5/5.19.9
  /home/khw/devel/lib/perl5/site_perl
  .


Environment for perl 5.19.9​:
  HOME=/home/khw
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/home/khw/bin​:/home/khw/perl5/perlbrew/bin​:/home/khw/print/bin​:/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/sbin​:/usr/bin​:/sbin​:/usr/games​:/usr/local/games​:/home/khw/iands/www​:/home/khw/cxoffice/bin
  PERL5OPT=-w
  PERL_BADLANG (unset)
  PERL_POD_PEDANTIC=1
  SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2014

From @bingos

On Sun, Feb 02, 2014 at 10​:23​:46PM -0800, karl williamson wrote​:

# New Ticket Created by karl williamson
# Please include the string​: [perl #121151]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=121151 >

This is a bug report for perl from khw@​khw.(none),
generated with the help of perlbug 1.40 running under perl 5.19.9.

-----------------------------------------------------------------
I get the following messages with the latest Ubuntu. Chris Williams
reproduced this on Suse. I don't know whether it's the compiler version
or what​:

OpenSUSE 13.1 with g++ 4.8.1

Also on Debian sid with g++ 4.8.2

Cheers,

--
Chris Williams
aka BinGOs
PGP ID 0x4658671F
http​://www.gumbynet.org.uk

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2014

From @greerga

On Mon, 3 Feb 2014, Chris 'BinGOs' Williams wrote​:

On Sun, Feb 02, 2014 at 10​:23​:46PM -0800, karl williamson wrote​:

# New Ticket Created by karl williamson
# Please include the string​: [perl #121151]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=121151 >

This is a bug report for perl from khw@​khw.(none),
generated with the help of perlbug 1.40 running under perl 5.19.9.

-----------------------------------------------------------------
I get the following messages with the latest Ubuntu. Chris Williams
reproduced this on Suse. I don't know whether it's the compiler version
or what​:

OpenSUSE 13.1 with g++ 4.8.1

Also on Debian sid with g++ 4.8.2

And latest Ubuntu, which is why my g++ smokers have been paused.

Latest glibc added __THROW to the malloc-like function declarations which
expands to "throw ()" and the lack of it in Perl's malloc-like
declarations causes a conflict.

So we need to​:

#ifndef __THROW
#define __THROW
#endif

and add __THROW to the Perl malloc-like functions.

I've been meaning to commit such a fix for a while now but maybe finally
tonight.

--
George Greer

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2014

From @bingos

On Mon, Feb 03, 2014 at 10​:29​:26AM +0000, Chris 'BinGOs' Williams wrote​:

On Sun, Feb 02, 2014 at 10​:23​:46PM -0800, karl williamson wrote​:

# New Ticket Created by karl williamson
# Please include the string​: [perl #121151]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=121151 >

This is a bug report for perl from khw@​khw.(none),
generated with the help of perlbug 1.40 running under perl 5.19.9.

-----------------------------------------------------------------
I get the following messages with the latest Ubuntu. Chris Williams
reproduced this on Suse. I don't know whether it's the compiler version
or what​:

OpenSUSE 13.1 with g++ 4.8.1

Also on Debian sid with g++ 4.8.2

Also reproduced on Debian GNU/kFreeBSD with g++ - gcc version 4.8.2 (Debian 4.8.2-14)

--
Chris Williams
aka BinGOs
PGP ID 0x4658671F
http​://www.gumbynet.org.uk

@p5pRT
Copy link
Author

p5pRT commented Feb 3, 2014

From @tonycoz

On Mon Feb 03 07​:11​:01 2014, perl@​greerga.m-l.org wrote​:

On Mon, 3 Feb 2014, Chris 'BinGOs' Williams wrote​:

On Sun, Feb 02, 2014 at 10​:23​:46PM -0800, karl williamson wrote​:

I get the following messages with the latest Ubuntu. Chris Williams
reproduced this on Suse. I don't know whether it's the compiler version
or what​:

OpenSUSE 13.1 with g++ 4.8.1

Also on Debian sid with g++ 4.8.2

And latest Ubuntu, which is why my g++ smokers have been paused.

Latest glibc added __THROW to the malloc-like function declarations which
expands to "throw ()" and the lack of it in Perl's malloc-like
declarations causes a conflict.

So we need to​:

#ifndef __THROW
#define __THROW
#endif

and add __THROW to the Perl malloc-like functions.

I've been meaning to commit such a fix for a while now but maybe finally
tonight.

Removing the PERL_MALLOC_OK => 1 in ext/SDBM_File/Makefile.PL also allows perl to build.

#defining those names (malloc, calloc, realloc, free) is fairly questionable from a C standard point of view, since we still include the headers.

Tony

@p5pRT
Copy link
Author

p5pRT commented Feb 5, 2014

From @khwilliamson

On 02/03/2014 03​:34 PM, Tony Cook via RT wrote​:

On Mon Feb 03 07​:11​:01 2014, perl@​greerga.m-l.org wrote​:

On Mon, 3 Feb 2014, Chris 'BinGOs' Williams wrote​:

On Sun, Feb 02, 2014 at 10​:23​:46PM -0800, karl williamson wrote​:

I get the following messages with the latest Ubuntu. Chris Williams
reproduced this on Suse. I don't know whether it's the compiler version
or what​:

OpenSUSE 13.1 with g++ 4.8.1

Also on Debian sid with g++ 4.8.2

And latest Ubuntu, which is why my g++ smokers have been paused.

Latest glibc added __THROW to the malloc-like function declarations which
expands to "throw ()" and the lack of it in Perl's malloc-like
declarations causes a conflict.

So we need to​:

#ifndef __THROW
#define __THROW
#endif

and add __THROW to the Perl malloc-like functions.

I've been meaning to commit such a fix for a while now but maybe finally
tonight.

Removing the PERL_MALLOC_OK => 1 in ext/SDBM_File/Makefile.PL also allows perl to build.

#defining those names (malloc, calloc, realloc, free) is fairly questionable from a C standard point of view, since we still include the headers.

Tony

Just to get things to work again, I commited a patch with Tony's
suggestion. I'm not claiming this is the ultimate disposition
e9d5f7d

@p5pRT
Copy link
Author

p5pRT commented May 17, 2014

From @jkeenan

On Sun Feb 02 22​:23​:46 2014, public@​khwilliamson.com wrote​:

This is a bug report for perl from khw@​khw.(none),
generated with the help of perlbug 1.40 running under perl 5.19.9.

-----------------------------------------------------------------
I get the following messages with the latest Ubuntu. Chris Williams
reproduced this on Suse. I don't know whether it's the compiler
version
or what​:

g++ -c -D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR -DDEBUGGING
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -ggdb3 -O0
-DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree
-Drealloc=Perl_realloc -Dcalloc=Perl_calloc -DVERSION=\"1.11\"
-DXS_VERSION=\"1.11\" -fPIC "-I../.." SDBM_File.c
In file included from SDBM_File.xs​:3​:0​:
../../perl.h​:3063​:79​: error​: declaration of ‘void* Perl_calloc(size_t,
size_t)’ has a different exception specifier
# define __attribute__warn_unused_result__
__attribute__((warn_unused_result))

^
../../proto.h​:337​:4​: note​: in expansion of macro
‘__attribute__warn_unused_result__’
__attribute__warn_unused_result__;
^
<command-line>​:0​:8​: error​: from previous declaration ‘void*
Perl_calloc(size_t, size_t) throw ()’
In file included from SDBM_File.xs​:3​:0​:
../../perl.h​:3063​:79​: error​: declaration of ‘void*
Perl_malloc(size_t)’
has a different exception specifier
# define __attribute__warn_unused_result__
__attribute__((warn_unused_result))

^
../../proto.h​:2492​:4​: note​: in expansion of macro
‘__attribute__warn_unused_result__’
__attribute__warn_unused_result__;
^
<command-line>​:0​:8​: error​: from previous declaration ‘void*
Perl_malloc(size_t) throw ()’
In file included from ../../perl.h​:4997​:0,
from SDBM_File.xs​:3​:
../../proto.h​:2506​:47​: error​: declaration of ‘void Perl_mfree(void*)’
has a different exception specifier
PERL_CALLCONV Free_t Perl_mfree(Malloc_t where);
^
<command-line>​:0​:6​: error​: from previous declaration ‘void
Perl_mfree(void*) throw ()’
In file included from SDBM_File.xs​:3​:0​:
../../perl.h​:3063​:79​: error​: declaration of ‘void* Perl_realloc(void*,
size_t)’ has a different exception specifier
# define __attribute__warn_unused_result__
__attribute__((warn_unused_result))

^
../../proto.h​:3339​:4​: note​: in expansion of macro
‘__attribute__warn_unused_result__’
__attribute__warn_unused_result__;
^
<command-line>​:0​:9​: error​: from previous declaration ‘void*
Perl_realloc(void*, size_t) throw ()’
make[1]​: *** [SDBM_File.o] Error 1
make[1]​: Leaving directory `/home/khw/perl/locale/ext/SDBM_File'
Unsuccessful make(ext/SDBM_File)​: code=512 at make_ext.pl line 517.
make​: *** [lib/auto/SDBM_File/SDBM_File.so] Error 2

FWIW, today I was able to successfully build and test Perl blead (which is RC1) on Ubuntu 13.10 with gcc 4.8.1 *with a smaller set of configuration options* than the other contributors to this RT have done. I am attaching the Perl -V output as perlVg++.txt

Thank you very much.
Jim Keenan

@p5pRT
Copy link
Author

p5pRT commented May 17, 2014

From @jkeenan

Summary of my perl5 (revision 5 version 20 subversion 0) configuration​:
  Commit id​: 54ff0ea
  Platform​:
  osname=linux, osvers=3.11.0-20-generic, archname=x86_64-linux-thread-multi
  uname='linux zareason 3.11.0-20-generic #35-ubuntu smp fri may 2 21​:32​:49 utc 2014 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Dusedevel -Dcc=g++ -Dusethreads'
  hint=recommended, useposix=true, d_sigaction=define
  useithreads=define, usemultiplicity=define
  use64bitint=define, use64bitall=define, uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='g++', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
  optimize='-O2',
  cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
  ccversion='', gccversion='4.8.1', gccosandvers=''
  intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='g++', ldflags =' -fstack-protector -L/usr/local/lib'
  libpth=/usr/include/c++/4.8 /usr/include/x86_64-linux-gnu/c++/4.8 /usr/include/c++/4.8/backward /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
  libc=libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
  gnulibc_version='2.17'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
  cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'

Characteristics of this binary (from libperl)​:
  Compile-time options​: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
  PERL_DONT_CREATE_GVSV
  PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
  PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
  PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
  PERL_USE_DEVEL USE_64_BIT_ALL USE_64_BIT_INT
  USE_ITHREADS USE_LARGE_FILES USE_LOCALE
  USE_LOCALE_COLLATE USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  USE_REENTRANT_API
  Locally applied patches​:
  RC1
  Built under linux
  Compiled at May 17 2014 13​:21​:14
  %ENV​:
  PERLBREW_BASHRC_VERSION="0.67"
  PERLBREW_HOME="/home/jkeenan/.perlbrew"
  PERLBREW_MANPATH="/home/jkeenan/perl5/perlbrew/perls/perl-5.18.2/man"
  PERLBREW_PATH="/home/jkeenan/perl5/perlbrew/bin​:/home/jkeenan/perl5/perlbrew/perls/perl-5.18.2/bin"
  PERLBREW_PERL="perl-5.18.2"
  PERLBREW_ROOT="/home/jkeenan/perl5/perlbrew"
  PERLBREW_VERSION="0.67"
  @​INC​:
  lib
  /usr/local/lib/perl5/site_perl/5.20.0/x86_64-linux-thread-multi
  /usr/local/lib/perl5/site_perl/5.20.0
  /usr/local/lib/perl5/5.20.0/x86_64-linux-thread-multi
  /usr/local/lib/perl5/5.20.0
  .

@p5pRT
Copy link
Author

p5pRT commented Aug 8, 2016

From @khwilliamson

This appears to be no longer a problem, and as the original OP, I'm closing it
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Aug 8, 2016

@khwilliamson - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant