From nobody@FreeBSD.org  Sat Oct 19 08:14:14 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 02EC5BA0
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Oct 2013 08:14:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id C96BE2D5E
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Oct 2013 08:14:13 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9J8EDBR035230
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 19 Oct 2013 08:14:13 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9J8ED2J035202;
	Sat, 19 Oct 2013 08:14:13 GMT
	(envelope-from nobody)
Message-Id: <201310190814.r9J8ED2J035202@oldred.freebsd.org>
Date: Sat, 19 Oct 2013 08:14:13 GMT
From: Guillaume Bibaut <yom@iaelu.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: www/w3m does not compile with clang on 9.2-RELEASE
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183097
>Category:       ports
>Synopsis:       www/w3m does not compile with clang on 9.2-RELEASE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    nobutaka
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 19 08:20:01 UTC 2013
>Closed-Date:    Tue Oct 22 22:46:02 UTC 2013
>Last-Modified:  Tue Oct 22 23:20:00 UTC 2013
>Originator:     Guillaume Bibaut
>Release:        9.2-RELEASE
>Organization:
-
>Environment:
FreeBSD iaelu.net 9.2-RELEASE FreeBSD 9.2-RELEASE #0: Fri Sep 27 12:34:12 CEST 2013     root@iaelu.net:/usr/obj/usr/src/sys/IAELUNET  amd64
>Description:
This port does not compile on my system.
I just did a portsnap fetch update and while upgrading my installed ports I encountered this problem.
My system is set to compile everything with clang (since in 10.0 there will be only clang by default).
Also it does not work in a poudriere jail that has been configured to do the same.


=======================<phase: build          >============================
===>  Building for w3m-0.5.3_2
(echo '#define DEFUN(x,y,z) x y'; sed -ne '/^DEFUN/{p;n;/^[     ]/p;}' ./main.c ./menu.c) | clang-cpp - |  awk '$1 ~ /^[_A-Za-z]/ {  for (i=2;i<=NF;i++) { print $i, $1}  }' > funcname.tab.tmp
funcname.tab updated
sort funcname.tab | /usr/bin/awk -f ./funcname1.awk > funcname1.h
clang  -I. -I. -O2 -pipe -fno-strict-aliasing -I./libwc  -I/usr/include/openssl -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/local/libexec/w3m\"  -DCGIBIN_DIR=\"/usr/local/libexec/w3m/cgi-bin\" -DHELP_DIR=\"/usr/local/share/w3m\"  -DETC_DIR=\"/usr/local/etc\" -DCONF_DIR=\"/usr/local/etc/w3m\"  -DRC_DIR=\"~/.w3m\"  -DLOCALEDIR=\"/usr/local/share/locale\" -c main.c
main.c:836:23: error: assigning to 'GC_warn_proc' (aka 'void (*)(char *, GC_word)') from incompatible type 'void'
    orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
                      ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main.c:2264:37: warning: incompatible pointer types passing 'char **' to parameter of type 'wc_uchar **' (aka 'unsigned char **') [-Wincompatible-pointer-types]
    return wc_any_to_ucs(wtf_parse1(&p));
                                    ^~
./libwc/wtf.h:71:41: note: passing argument to parameter 'p' here
extern wc_wchar_t wtf_parse1(wc_uchar **p);
                                        ^
1 warning and 1 error generated.
*** [main.o] Error code 1

Stop in /wrkdirs/usr/ports/www/w3m/work/w3m-0.5.3.
*** [do-build] Error code 1

Stop in /usr/ports/www/w3m.
===>  Cleaning for w3m-0.5.3_2
build of /usr/ports/www/w3m ended at Sat Oct 19 10:05:06 CEST 2013
>How-To-Repeat:
set clang as the default compile in /etc/make.conf

CC=clang
CXX=clang++
CPP=clang-cpp
NO_WERROR=
WERROR=

try to compile www/w3m
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->nobutaka 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Oct 19 08:20:15 UTC 2013 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183097 

From: kaltheat@googlemail.com
To: bug-followup@FreeBSD.org
Cc: yom@iaelu.net
Subject: Re: ports/183097: www/w3m does not compile with clang on 9.2-RELEASE
Date: Sun, 20 Oct 2013 00:40:44 +0200

 Hi,
 
 I observe similiar issue on 9.2-RELEASE without clang.
 
 ...
 ===>  Building for w3m-0.5.3_2
 (echo '#define DEFUN(x,y,z) x y'; sed -ne '/^DEFUN/{p;n;/^[     ]/p;}' ./main.c ./menu.c) | cpp - |  awk '$1 ~ /^[_A-Za-z]/ {  for (i=2;i<=NF;i++) { print $i, $1}  }' > funcname.tab.tmp
 funcname.tab updated
 sort funcname.tab | /usr/bin/awk -f ./funcname1.awk > funcname1.h
 cc  -I. -I. -O2 -pipe -fno-strict-aliasing -I./libwc  -I/usr/include/openssl -I/usr/local/include -I/usr/local/include -DHAVE_CONFIG_H -DAUXBIN_DIR=\"/usr/local/libexec/w3m\"  -DCGIBIN_DIR=\"/usr/local/libexec/w3m/cgi-bin\" -DHELP_DIR=\"/usr/local/share/w3m\"  -DETC_DIR=\"/usr/local/etc\" -DCONF_DIR=\"/usr/local/etc/w3m\"  -DRC_DIR=\"~/.w3m\"  -DLOCALEDIR=\"/usr/local/share/locale\" -c main.c
 main.c: In function 'main':
 main.c:836: error: void value not ignored as it ought to be
 main.c: In function 'getChar':
 main.c:2264: warning: passing argument 1 of 'wtf_parse1' from incompatible pointer type
 *** [main.o] Error code 1
 
 Stop in /usr/ports/www/w3m/work/w3m-0.5.3.
 ...
 
 I'm using ports from svn head repo at revision 330856.
 
 Regards,
 kaltheat
 
 
 

