openscap icon indicating copy to clipboard operation
openscap copied to clipboard

MacOS: Errors building system_info_probe.c

Open redhatrises opened this issue 7 years ago • 3 comments

Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:106:3: error: "Sorry, your OS isn't supported."
# error "Sorry, your OS isn't supported."

redhatrises avatar Jul 05 '18 17:07 redhatrises

Also:

/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:518:15: error: use of undeclared identifier 'MAX_BUFFER_SIZE'
        char grubcfg[MAX_BUFFER_SIZE+1] = { '\0' };
                     ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:526:11: error: use of undeclared identifier 'PCRE_ERROR_NOMATCH'
        int rc = PCRE_ERROR_NOMATCH;
                 ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:527:22: error: use of undeclared identifier '_REGEX_RES_VECSIZE'
        int erroffset, ovec[_REGEX_RES_VECSIZE];
                            ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:529:2: error: use of undeclared identifier 'pcre'
        pcre *re;
        ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:529:8: error: use of undeclared identifier 're'
        pcre *re;
              ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:530:2: error: use of undeclared identifier 're'
        re = pcre_compile(_REGEX_MENUENTRY, 0, &error, &erroffset, NULL);
        ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:530:7: warning: implicit declaration of function 'pcre_compile' is invalid in C99 [-Wimplicit-function-declaration]
        re = pcre_compile(_REGEX_MENUENTRY, 0, &error, &erroffset, NULL);
             ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:530:20: error: use of undeclared identifier '_REGEX_MENUENTRY'
        re = pcre_compile(_REGEX_MENUENTRY, 0, &error, &erroffset, NULL);
                          ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:532:6: error: use of undeclared identifier 're'
        if (re == NULL)
            ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:535:34: error: use of undeclared identifier 'MAX_BUFFER_SIZE'
        while ((len = fread(grubcfg, 1, MAX_BUFFER_SIZE, fp)) > 0) {
                                        ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:537:4: warning: implicit declaration of function 'pcre_free' is invalid in C99 [-Wimplicit-function-declaration]
                        pcre_free(re);
                        ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:537:14: error: use of undeclared identifier 're'
                        pcre_free(re);
                                  ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:541:26: error: use of undeclared identifier 'ovec'
                memset(ovec, 0, sizeof(ovec));
                                       ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:541:10: error: use of undeclared identifier 'ovec'
                memset(ovec, 0, sizeof(ovec));
                       ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:541:10: error: use of undeclared identifier 'ovec'
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:543:9: warning: implicit declaration of function 'pcre_exec' is invalid in C99 [-Wimplicit-function-declaration]
                        rc = pcre_exec(re, NULL, grubcfg, len, ovec[1], 0, ovec, _REGEX_RES_VECSIZE);
                             ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:543:19: error: use of undeclared identifier 're'
                        rc = pcre_exec(re, NULL, grubcfg, len, ovec[1], 0, ovec, _REGEX_RES_VECSIZE);
                                       ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:543:43: error: use of undeclared identifier 'ovec'
                        rc = pcre_exec(re, NULL, grubcfg, len, ovec[1], 0, ovec, _REGEX_RES_VECSIZE);
                                                               ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:543:55: error: use of undeclared identifier 'ovec'
                        rc = pcre_exec(re, NULL, grubcfg, len, ovec[1], 0, ovec, _REGEX_RES_VECSIZE);
                                                                           ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:543:61: error: use of undeclared identifier '_REGEX_RES_VECSIZE'
                        rc = pcre_exec(re, NULL, grubcfg, len, ovec[1], 0, ovec, _REGEX_RES_VECSIZE);
                                                                                 ^
/Users/travis/build/redhatrises/openscap/src/OVAL/probes/independent/system_info_probe.c:551:12: error: use of undeclared identifier 're'
        pcre_free(re);
                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.

redhatrises avatar Jul 05 '18 17:07 redhatrises

Thx for reporting but it may be wasted effort. If somebody is going to step up and fix it they will have to be on a Mac system to check the solution. If they are on a Mac system they will see these errors without the need to look them up anywhere.

mpreisler avatar Jul 05 '18 17:07 mpreisler

Ops, sorry for the noise.

evgenyz avatar Aug 25 '20 08:08 evgenyz