[Bug 242827] [Possible patch] net/samba410 with DEBUG options still builds with optimizations

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Dec 23 10:42:12 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242827

            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 at FreeBSD.org
          Reporter: ml at netfence.it
          Assignee: timur at FreeBSD.org
             Flags: maintainer-feedback?(timur at 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, making
it difficult to analyze core dumps.

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



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



With the above change, the logs not report:
ZEROCONF=none PERL_USE_UNSAFE_INC=1 OPENSSLBASE=/usr OPENSSLDIR=/etc/ssl
OPENSSLINC=/usr/include OPENSSLLIB=/usr/lib NOCOLOR=yes
WAF_LOG_FORMAT='%(c1)s%(zone)s%(c2)s %(message)s' RPCGEN_CPP="cpp"
XDG_DATA_HOME=/wrkdirs/usr/ports/net/samba410/work 
XDG_CONFIG_HOME=/wrkdirs/usr/ports/net/samba410/work 
HOME=/wrkdirs/usr/ports/net/samba410/work TMPDIR="/tmp"
PATH=/wrkdirs/usr/ports/net/samba410/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES
PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-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="cpp" CPPFLAGS="-DLIBICONV_PLUG -isystem
/usr/local/include"  LDFLAGS="  -fstack-protector-strong -L/usr/local/lib "
LIBS=""  CXX="c++" CXXFLAGS="-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 
-DLIBICONV_PLUG -isystem /usr/local/include "  MANPREFIX="/usr/local"
BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"
 BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644" 
BSD_INSTALL_MAN="install  -m 444"                                           

Notice: "-O2 ... -O0"

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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list