Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Dec 2019 10:42:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 242827] [Possible patch] net/samba410 with DEBUG options still builds with optimizations
Message-ID:  <bug-242827-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242827

            Bug ID: 242827
           Summary: [Possible patch] net/samba410 with DEBUG options still
                    builds with optimizations
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: timur@FreeBSD.org
          Reporter: ml@netfence.it
          Assignee: timur@FreeBSD.org
             Flags: maintainer-feedback?(timur@FreeBSD.org)

I'm trying to debug a problem where smbd crashes, so I built the port (in
Poudriere) with DEBUG option enabled.
While debugging symbols are now there, the code is still built with -O2, ma=
king
it difficult to analyze core dumps.

Some extract of the build log (notice CFLAGS=3D"-O2..."):
ZEROCONF=3Dnone PERL_USE_UNSAFE_INC=3D1 OPENSSLBASE=3D/usr OPENSSLDIR=3D/et=
c/ssl
OPENSSLINC=3D/usr/include OPENSSLLIB=3D/usr/lib NOCOLOR=3Dyes
WAF_LOG_FORMAT=3D'%(c1)s%(zone)s%(c2)s %(message)s' RPCGEN_CPP=3D"cpp"
XDG_DATA_HOME=3D/wrkdirs/usr/ports/net/samba410/work=20
XDG_CONFIG_HOME=3D/wrkdirs/usr/ports/net/samba410/work=20
HOME=3D/wrkdirs/usr/ports/net/samba410/work TMPDIR=3D"/tmp"
PATH=3D/wrkdirs/usr/ports/net/samba410/work/.bin:/sbin:/bin:/usr/sbin:/usr/=
bin:/usr/local/sbin:/usr/local/bin:/root/bin
NO_PIE=3Dyes MK_DEBUG_FILES=3Dno MK_KERNEL_SYMBOLS=3Dno SHELL=3D/bin/sh NO_=
LINT=3DYES
PREFIX=3D/usr/local  LOCALBASE=3D/usr/local  CC=3D"cc" CFLAGS=3D"-O2 -pipe=
=20
-DLIBICONV_PLUG -fno-color-diagnostics -fstack-protector-strong
-DLDAP_DEPRECATED -isystem /usr/local/include -fno-strict-aliasing
-fno-omit-frame-pointer"  CPP=3D"cpp" CPPFLAGS=3D"-DLIBICONV_PLUG -isystem
/usr/local/include"  LDFLAGS=3D"  -fstack-protector-strong -L/usr/local/lib=
 "
LIBS=3D""  CXX=3D"c++" CXXFLAGS=3D"-O2 -pipe -DLIBICONV_PLUG -fno-color-dia=
gnostics
-fstack-protector-strong -DLDAP_DEPRECATED -isystem /usr/local/include
-fno-strict-aliasing -fno-omit-frame-pointer  -DLIBICONV_PLUG -isystem
/usr/local/include "  MANPREFIX=3D"/usr/local" BSD_INSTALL_PROGRAM=3D"insta=
ll   -m
555"  BSD_INSTALL_LIB=3D"install   -m 0644"  BSD_INSTALL_SCRIPT=3D"install =
 -m 555"
 BSD_INSTALL_DATA=3D"install  -m 0644"  BSD_INSTALL_MAN=3D"install  -m 444"=
=20=20=20



There's the following line in the Makefile:
DEBUG_FLAGS=3D                    -g -ggdb3 -O0
I guess it should be:
DEBUG_CFLAGS=3D                   -g -ggdb3 -O0=20=20=20



With the above change, the logs not report:
ZEROCONF=3Dnone PERL_USE_UNSAFE_INC=3D1 OPENSSLBASE=3D/usr OPENSSLDIR=3D/et=
c/ssl
OPENSSLINC=3D/usr/include OPENSSLLIB=3D/usr/lib NOCOLOR=3Dyes
WAF_LOG_FORMAT=3D'%(c1)s%(zone)s%(c2)s %(message)s' RPCGEN_CPP=3D"cpp"
XDG_DATA_HOME=3D/wrkdirs/usr/ports/net/samba410/work=20
XDG_CONFIG_HOME=3D/wrkdirs/usr/ports/net/samba410/work=20
HOME=3D/wrkdirs/usr/ports/net/samba410/work TMPDIR=3D"/tmp"
PATH=3D/wrkdirs/usr/ports/net/samba410/work/.bin:/sbin:/bin:/usr/sbin:/usr/=
bin:/usr/local/sbin:/usr/local/bin:/root/bin
NO_PIE=3Dyes MK_DEBUG_FILES=3Dno MK_KERNEL_SYMBOLS=3Dno SHELL=3D/bin/sh NO_=
LINT=3DYES
PREFIX=3D/usr/local  LOCALBASE=3D/usr/local  CC=3D"cc" CFLAGS=3D"-O2 -pipe =
 -g -ggdb3
-O0 -DLIBICONV_PLUG -fno-color-diagnostics -fstack-protector-strong
-DLDAP_DEPRECATED -isystem /usr/local/include -fno-strict-aliasing
-fno-omit-frame-pointer"  CPP=3D"cpp" CPPFLAGS=3D"-DLIBICONV_PLUG -isystem
/usr/local/include"  LDFLAGS=3D"  -fstack-protector-strong -L/usr/local/lib=
 "
LIBS=3D""  CXX=3D"c++" CXXFLAGS=3D"-O2 -pipe -g -ggdb3 -O0 -DLIBICONV_PLUG
-fno-color-diagnostics -fstack-protector-strong -DLDAP_DEPRECATED -isystem
/usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer=20
-DLIBICONV_PLUG -isystem /usr/local/include "  MANPREFIX=3D"/usr/local"
BSD_INSTALL_PROGRAM=3D"install  -s -m 555"  BSD_INSTALL_LIB=3D"install  -s =
-m 0644"
 BSD_INSTALL_SCRIPT=3D"install  -m 555"  BSD_INSTALL_DATA=3D"install  -m 06=
44"=20
BSD_INSTALL_MAN=3D"install  -m 444"=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20

Notice: "-O2 ... -O0"

I still have to verify if -O0 takes precedence over -O2.

--=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-242827-7788>