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.
I've been using -DCMAKE_C_FLAGS="-O0 -g -gdwarf-4"
There's something in our standard cmake that is already setting -Werror.
I also have -DCMAKE_BUILD_TYPE=Maintainer
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
And Ganesha gives these warnings (note saitizer_add_flags [sic]):
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target log because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
log/CMakeLists.txt:26 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target config_parsing because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
config_parsing/CMakeLists.txt:35 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target verif_syntax because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
config_parsing/CMakeLists.txt:45 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target test_parsing because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
config_parsing/CMakeLists.txt:57 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target cidr because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
cidr/CMakeLists.txt:19 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target avltree because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
avl/CMakeLists.txt:12 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target hashtable because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
hashtable/CMakeLists.txt:8 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target sal because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
SAL/CMakeLists.txt:35 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target rpcal because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
RPCAL/CMakeLists.txt:13 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target nfsproto because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
Protocols/NFS/CMakeLists.txt:99 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target nfs4callbacks because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
Protocols/NFS/CMakeLists.txt:106 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target nfs_mnt_xdr because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
Protocols/XDR/CMakeLists.txt:14 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target nlm because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
Protocols/NLM/CMakeLists.txt:20 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target sm_notify.ganesha because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
Protocols/NLM/CMakeLists.txt:30 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target rquota because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
Protocols/RQUOTA/CMakeLists.txt:14 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target 9p because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
Protocols/9P/CMakeLists.txt:41 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target string_utils because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
support/CMakeLists.txt:16 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target hash because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
support/CMakeLists.txt:26 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target uid2grp because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
support/CMakeLists.txt:35 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target netgroup_cache because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
support/CMakeLists.txt:42 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target support because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
support/CMakeLists.txt:78 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target gos because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
os/CMakeLists.txt:21 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsalnull because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/Stackable_FSALs/FSAL_NULL/CMakeLists.txt:20 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsalmdcache because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/Stackable_FSALs/FSAL_MDCACHE/CMakeLists.txt:36 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsalpseudo because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/FSAL_PSEUDO/CMakeLists.txt:18 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsalproxy because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/FSAL_PROXY/CMakeLists.txt:24 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsalgpfs because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/FSAL_GPFS/CMakeLists.txt:28 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsal_os because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/FSAL_VFS/os/CMakeLists.txt:17 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsalvfs because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/FSAL_VFS/vfs/CMakeLists.txt:23 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target fsalmem because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
FSAL/FSAL_MEM/CMakeLists.txt:19 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target idmap because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
idmapper/CMakeLists.txt:15 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target MainServices because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
MainNFSD/CMakeLists.txt:64 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target FsalCore because there is no sanitizer
available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
MainNFSD/CMakeLists.txt:84 (add_sanitizers)
CMake Warning at cmake/modules/sanitize-helpers.cmake:161 (message):
AddressSanitizer disabled for target ganesha.nfsd because there is no
sanitizer available for target sources.
Call Stack (most recent call first):
cmake/modules/FindASan.cmake:58 (saitizer_add_flags)
cmake/modules/FindSanitizers.cmake:57 (add_sanitize_address)
MainNFSD/CMakeLists.txt:96 (add_sanitizers)
------------------------------------------------------------------------------
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