Date: Wed, 02 Nov 2016 12:38:52 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 214009] devel/git: build fails with DEVELOPER=yes Message-ID: <bug-214009-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214009 Bug ID: 214009 Summary: devel/git: build fails with DEVELOPER=3Dyes Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: garga@FreeBSD.org Reporter: z7dr6ut7gs@snkmail.com Flags: maintainer-feedback?(garga@FreeBSD.org) Assignee: garga@FreeBSD.org If you build devel/git with DEVELOPER=3Dyes, you will get a failure due to -Werror (added in work/git-2.10.1/Makefile when DEVELOPER=3Dyes). Here's a snippet from a build on 10-stable/amd64: cc -o t/helper/test-path-utils.o -c -MF t/helper/.depend/test-path-utils.o.d -MQ t/helper/test-path-utils.o -MMD -MP -isystem/usr/local/include -DLIBICONV_PLUG -O2 -pipe -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -Werror -Wdeclaration-after-statement -Wno-format-zero-length -Wold-style-definition -Woverflow -Wpointer-arith -Wstrict-prototypes -Wunused -Wvla -I. -I/usr/local/include -DUSE_LIBPCRE -I/usr/local/include -DUSE_CURL_FOR_IMAP_SEND -I/usr/local/include -DUSE_ST_TIMESPEC -pthread -DHAVE_PATHS_H -DHAVE_STRINGS_H -DGMTIME_UNRELIABLE_ERRORS -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DSHA1_HEADER=3D'<openssl/sha.h>'=20 -DFREAD_READS_DIRECTORIES -DDIR_HAS_BSD_GROUP_SEMANTICS -DSHELL_PATH=3D'"/bin/sh"' -DPAGER_ENV=3D'"LESS=3DFRX LV=3D-c MORE=3DFRX"'= =20 t/helper/test-path-utils.c t/helper/test-path-utils.c:254:39: error: incompatible pointer types passing 'char *(const char *)' to parameter of type 'char *(*)(char *)' [-Werror,-Wincompatible-pointer-types] return test_function(basename_data, basename, argv[1]); ^~~~~~~~ t/helper/test-path-utils.c:41:58: note: passing argument to parameter 'func' here static int test_function(struct test_data *data, char *(*func)(char *input), ^ t/helper/test-path-utils.c:257:38: error: incompatible pointer types passing 'char *(const char *)' to parameter of type 'char *(*)(char *)' [-Werror,-Wincompatible-pointer-types] return test_function(dirname_data, dirname, argv[1]); ^~~~~~~ t/helper/test-path-utils.c:41:58: note: passing argument to parameter 'func' here static int test_function(struct test_data *data, char *(*func)(char *input), ^ 2 errors generated. gmake[2]: *** [Makefile:1982: t/helper/test-path-utils.o] Error 1 Similar results on 9-stable (using default base gcc). git-2.10.1/Makefile has: ifdef DEVELOPER CFLAGS +=3D $(DEVELOPER_CFLAGS) endif The problem with test-path-utils.c is real - it expects basename(3) to be t= ake a 'char *' argument rather than 'const char *'. That's an upstream issue, although they would have to deal with linux having two different prototypes= for basename(3) (one with const, one without) depending on which prototype in system header files is pulled in (string.h vs libgen.h). This fixes it for the freebsd port: --- work/git-2.10.1/t/helper/test-path-utils.c.orig 2016-11-02 12:23:15.000000000 +0000 +++ work/git-2.10.1/t/helper/test-path-utils.c 2016-11-02 12:23:15.0000000= 00 +0000 @@ -38,7 +38,7 @@ const char *alternative; /* output: ... or this. */ }; -static int test_function(struct test_data *data, char *(*func)(char *input= ), +static int test_function(struct test_data *data, char *(*func)(const char *input), const char *funcname) { int failed =3D 0, i; Alternately you could comment out the DEVELOPER_CFLAGS definition in the git-2.10.1/Makefile or something similar: @@ -968,7 +969,7 @@ -include config.mak ifdef DEVELOPER -CFLAGS +=3D $(XXX_DONT_USE_DEVELOPER_CFLAGS) +CFLAGS +=3D $(DEVELOPER_CFLAGS) endif ifndef sysconfdir Or try to avoid passing DEVELOPER down into the port build (e.g., undefine = it). --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214009-13>