Was RootFinderAlgorithms.h dropped after 6.04?


ROOT Version: > 6.04
Platform: Any
Compiler: N/A


We have adopted ROOT::Math in oder to do root-finding on a complicated function in our simulation code. The author made use of

#include "Math/RootFinderAlgorithms.h"

for this purpose. This works fine in ROOT 5.34/32, 6.02/12, 6.04/10. But when tried building against 6.08/06, and again against 6.12/06, it fails because that header file doesn’t exist.
I don’t see any mention in the release notes that this was removed. Do I need to do some non-default build action in order to recover this file? If it was removed, why wasn’t the fact documented in the release notes?

Should the various examples and documentation be updated to indicate that this file is no longer available?

Hm… The file still exists and is basically unchanged since 5.34:

~/src/root/root-head(master|…) % git diff -w v5-34-22 v6-04-10 ./math/mathmore/inc/Math/RootFinderAlgorithms.h
~/src/root/root-head(master|…) % git diff -w v5-34-22 v6-08-06 ./math/mathmore/inc/Math/RootFinderAlgorithms.h
~/src/root/root-head(master|…) % git diff -w v5-34-22 master ./math/mathmore/inc/Math/RootFinderAlgorithms.h  
diff --git a/math/mathmore/inc/Math/RootFinderAlgorithms.h b/math/mathmore/inc/Math/RootFinderAlgorithms.h
index e399408..c71d21a 100644
--- a/math/mathmore/inc/Math/RootFinderAlgorithms.h
+++ b/math/mathmore/inc/Math/RootFinderAlgorithms.h
@@ -32,13 +32,9 @@
 #define ROOT_Math_GSLRootFinderAlgorithms
 
 
-#ifndef ROOT_Math_GSLRootFinder
 #include "Math/GSLRootFinder.h"
-#endif
 
-#ifndef ROOT_Math_GSLRootFinderDeriv
 #include "Math/GSLRootFinderDeriv.h"
-#endif
 
 namespace ROOT {
 namespace Math {

So the problem can only be caused by changes in the build system. Can you check whether your ROOT was built with mathmore=ON? (run grep mathmore build/CMakeCache.txt)

If not, switch it to ON when running cmake. See https://root.cern.ch/building-root#options
Since ON is the default, the reason is probably the missing GSL. Check your cmake output, especially look for:

-- Looking for GSL
-- FindGSL: gsl-config not found.
-- GSL not found. Set variable GSL_DIR to point to your GSL installation
--                Alternatively, you can also enable the option 'builtin_gsl' to build the GSL libraries internally'
--                For the time being switching OFF 'mathmore' option

So in order to compile mathmore, you need GSL. So switch builtin_gsl to on:

cmake -Dbuiltin_gsl=on /path/to/src

The output should then conain:

-- Looking for GSL
-- Downloading and building GSL version 2.1
(...)
-- Enabled support for:  (...) builtin_gsl (...) mathmore (...)

Thank you! I was able to rebuild 6.12-06 that way; for some reason, 6.08-06 isn’t building for me on my Mac :frowning:

What confused me was that the “File Index” sections of the ROOT documentation area were also missing the file, which made me think it had been withdrawn entirely.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.