From: kaltheat@googlemail.com
To: bug-followup@FreeBSD.org
Cc: yom@iaelu.net
Subject: Re: ports/183097: www/w3m does not compile with clang on 9.2-RELEASE
Date: Sun, 20 Oct 2013 12:10:50 +0200

 same problem in clean tinderbox environment, again without clang and with FreeBSD 9.2-RELEASE
 
 

From: Sean DuBois <sean@siobud.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/183097: www/w3m does not compile with clang on 9.2-RELEASE
Date: Tue, 22 Oct 2013 16:05:55 -0500

 --3V7upXqbjpZ4EhLz
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 Hi,
 
 I attached a patch that fixes the build
 
 I did not write the patch, I got it from here  http://sourceforge.net/p/w3m/patches/59/
 
 kaltheat and Guillaume Bibaut would you mind testing this as well so we
 can get this in as soon as possible? 
 
 
 --3V7upXqbjpZ4EhLz
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=mutt-patch
 
 Index: files/patch-main
 ===================================================================
 --- files/patch-main	(revision 0)
 +++ files/patch-main	(working copy)
 @@ -0,0 +1,13 @@
 +--- main.c.old	2007-05-31 06:49:50.000000000 +0530
 ++++ main.c	2010-02-16 16:16:24.000000000 +0530
 +@@ -842,7 +842,9 @@
 +     mySignal(SIGPIPE, SigPipe);
 + #endif
 + 
 +-    orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
 ++    orig_GC_warn_proc = GC_get_warn_proc();
 ++    GC_set_warn_proc(wrap_GC_warn_proc);
 ++
 +     err_msg = Strnew();
 +     if (load_argc == 0) {
 + 	/* no URL specified */
 
 Property changes on: files/patch-main
 ___________________________________________________________________
 Added: svn:mime-type
 ## -0,0 +1 ##
 +text/plain
 \ No newline at end of property
 Added: fbsd:nokeywords
 ## -0,0 +1 ##
 +yes
 \ No newline at end of property
 Added: svn:eol-style
 ## -0,0 +1 ##
 +native
 \ No newline at end of property
 
 --3V7upXqbjpZ4EhLz--
State-Changed-From-To: open->closed 
State-Changed-By: nobutaka 
State-Changed-When: Tue Oct 22 22:45:38 UTC 2013 
State-Changed-Why:  
Fixed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183097 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/183097: commit references a PR
Date: Tue, 22 Oct 2013 22:46:02 +0000 (UTC)

 Author: nobutaka
 Date: Tue Oct 22 22:45:00 2013
 New Revision: 331336
 URL: http://svnweb.freebsd.org/changeset/ports/331336
 
 Log:
   Fix build error.
   
   PR:	ports/183097, ports/183156
   Submitted by:	Guillaume Bibaut <yom@iaelu.net>, Oliver Fromme <oliver.fromme@secnetix.de>
 
 Added:
   head/www/w3m/files/patch-main.c   (contents, props changed)
 
 Added: head/www/w3m/files/patch-main.c
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/www/w3m/files/patch-main.c	Tue Oct 22 22:45:00 2013	(r331336)
 @@ -0,0 +1,13 @@
 +--- main.c.old	2007-05-31 06:49:50.000000000 +0530
 ++++ main.c	2010-02-16 16:16:24.000000000 +0530
 +@@ -842,7 +842,9 @@
 +     mySignal(SIGPIPE, SigPipe);
 + #endif
 + 
 +-    orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
 ++    orig_GC_warn_proc = GC_get_warn_proc();
 ++    GC_set_warn_proc(wrap_GC_warn_proc);
 ++
 +     err_msg = Strnew();
 +     if (load_argc == 0) {
 + 	/* no URL specified */
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 

From: kaltheat@googlemail.com
To: bug-followup@FreeBSD.org
Cc: sean@siobud.com, yom@iaelu.net
Subject: Re: ports/183097: www/w3m does not compile with clang on 9.2-RELEASE
Date: Wed, 23 Oct 2013 01:17:03 +0200

 Hi,
 
 Port compiles fine (in clean tinderbox-environment) with this patch.
 w3m seems to work.
 
 
>Unformatted:
