Subject: Bug#3847: Perl & G++

From: "Brian C. White" <[email-masked]>
Date: Sat, 20 Jul 1996 15:58:09 -0400

Package: perl
Version: 5.003-2

The file '/usr/lib/perl5/i486-linux/5.003/CORE/proto.h' has a problem when
compiled using g++:

  g++ -c  -Dbool=char -DHAS_BOOL -I/usr/include/db -I/usr/local/include \
      -O2 -fomit-frame-pointer      -DVERSION=\"0.16\" -DXS_VERSION=\"0.16\" \
      -fpic -I/usr/lib/perl5/i486-linux/5.003/CORE  Ferret.c

  In file included from /usr/lib/perl5/i486-linux/5.003/CORE/perl.h:1435,
                   from Ferret.c:30:
  /usr/lib/perl5/i486-linux/5.003/CORE/proto.h:69: only constructors can be declared `explicit'

Removing the keyword "explicit" avoids this error.

Also, the file '/usr/lib/perl5/i486-linux/5.003/Config.pm' includes the line:

  cppflags='-Dbool=char -DHAS_BOOL -I/usr/include/db -I/usr/local/include'

The "-Dbool=char" should be removed and it is a standard type in ANSI C++.
It might be possible to remove it from the 'ccflags' as well, I don't know.

I am using gcc 2.7.2-8.

                                        Brian
                               ( [email-masked] )

-------------------------------------------------------------------------------
    In theory, theory and practice are the same.  In practice, they're not.

---

From: "Brian C. White" <[email-masked]>
Date: Tue, 23 Jul 1996 19:07:43 -0400

More problems:

The "Config.pm" defines the following:

	libs='-lndbm -lgdbm -ldbm -ldb -ldl -ldld -lm -lc'

Not all of these exist on every system and thus break the building of any
extension modules, even if they are not needed.  Is there any way this
line could be determined at run-time?

The "MakeMaker" script has a problem with defining:

	'LIBS'	=> [qw(g++)]

MakeMaker tries to use this within a regex without surrounding it with
"\Q" and "\E".  Thus, it dies with an error about a recursive modifier
due to the ++.

                                        Brian
                               ( [email-masked] )