From owner-freebsd-ports-bugs@freebsd.org Wed Nov 2 12:38:53 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2899BC29DF9 for ; Wed, 2 Nov 2016 12:38:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9E6D104A for ; Wed, 2 Nov 2016 12:38:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id uA2Ccq1p080001 for ; Wed, 2 Nov 2016 12:38:52 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 214009] devel/git: build fails with DEVELOPER=yes Date: Wed, 02 Nov 2016 12:38:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: z7dr6ut7gs@snkmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: garga@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 12:38:53 -0000 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''=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.=