Page MenuHome GnuPG

Cannot compile on macOS Mojave (utf8.c)
Closed, ResolvedPublic

Description

I'm trying to build gnupg on Mojave (from master), but compiling fails due to file utf8.c. I tried both gcc and clang with no luck (clang gives more errors though).

Errors with gcc:

utf8.c:124:1: error: expected expression before 'static'
 static int cmp_casemap(const void *key, const void *cm)
 ^~~~~~
make[3]: *** [libregexp_a-utf8.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Errors with clang:

utf8.c:124:1: error: expected expression
static int cmp_casemap(const void *key, const void *cm)
^
utf8.c:150:27: error: expected '}'
#endif /* JIM_BOOTSTRAP */
                          ^
./_unicode_mapping.c:3:60: note: to match this '{'
static const struct casemap unicode_case_mapping_upper[] = {
                                                           ^
utf8.c:149:2: error: expected ';' after top level declarator
}
 ^
 ;
3 errors generated.
make[3]: *** [libregexp_a-utf8.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Event Timeline

werner triaged this task as Normal priority.
werner added a project: gnupg (gpg23).
werner added a subscriber: werner.

Thanks for reporting; the code is really new and not yet fully tested.

Thanks for testing. It's actually an error of generating _unicode_mapping.c, which utf8.c includes.

Fixed in rG50b320952e99: regexp: Fix generation of _unicode_mapping.c..

gniibe changed the task status from Open to Testing.Jul 9 2020, 7:07 AM
gniibe added a project: Restricted Project.