maingperf - Support: sr #111203, I am trying to build gperf-3.1,...

 
 

sr #111203: I am trying to build gperf-3.1, getline.cc will not compile.

Submitter:  mr16ga <mr16ga>
Submitted:  Sat 08 Mar 2025 09:58:11 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Works For Me
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 05 Apr 2025 01:13:48 AM UTC, comment #3: 

Looking at this error:

/usr/include/iso/stdio_iso.h:195:60: error: redefinition of 'const char* restrict'
 extern FILE *fopen(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                                            ^


It stumbles on the '_RESTRICT_KYWD' identifier, which expands to 'restrict', per this definition in /usr/include/sys/feature_tests.h:

#if (defined(__STDC__) && defined(_STDC_C99))
#define _RESTRICT_KYWD  restrict
#else
#define _RESTRICT_KYWD
#endif

but your g++ 3.4.2 (released in 2004) does not understand this keyword.

I would suggest that you use a newer gcc. For example, opencsw.org provides binaries of gcc 4.9.0 for Solaris 10. That's more likely to support the 'restrict' keyword properly.

Bruno Haible <haible>
Group administrator
Sat 05 Apr 2025 12:31:44 AM UTC, comment #2: 

here is what I did:

waggawagga% pwd
/src/gperf-3.1
waggawagga% uname -a
SunOS waggawagga 5.10 Generic_142909-17 sun4u sparc SUNW,Sun-Blade-2500
waggawagga%

waggawagga% gmake distclean
cd lib; if test -f Makefile; then gmake distclean; fi
gmake[1]: Entering directory '/src/gperf-3.1/lib'
rm -f ~ .s .o .a libgp.a core
rm -f config.status config.log config.cache Makefile
gmake[1]: Leaving directory '/src/gperf-3.1/lib'
cd src; if test -f Makefile; then gmake distclean; fi
gmake[1]: Entering directory '/src/gperf-3.1/src'
rm -f ~ .s .o .a gperf gperf.manifest core
rm -f config.status config.log config.cache Makefile config.h
gmake[1]: Leaving directory '/src/gperf-3.1/src'
cd tests; if test -f Makefile; then gmake distclean; fi
gmake[1]: Entering directory '/src/gperf-3.1/tests'
rm -f .o core *inset.c output. *.out \
      aout aout.manifest \
      cout cout.manifest \
      lu2out lu2out.manifest \
      lu8out lu8out.manifest \
      m3out m3out.manifest \
      pout pout.manifest \
      preout preout.manifest \
      smtp.c smtp smtp.manifest \
      tmp-* valitest*
rm -f -r *.dSYM
rm -f config.status config.log config.cache Makefile
gmake[1]: Leaving directory '/src/gperf-3.1/tests'
cd doc; if test -f Makefile; then gmake distclean; fi
gmake[1]: Entering directory '/src/gperf-3.1/doc'
rm -f ~ .aux .toc .cp .fn .ky .pg .tp .vr .my .log .cps core
rm -f config.status config.log config.cache Makefile
gmake[1]: Leaving directory '/src/gperf-3.1/doc'
rm -f config.status config.log config.cache Makefile
waggawagga% ls
AUTHORS         ChangeLog       Makefile.devel  Makefile.vms    README          README.windows  autom4te.cache  build-aux       config.status~  configure.ac    doc             lib             tests
COPYING         INSTALL         Makefile.in     NEWS            README.vms      aclocal.m4      build           confDOayal      configure       debug.out       err             src
waggawagga% autoconf
waggawagga% ls
AUTHORS         ChangeLog       Makefile.devel  Makefile.vms    README          README.windows  autom4te.cache  build-aux       config.status~  configure.ac    doc             lib             tests
COPYING         INSTALL         Makefile.in     NEWS            README.vms      aclocal.m4      build           confDOayal      configure       debug.out       err             src
waggawagga%
waggawagga% ./configure
checking whether make sets $(MAKE)... yes
configure: creating ./config.status
config.status: creating Makefile
=== configuring in lib (/src/gperf-3.1/lib)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ar... ar
checking for ranlib... ranlib
checking for a BSD compatible install... /opt/csw/bin/ginstall -c
configure: creating ./config.status
config.status: creating Makefile
=== configuring in src (/src/gperf-3.1/src)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
./configure: line 3248: CL_PROG_INSTALL: command not found
checking for stack-allocated variable-size arrays... yes
checking for rand in -lm... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
=== configuring in tests (/src/gperf-3.1/tests)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
configure: creating ./config.status
config.status: creating Makefile
=== configuring in doc (/src/gperf-3.1/doc)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.
checking whether make sets $(MAKE)... yes
checking for a BSD compatible install... /opt/csw/bin/ginstall -c
configure: creating ./config.status
config.status: creatinwaggawagga%
waggawagga% gmake
cd lib; gmake all
gmake[1]: Entering directory '/src/gperf-3.1/lib'
gcc -g -O2 -I. -c ./getopt.c
gcc -g -O2 -I. -c ./getopt1.c
g++ -g -O2 -I. -c ./getline.cc
In file included from /usr/include/stdio.h:22:0,
                 from ./getline.h:20,
                 from ./getline.cc:21:
/usr/include/iso/stdio_iso.h:195:60: error: redefinition of 'const char* restrict'
 extern FILE *fopen(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                                            ^
/usr/include/iso/stdio_iso.h:195:32: note: 'const char* restrict' previously declared here
 extern FILE *fopen(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                ^
/usr/include/iso/stdio_iso.h:197:16: error: redefinition of 'const char* restrict'
    const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
                ^
/usr/include/iso/stdio_iso.h:196:34: note: 'const char* restrict' previously declared here
 extern FILE *freopen(const char *_RESTRICT_KYWD,
                                  ^
/usr/include/iso/stdio_iso.h:197:38: error: conflicting declaration 'std::FILE* restrict'
    const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
                                      ^
/usr/include/iso/stdio_iso.h:196:34: note: previous declaration as 'const char* restrict'
 extern FILE *freopen(const char *_RESTRICT_KYWD,
                                  ^
/usr/include/iso/stdio_iso.h:198:48: error: conflicting declaration 'char* restrict'
 extern void setbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
                                                ^
/usr/include/iso/stdio_iso.h:198:26: note: previous declaration as 'std::FILE* restrict'
 extern void setbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
                          ^
/usr/include/iso/stdio_iso.h:199:48: error: conflicting declaration 'char* restrict'
 extern int setvbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD, int,
                                                ^
/usr/include/iso/stdio_iso.h:199:26: note: previous declaration as 'std::FILE* restrict'
 extern int setvbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD, int,
                          ^
/usr/include/iso/stdio_iso.h:202:54: error: conflicting declaration 'const char* restrict'
 extern int fprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                                                      ^
/usr/include/iso/stdio_iso.h:202:26: note: previous declaration as 'std::FILE* restrict'
 extern int fprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                          ^
/usr/include/iso/stdio_iso.h:204:53: error: conflicting declaration 'const char* restrict'
 extern int fscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                                                     ^
/usr/include/iso/stdio_iso.h:204:25: note: previous declaration as 'std::FILE* restrict'
 extern int fscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                         ^
/usr/include/iso/stdio_iso.h:210:54: error: conflicting declaration 'const char* restrict'
 extern int sprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                                                      ^
/usr/include/iso/stdio_iso.h:210:26: note: previous declaration as 'char* restrict'
 extern int sprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                          ^
/usr/include/iso/stdio_iso.h:213:16: error: redefinition of 'const char* restrict'
    const char *_RESTRICT_KYWD, ...);
g Makefile

waggawagga%
waggawagga% gmake
cd lib; gmake all
gmake[1]: Entering directory '/src/gperf-3.1/lib'
gcc -g -O2 -I. -c ./getopt.c
gcc -g -O2 -I. -c ./getopt1.c
g++ -g -O2 -I. -c ./getline.cc
In file included from /usr/include/stdio.h:22:0,
                 from ./getline.h:20,
                 from ./getline.cc:21:
/usr/include/iso/stdio_iso.h:195:60: error: redefinition of 'const char* restrict'
 extern FILE *fopen(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                                            ^
/usr/include/iso/stdio_iso.h:195:32: note: 'const char* restrict' previously declared here
 extern FILE *fopen(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                ^
/usr/include/iso/stdio_iso.h:197:16: error: redefinition of 'const char* restrict'
    const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
                ^
/usr/include/iso/stdio_iso.h:196:34: note: 'const char* restrict' previously declared here
 extern FILE *freopen(const char *_RESTRICT_KYWD,
                                  ^
/usr/include/iso/stdio_iso.h:197:38: error: conflicting declaration 'std::FILE* restrict'
    const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
                                      ^
/usr/include/iso/stdio_iso.h:196:34: note: previous declaration as 'const char* restrict'
 extern FILE *freopen(const char *_RESTRICT_KYWD,
                                  ^
/usr/include/iso/stdio_iso.h:198:48: error: conflicting declaration 'char* restrict'
 extern void setbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
                                                ^
/usr/include/iso/stdio_iso.h:198:26: note: previous declaration as 'std::FILE* restrict'
 extern void setbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD);
                          ^
/usr/include/iso/stdio_iso.h:199:48: error: conflicting declaration 'char* restrict'
 extern int setvbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD, int,
                                                ^
/usr/include/iso/stdio_iso.h:199:26: note: previous declaration as 'std::FILE* restrict'
 extern int setvbuf(FILE *_RESTRICT_KYWD, char *_RESTRICT_KYWD, int,
                          ^
/usr/include/iso/stdio_iso.h:202:54: error: conflicting declaration 'const char* restrict'
 extern int fprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                                                      ^
/usr/include/iso/stdio_iso.h:202:26: note: previous declaration as 'std::FILE* restrict'
 extern int fprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                          ^
/usr/include/iso/stdio_iso.h:204:53: error: conflicting declaration 'const char* restrict'
 extern int fscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                                                     ^
/usr/include/iso/stdio_iso.h:204:25: note: previous declaration as 'std::FILE* restrict'
 extern int fscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                         ^
/usr/include/iso/stdio_iso.h:210:54: error: conflicting declaration 'const char* restrict'
 extern int sprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                                                      ^
/usr/include/iso/stdio_iso.h:210:26: note: previous declaration as 'char* restrict'
 extern int sprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
                          ^
/usr/include/iso/stdio_iso.h:213:16: error: redefinition of 'const char* restrict'
    const char *_RESTRICT_KYWD, ...);
usr/include/iso/stdio_iso.h:212:31: note: 'const char* restrict' previously declared here
 extern int sscanf(const char *_RESTRICT_KYWD,
                               ^
/usr/include/iso/stdio_iso.h:214:55: error: conflicting declaration 'const char* restrict'
 extern int vfprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                                                       ^
/usr/include/iso/stdio_iso.h:214:27: note: previous declaration as 'std::FILE* restrict'
 extern int vfprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                           ^
/usr/include/iso/stdio_iso.h:217:55: error: conflicting declaration 'const char* restrict'
 extern int vsprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                                                       ^
/usr/include/iso/stdio_iso.h:217:27: note: previous declaration as 'char* restrict'
 extern int vsprintf(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                           ^
/usr/include/iso/stdio_iso.h:220:53: error: conflicting declaration 'std::FILE* restrict'
 extern char *fgets(char *_RESTRICT_KYWD, int, FILE *_RESTRICT_KYWD);
                                                     ^
/usr/include/iso/stdio_iso.h:220:26: note: previous declaration as 'char* restrict'
 extern char *fgets(char *_RESTRICT_KYWD, int, FILE *_RESTRICT_KYWD);
                          ^
/usr/include/iso/stdio_iso.h:222:52: error: conflicting declaration 'std::FILE* restrict'
 extern int fputs(const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
                                                    ^
/usr/include/iso/stdio_iso.h:222:30: note: previous declaration as 'const char* restrict'
 extern int fputs(const char *_RESTRICT_KYWD, FILE *_RESTRICT_KYWD);
                              ^
/usr/include/iso/stdio_iso.h:237:8: error: conflicting declaration 'std::FILE* restrict'
  FILE *_RESTRICT_KYWD);
        ^
/usr/include/iso/stdio_iso.h:236:27: note: previous declaration as 'void* restrict'
 extern size_t fread(void *_RESTRICT_KYWD, size_t, size_t,
                           ^
/usr/include/iso/stdio_iso.h:239:8: error: conflicting declaration 'std::FILE* restrict'
  FILE *_RESTRICT_KYWD);
        ^
/usr/include/iso/stdio_iso.h:238:34: note: previous declaration as 'const void* restrict'
 extern size_t fwrite(const void *_RESTRICT_KYWD, size_t, size_t,
                                  ^
/usr/include/iso/stdio_iso.h:241:50: error: conflicting declaration 'std::fpos_t* restrict'
 extern int fgetpos(FILE *_RESTRICT_KYWD, fpos_t *_RESTRICT_KYWD);
                                                  ^
/usr/include/iso/stdio_iso.h:241:26: note: previous declaration as 'std::FILE* restrict'
 extern int fgetpos(FILE *_RESTRICT_KYWD, fpos_t *_RESTRICT_KYWD);
                          ^
/usr/include/iso/stdio_c99.h:54:54: error: conflicting declaration 'const char* restrict'
 extern int vfscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, __va_list);
                                                      ^
/usr/include/iso/stdio_c99.h:54:26: note: previous declaration as 'std::FILE* restrict'
 extern int vfscanf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, __va_list);
                          ^
/usr/include/iso/stdio_c99.h:56:60: error: redefinition of 'const char* restrict'
 extern int vsscanf(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                                                            ^
/usr/include/iso/stdio_c99.h:56:32: note: 'const char* restrict' previously declared here
 extern int vsscanf(const char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                                ^
/usr/include/iso/stdio_c99.h:68:63: error: conflicting declaration 'const char* restrict'
 extern int snprintf(char _RESTRICT_KYWD, size_t, const char *_RESTRICusr/include/iso/stdio_c99.h:68:27: note: previous declaration as 'char restrict'
 extern int snprintf(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
                           ^
/usr/include/iso/stdio_c99.h:70:64: error: conflicting declaration 'const char* restrict'
 extern int vsnprintf(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
                                                                ^
/usr/include/iso/stdio_c99.h:70:28: note: previous declaration as 'char* restrict'
 extern int vsnprintf(char *_RESTRICT_KYWD, size_t, const char *_RESTRICT_KYWD,
                            ^
/usr/include/iso/string_iso.h:60:55: error: conflicting declaration 'const void* restrict'
 extern void *memcpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, size_t);
                                                       ^
/usr/include/iso/string_iso.h:60:27: note: previous declaration as 'void* restrict'
 extern void *memcpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, size_t);
                           ^
/usr/include/iso/string_iso.h:63:55: error: conflicting declaration 'const char* restrict'
 extern char *strcat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                                       ^
/usr/include/iso/string_iso.h:63:27: note: previous declaration as 'char* restrict'
 extern char *strcat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                           ^
/usr/include/iso/string_iso.h:65:55: error: conflicting declaration 'const char* restrict'
 extern char *strcpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                                       ^
/usr/include/iso/string_iso.h:65:27: note: previous declaration as 'char* restrict'
 extern char *strcpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                           ^
/usr/include/iso/string_iso.h:70:56: error: conflicting declaration 'const char* restrict'
 extern char *strncat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
                                                        ^
/usr/include/iso/string_iso.h:70:28: note: previous declaration as 'char* restrict'
 extern char *strncat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
                            ^
/usr/include/iso/string_iso.h:72:56: error: conflicting declaration 'const char* restrict'
 extern char *strncpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
                                                        ^
/usr/include/iso/string_iso.h:72:28: note: previous declaration as 'char* restrict'
 extern char *strncpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
                            ^
/usr/include/iso/string_iso.h:74:55: error: conflicting declaration 'const char* restrict'
 extern char *strtok(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                                                       ^
/usr/include/iso/string_iso.h:74:27: note: previous declaration as 'char* restrict'
 extern char *strtok(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
                           ^
/usr/include/iso/string_iso.h:75:57: error: conflicting declaration 'const char* restrict'
 extern size_t strxfrm(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
                                                         ^
/usr/include/iso/string_iso.h:75:29: note: previous declaration as 'char* restrict'
 extern size_t strxfrm(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
                             ^
/usr/include/string.h:65:57: error: conflicting declaration 'const char* restrict'
 extern char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                                                         ^
/usr/include/string.h:65:29: note: previous declaration as 'char* restrict'
 extern char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                             ^
/usr/include/string.h:66:9: error: conflicting declaration 'char** restrict'
  char **_RESTRICT_KYWD);
T_KYWD,

          ^
/usr/include/string.h:65:29: note: previous declaration as 'char* restrict'
 extern char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
                             ^
/usr/include/string.h:71:56: error: conflicting declaration 'const void* restrict'
 extern void *memccpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD,
                                                        ^
/usr/include/string.h:71:28: note: previous declaration as 'void* restrict'
 extern void *memccpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD,
                            ^
/usr/include/string.h:77:53: error: conflicting declaration 'void* restrict'
 extern int uucopy(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t);
                                                     ^
/usr/include/string.h:77:31: note: previous declaration as 'const void* restrict'
 extern int uucopy(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t);
                               ^
/usr/include/string.h:78:56: error: conflicting declaration 'void* restrict'
 extern int uucopystr(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t);
                                                        ^
/usr/include/string.h:78:34: note: previous declaration as 'const void* restrict'
 extern int uucopystr(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t);
                                  ^
./getline.cc: In function 'int getstr(char**, std::size_t*, std::FILE*, char, std::size_t)':
./getline.cc:76:62: error: invalid conversion from 'char*' to 'std::size_t {aka unsigned int}' [-fpermissive]
               memcpy (new_line, *lineptr, read_pos - *lineptr);
                                                              ^
./getline.cc:76:62: error: too many arguments to function 'void* std::memcpy(void*, std::size_t)'
In file included from /usr/include/string.h:18:0,
                 from ./getline.cc:25:
/usr/include/iso/string_iso.h:60:14: note: declared here
 extern void *memcpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, size_t);
              ^
gmake[1]: * [Makefile:91: getline.o] Error 1
gmake[1]: Leaving directory '/src/gperf-3.1/lib'
gmake: * [Makefile:33: all] Error 2
waggawagga%

I sure is is some configuration error on my part
     

mr16ga <mr16ga>
Sat 08 Mar 2025 10:19:32 PM UTC, comment #1: 

When reporting a bug, please always show
1) what you did,
2) what were the results.

1) in this case means: the 'configure' command line, and the 'make' or 'gmake' command line.
2) in this case means: the last 50 lines of the output, not just the last 7 lines.

Otherwise it is impossible to help you.

Bruno Haible <haible>
Group administrator
Sat 08 Mar 2025 09:58:11 PM UTC, original submission:  

I am running:
SunOS waggawagga 5.10 Generic_142909-17 sun4u sparc SUNW,Sun-Blade-2500
# gcc --version
gcc (GCC) 3.4.2
Copyright (C) 2004 Free Software Foundation, Inc.

gmake --version
GNU Make 3.80


I can't get getline.cc to compile. This is the error message:

make[2]: * [Makefile:91: getline.o] Error 1
make[2]: Leaving directory '/src/gperf-3.1/lib'
gmake[1]: * [nbproject/Makefile-Default.mk:47: .build-conf] Error 2
gmake[1]: Leaving directory '/export/home/joe/SunStudioProjects/lib_1'
gmake: * [nbproject/Makefile-impl.mk:40: .build-impl] Error 2

Build failed. Exit value 2.

mr16ga <mr16ga>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by mr16ga (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-04-05 haible StatusNeed Info Works For Me
        Assigned toNone haible
        Open/ClosedOpen Closed
        SummaryI am trying to build gpref-3.1 getline.cc will wont compile. I am trying to build gperf-3.1, getline.cc will not compile.
    2025-03-08 haible StatusNone Need Info

    Back to the top

    Powered by Savane 3.14-962f.
    Corresponding source code