Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2002 20:11:41 +0100 (CET)
From:      Markus Wennrich <nick@schoko.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/34419: www/w3m port coredumps if compiled WITHOUT -O2
Message-ID:  <200201291911.g0TJBfu63881@yori.schoko.org>

next in thread | raw e-mail | index | archive | help

>Number:         34419
>Category:       ports
>Synopsis:       www/w3m port coredumps if compiled WITHOUT -O2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 29 11:20:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Markus Wennrich
>Release:        FreeBSD 4.5-RC i386
>Organization:
>Environment:
System: FreeBSD yori.schoko.org 4.5-RC FreeBSD 4.5-RC #5: Sun Jan 13 19:16:11 CET 2002 root@yori.schoko.org:/usr/src/sys/compile/SCHOKO i386


>Description:
www/w3m port coredumps on several machines here and at my friends' machines.
If you add manually a "-O2" to the CFLAGS (/usr/ports/www/w3m/work/w3m-0.2.4/XMakefile (line 31) and compile then, it works fine.
(Additionally my CFLAGS are empty, i.e. to add "-O2" to the CFLAGS in /etc/default/make.conf doesn't help ... which doesn't seem well, too)
>How-To-Repeat:
yori:/usr/ports/www/w3m#make
[...]
cc  -I/usr/include/openssl -I/usr/include  -I/usr/local/include -I/usr/local/include  -I/usr/include/openssl -I/usr/include -I. -c main.c 
[...]
yori:/usr/ports/www/w3m#./work/w3m-0.2.4/w3m -version
zsh: segmentation fault (core dumped)  ./work/w3m-0.2.4/w3m -version

>Fix:

Well ... one fix would be, to add "-cflags=-O2" to the configure args:

--- Makefile Thu Jan 24 23:12:43 2002
+++ /usr/ports/www/w3m/Makefile Tue Jan 29 20:07:34 2002
@@ -27,7 +27,8 @@
                        --helpdir=${PREFIX}/share/doc/w3m \
                        --helpdir-ja=${PREFIX}/share/doc/ja/w3m \
                        --gc-includedir=${LOCALBASE}/include \
-                       --gc-libdir=${LOCALBASE}/lib
+                       --gc-libdir=${LOCALBASE}/lib \
+                       -cflags=-O2
 HOSTNAME!=     /bin/hostname
 SCRIPTS_ENV=   HOSTNAME=${HOSTNAME} WRKSRC=${WRKSRC} PREFIX=${PREFIX} \
                CC=${CC} LOCALBASE=${LOCALBASE} JAPANESE=${JAPANESE} \

The real fix would of course be, to fix the code, so that it compiles correctly without "-O2", as "-O2" is known to produce bad code normally.


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201291911.g0TJBfu63881>