On 08/02/2017 04:46 AM, William Allen Simpson wrote:
On 8/1/17 1:14 PM, Daniel Gryniewicz wrote:
On 08/01/2017 12:49 PM, Daniel Gryniewicz wrote:
On the call, it was requested that I start a thread listing compile options that I use, so others can chime in, allowing everyone to learn from each other.

Here's my standard list:

CFLAGS=-O0 -g -gdwarf-2 -Werror

cmake options:

-DUSE_LTTNG=ON
     This allows using lttng to get tracepoints from Ganesha.  It
     allows high speed tracing, so that debug-like information can
     can be extracted even during stress tests.  It requires explicit
     tracepoints added to the code.  Currently, MDCACHE has many
     tracepoints, SAL, NFSv4, and FSAL_MEM have a few.  It requires
     external tools to use.

-DSANITIZE_ADDRESS=ON
     This turns on the built-in address sanitizer in GCC/Clang.  It
     enables much of the functionality of valgrind (use-after-free,
     buffer overrun, leak checking) with a much much lower overhead.
     It does not require any external tools; reports are printed to
     STDOUT at the end of the run.  It can be used in conjunction
     with gdb.

-DUSE_DBUS=ON
     Enables run-time configuration of Ganesha via DBUS.



I forgot to include:

-DUSE_MAN_PAGE=ON
     Enable building manpages

Do you recommend always having LTTNG, DBUS, and MAN_PAGE, just to test
that they compile properly?  When I tried them, my cmake fails for
various missing libraries.

You should have MAN_PAGE on if you're making any changes to man pages. Otherwise, it's optional. DBUS is optional, but most deployments ship with it on, so it's nice to make sure it's not broken. LTTNG only needs to be on if you use it for debugging. I do, frequently, for MDCACHE, so I always have it on.


I've been using -DCMAKE_C_FLAGS="-O0 -g -gdwarf-4"

There's something in our standard cmake that is already setting -Werror.

Correct. CMake adds it for non-release builds. I just always have it in my environment, since it has not, in the past, been universally on.

I also have -DCMAKE_BUILD_TYPE=Maintainer

I have this also; I just assumed everyone had it already.

And of course, -DUSE_RPC_RDMA=ON so that I'm sure RDMA compiles, but run
all my tests with =OFF (as it isn't working at the moment).

I use -DUSE_SYSTEM_NTIRPC=ON to build ntirpc separately.  I've also got a
separate script with =OFF to test building the submodule, but rarely run it.

These don't work in the ntirpc cmake:
CMake Warning:
   Manually-specified variables were not used by the project:

     SANITIZE_ADDRESS
     USE_DBUS
     USE_MAN_PAGE

I will add SANITIZE_ADDRESS to ntirpc.

And Ganesha gives these warnings (note saitizer_add_flags [sic]):

You will need libasan installed. Sorry, I forgot about that, it's been on my system for so long.

Daniel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to