https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191354
Bug ID: 191354 Summary: tools/regression/lib/libc/regex fails to link after xlocale changes done in 10.x+ Product: Base System Version: 10.0-STABLE Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: yaneurab...@gmail.com The lib/libc/regex/grot code is used by tools/regression/lib/libc/regex. Unfortunately the changes made for xlocale in 10.x broke them so they won't link anymore. I tried to make it work, but it required a bit more than 30 minutes to work through the issues. % uname -a FreeBSD freebsd-10-x64.localdomain 10.0-STABLE FreeBSD 10.0-STABLE #0 7905925(stable/10): Wed Jun 11 14:10:17 PDT 2014 root@freebsd-x86.localdomain:/usr/obj/usr/src/sys/GENERIC-WITHOUT-WITNESS amd64 % cd tools/regression/lib/libc/regex % make cd ../../../../../lib/libc/regex/grot; make && echo "PASS regex" sh mkh -i _REGEX_H_ ../regex2.h ../reg*.c >regex.tmp cmp -s regex.tmp regex.h 2>/dev/null || cp regex.tmp regex.h rm -f regex.tmp sh mkh -p /usr/src/lib/libc/regex/grot/../regcomp.c >regcomp.ih cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include -c /usr/src/lib/libc/regex/grot/../regcomp.c In file included from /usr/src/lib/libc/regex/grot/../regcomp.c:58: In file included from /usr/src/lib/libc/regex/grot/../../locale/collate.h:41: /usr/src/lib/libc/regex/grot/../../locale/xlocale_private.h:147:18: warning: passing 'long *' to parameter of type 'volatile u_long *' (aka 'volatile unsigned long *') converts between pointers to integer types with different sign [-Wpointer-sign] atomic_add_long(&(obj->retain_count), 1); ^~~~~~~~~~~~~~~~~~~~ /usr/include/machine/atomic.h:315:1: note: passing argument to parameter 'p' here ATOMIC_ASM(add, long, "addq %1,%0", "ir", v); ^ /usr/include/machine/atomic.h:112:43: note: expanded from macro 'ATOMIC_ASM' atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ ^ In file included from /usr/src/lib/libc/regex/grot/../regcomp.c:58: In file included from /usr/src/lib/libc/regex/grot/../../locale/collate.h:41: /usr/src/lib/libc/regex/grot/../../locale/xlocale_private.h:158:36: warning: passing 'long *' to parameter of type 'volatile u_long *' (aka 'volatile unsigned long *') converts between pointers to integer types with different sign [-Wpointer-sign] long count = atomic_fetchadd_long(&(obj->retain_count), -1) - 1; ^~~~~~~~~~~~~~~~~~~~ /usr/include/machine/atomic.h:197:39: note: passing argument to parameter 'p' here atomic_fetchadd_long(volatile u_long *p, u_long v) ^ 2 warnings generated. sh mkh -p /usr/src/lib/libc/regex/grot/../engine.c >engine.ih cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include -c /usr/src/lib/libc/regex/grot/../regexec.c sh mkh -p /usr/src/lib/libc/regex/grot/../regerror.c >regerror.ih cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include -c /usr/src/lib/libc/regex/grot/../regerror.c cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include -c /usr/src/lib/libc/regex/grot/../regfree.c sh mkh -p debug.c >debug.ih cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include -c debug.c debug.c:189:27: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] fprintf(d, "!%d(%d)!", OP(*s), opnd); ~~ ^~~~~~ %lu /usr/src/lib/libc/regex/grot/../regex2.h:80:15: note: expanded from macro 'OP' #define OP(n) ((n)&OPRMASK) ^~~~~~~~~~~~~ debug.c:189:35: warning: format specifies type 'int' but the argument has type 'sop' (aka 'unsigned long') [-Wformat] fprintf(d, "!%d(%d)!", OP(*s), opnd); ~~ ^~~~ %lu 2 warnings generated. sh mkh -p main.c >main.ih cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include -c main.c main.c:29:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] main(argc, argv) ^~~~ main.c:47:14: warning: implicit declaration of function 'getopt' is invalid in C99 [-Wimplicit-function-declaration] while ((c = getopt(argc, argv, "c:e:S:E:x")) != -1) ^ main.c:56:25: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] startoff = (regoff_t)atoi(optarg); ^ main.c:72:3: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' exit(2); ^ main.c:72:3: note: please include the header <stdlib.h> or explicitly provide a declaration for 'exit' main.c:84:17: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] eprint(err), len, sizeof(erbuf), erbuf); ^~~ main.c:84:22: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] eprint(err), len, sizeof(erbuf), erbuf); ^~~~~~~~~~~~~ main.c:102:17: warning: format specifies type 'int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat] eprint(err), len, sizeof(erbuf), erbuf); ^~~ main.c:102:22: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] eprint(err), len, sizeof(erbuf), erbuf); ^~~~~~~~~~~~~ main.c:109:22: warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat] printf("match `%.*s'\n", len, ~~^~ ~~~ main.c:238:6: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] sizeof(erbuf), erbuf); ^~~~~~~~~~~~~ main.c:269:6: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] sizeof(erbuf), erbuf); ^~~~~~~~~~~~~ 11 warnings generated. cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include -c split.c cc -O2 -pipe -DPOSIX_MISTAKE -DREDEBUG -I/usr/src/lib/libc/regex/grot/.. -I/usr/src/lib/libc/regex/grot/../../locale -I/usr/src/lib/libc/regex/grot/../../../../include regcomp.o regexec.o regerror.o regfree.o debug.o main.o split.o -o re regcomp.o: In function `p_bracket': /usr/src/lib/libc/regex/grot/../regcomp.c:(.text+0x3752): undefined reference to `__has_thread_locale' /usr/src/lib/libc/regex/grot/../regcomp.c:(.text+0x3758): undefined reference to `__xlocale_global_locale' /usr/src/lib/libc/regex/grot/../regcomp.c:(.text+0x376a): undefined reference to `__thread_locale' /usr/src/lib/libc/regex/grot/../regcomp.c:(.text+0x3779): undefined reference to `__xlocale_global_locale' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 Stop. make[1]: stopped in /usr/src/lib/libc/regex/grot *** Error code 1 Stop. make: stopped in /usr/src/tools/regression/lib/libc/regex -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"