bugPSPP - Bugs: bug #60844, C99: re_compile_pattern

 
 

bug #60844: C99: re_compile_pattern

Submitter:  Jeremy Lavergne <snc>
Submitted:  Mon 28 Jun 2021 01:08:30 PM UTC
   
 
Category:  Compilation/Portability Severity:  5 - Average
Status:  Fixed Assigned to:  None
Open/Closed:  Closed Release:  None
Effort:  0.00
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 25 Jun 2023 07:56:16 PM UTC, comment #6: 


> I think we can close this ticket.


Thanks for checking!  I'm closing it.

Ben Pfaff <blp>
Group administrator
Sun 25 Jun 2023 07:38:37 PM UTC, comment #5: 

I haven't run into this issue since, though I'm on a newer version of MacOS now. Likely means the version of xcode has also changed. I think we can close this ticket.

Jeremy Lavergne <snc>
Sun 13 Mar 2022 09:15:12 PM UTC, comment #4: 

Does this patch (against current tip of master) fix the problem?


diff --git a/Makefile.am b/Makefile.am
index 8ed323b399..9a6f6ebdfc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -75,7 +75,7 @@ generate-changelog:

 DIST_HOOKS += generate-changelog

-GL_CFLAG_GNULIB_WARNINGS = -Wno-missing-prototypes -Wno-unused-parameter
+GL_CFLAG_GNULIB_WARNINGS = -Wno-missing-prototypes -Wno-unused-parameter -Wno-implicit-function-declaration

 include $(top_srcdir)/build-aux/automake.mk
 include $(top_srcdir)/gl/automake.mk


Ben Pfaff <blp>
Group administrator
Mon 24 Jan 2022 03:08:40 PM UTC, comment #3: 

I've found a source of more information: apple's xcode 12 is the primary culprit. It looks like an attempt a reproducing it on other platforms (to then determine if it's an issue) can be generated by using `-Werror=implicit-function-declaration` in cflags.

https://lists.macports.org/pipermail/macports-dev/2020-November/042648.html from https://trac.macports.org/wiki/WimplicitFunctionDeclaration

Jeremy Lavergne <snc>
Mon 28 Jun 2021 03:09:40 PM UTC, comment #2: 

Hi Jeremy, thanks for the report.

The 'clang' command line you posted doesn't contain -Werror, despite the error messages that contain it. This is quite odd.

PSPP ordinarily passes -Werror to the compiler only if 'configure' is given the --enable-Werror option.  This option makes sense for some developers, but not for anyone building for production.  If you are using --enable-Werror, then I recommend removing it.

Ben Pfaff <blp>
Group administrator
Mon 28 Jun 2021 01:11:59 PM UTC, comment #1: 

There's a similar C99 issue with MIN/MAX check, however there's a second test program that finds the MIN/MAX definitions so I believe that one isn't as problematic.

Jeremy Lavergne <snc>
Mon 28 Jun 2021 01:08:30 PM UTC, original submission:  

Recent ./configure produced a config.log which contains -Werror with -Wimplicit-function-declaration (causing no working re_compile_pattern found):

```
configure:49287: checking for working re_compile_pattern
configure:49564: /usr/bin/clang -o conftest -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -DGCC_LINT -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/S
DKs/MacOSX10.15.sdk -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/
lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Librar
y/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 conftest.c -lreadline -lgslcblas -lz -lintl -Wl,-framework -Wl,CoreFoundation  >&5
conftest.c:365:45: error: variable has incomplete type 'struct re_pattern_buffer'
            static struct re_pattern_buffer regex;
                                            ^
conftest.c:365:27: note: forward declaration of 'struct re_pattern_buffer'
            static struct re_pattern_buffer regex;
                          ^
conftest.c:369:33: error: variable has incomplete type 'struct re_registers'
            struct re_registers regs;
                                ^
conftest.c:369:20: note: forward declaration of 'struct re_registers'
            struct re_registers regs;
                   ^
conftest.c:394:19: error: implicit declaration of function 're_set_syntax' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
                  ^
conftest.c:394:34: error: use of undeclared identifier 'RE_SYNTAX_GREP'
                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
                                 ^
conftest.c:394:51: error: use of undeclared identifier 'RE_HAT_LISTS_NOT_NEWLINE'
                  re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
                                                  ^
conftest.c:395:36: error: use of undeclared identifier 'RE_ICASE'
                                 | RE_ICASE);
                                   ^
conftest.c:397:23: error: implicit declaration of function 're_compile_pattern' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
                      ^
conftest.c:402:27: error: implicit declaration of function 're_search' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                      if (re_search (&regex, data, sizeof data - 1,
                          ^
conftest.c:427:19: error: implicit declaration of function 're_set_syntax' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                  re_set_syntax (0);
                  ^
conftest.c:429:23: error: implicit declaration of function 're_compile_pattern' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                  s = re_compile_pattern (pat, sizeof pat - 1, &regex);
                      ^
conftest.c:434:27: error: implicit declaration of function 're_search' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                      i = re_search (&regex, data, sizeof data - 1,
                          ^
conftest.c:447:13: error: implicit declaration of function 're_set_syntax' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
            ^
conftest.c:447:28: error: use of undeclared identifier 'RE_SYNTAX_EGREP'
            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
                           ^
conftest.c:447:46: error: use of undeclared identifier 'RE_HAT_LISTS_NOT_NEWLINE'
            re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
                                             ^
conftest.c:449:17: error: implicit declaration of function 're_compile_pattern' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            s = re_compile_pattern ("a[^x]b", 6, &regex);
                ^
conftest.c:455:21: error: implicit declaration of function 're_search' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
                    ^
conftest.c:462:28: error: use of undeclared identifier 'RE_SYNTAX_POSIX_EGREP'
            re_set_syntax (RE_SYNTAX_POSIX_EGREP);
                           ^
conftest.c:477:28: error: use of undeclared identifier 'RE_SYNTAX_POSIX_EGREP'
            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
                           ^
conftest.c:477:52: error: use of undeclared identifier 'RE_NO_EMPTY_RANGES'
            re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
                                                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
configure:49564: $? = 1
configure: program exited with status 1
```


Jeremy Lavergne <snc>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #51611:  pspp-1.5.3-g6e0b93.tar.xz added by snc (47KiB - application/x-xz - config.log attached)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by snc (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-06-25 blp StatusNone Fixed
        Open/ClosedOpen Closed
    2021-06-28 snc Attached File- Added pspp-1.5.3-g6e0b93.tar.xz, #51611

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code