1

I'm trying to install Perl 5.26.0 on a CentOS 7 system where I do not have root access. I installed that version of Perl with no problem on another CentOS 6 system. Here is the configure command I executed:

./Configure -des -Dusethreads -Dprefix=$INSTALL_PATH/$SOFTWARE-$VERSION

And here is the error I obtain:

gcc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings generate_uudmap.c
In file included from /path/to/include/string.h:635:0,
                 from generate_uudmap.c:10:
/path/to/include/bits/string3.h:129:1: error: C++ style comments are not allowed in ISO C90
 // XXX We have no corresponding builtin yet.
 ^
/path/to/include/bits/string3.h:129:1: error: (this will be reported only once per input file)
make: *** [Makefile:250: generate_uudmap.o] Error 1
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
julio514
  • 181
  • 1
  • 1
  • 13
  • *"error: C++ style comments are not allowed in ISO C90"* : Try remove the `-std=c89` option (or use `-std=c99` instead). See [gcc options controlling C dialect](https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html) and [Why can't I use //-style comments in my C code?](https://stackoverflow.com/q/2223541/2173773) – Håkon Hægland Jul 28 '17 at 15:45
  • 2
    You can try alter C compiler switches by passing them with the `-A` switch to `Configure`. For example: `./Configure -des -Accflags=-std=c99 [...]` – Håkon Hægland Jul 28 '17 at 16:02
  • However, when I add the `-Accflags=-std=c99`, it generates the following command: `gcc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -std=c99 -std=c89 -O2 -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings generate_uudmap.c` So basically `-std=c99` and `-std=c89` and generates the same error msg. – julio514 Jul 28 '17 at 16:18
  • 1
    Okay it works now! :D. After the error thrown by Configure, I went into the `sflags` file and commented line #13: `stdflags=" -std=c89"` Many thanks @Håkon Hægland -much appreciated! – julio514 Jul 28 '17 at 17:25

2 Answers2

1

Okay it works now! :D. After the error thrown by Configure, I went into the sflags file and commented line #13: stdflags=" -std=c89" I ran make again and then make install

julio514
  • 181
  • 1
  • 1
  • 13
0

In Centos 7 Perl version 5.30.2 change to c99 the line stdflags=" -std=c89" in the cflags file for:

Oldline

stdflags=" -std=c89"

Newline

stdflags=" -std=c99"

And make install (no ./Configure -des -Dprefix=...)

David Buck
  • 3,752
  • 35
  • 31
  • 35