In builds for Fedora, the Fedora rpmbuild configs override a lot of options.
Here's a typical nfs-ganesha compile line: cd /builddir/build/BUILD/nfs-ganesha-2.5.1/src/Protocols/NFS && /usr/bin/cc -I/usr/include/glusterfs -I/usr/include/uuid -I/builddir/build/BUILD/nfs-ganesha-2.5.1/src/include -I/builddir/build/BUILD/nfs-ganesha-2.5.1/src/include/os/linux -I/include -I/usr/include/ntirpc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DNDEBUG -o CMakeFiles/nfs4callbacks.dir/nfs4_cb_Compound.c.o -c /builddir/build/BUILD/nfs-ganesha-2.5.1/src/Protocols/NFS/nfs4_cb_Compound.c You can see the complete build log at https://kojipkgs.fedoraproject.org//packages/nfs-ganesha/2.5.1/7.fc27/data/logs/x86_64/build.log Similarly on Ubuntu artful/17.10: cd /<<PKGBUILDDIR>>/src/obj-x86_64-linux-gnu/Protocols/NFS && /usr/bin/cc -I/usr/include/glusterfs -I/usr/include/uuid -I/<<PKGBUILDDIR>>/src/obj-x86_64-linux-gnu/include -I/<<PKGBUILDDIR>>/src/include -I/<<PKGBUILDDIR>>/src/include/os/linux -I/include -I/usr/include/ntirpc -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DNDEBUG -o CMakeFiles/nfs4callbacks.dir/nfs4_cb_Compound.c.o -c /<<PKGBUILDDIR>>/src/Protocols/NFS/nfs4_cb_Compound.c full log at https://launchpadlibrarian.net/330266420/buildlog_ubuntu-artful-amd64.nfs-ganesha_2.5.1-ubuntu1~artful1_BUILDING.txt.gz On 08/02/2017 08:45 AM, Daniel Gryniewicz wrote: > 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 -- Kaleb ------------------------------------------------------------------------------ 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