Hi, I’m trying to compile a fixed-location ROOT, linking against a modified version of GSL also living in a specific directory. I’ve got the ROOT source using git, I’ve checked out v5.34.18.

The modifications to GSL add an interpolation type, so I’ve also modified the ROOT source in Math/InterpolationTypes.h and GSLInterpolator.cxx to add references to my new interpolation type. Here is the total diff for the git checkout:

```
diff --git a/math/mathmore/inc/Math/InterpolationTypes.h b/math/mathmore/inc/Math/InterpolationTypes.h
index a633504..ee20f0f 100644
--- a/math/mathmore/inc/Math/InterpolationTypes.h
+++ b/math/mathmore/inc/Math/InterpolationTypes.h
@@ -50,6 +50,7 @@ namespace Math {
<li>CSPLINE_PERIODIC cubic spline with periodic boundary conditions;
<li>AKIMA, Akima spline with natural boundary conditions ( requires a minimum of 5 points);
<li>AKIMA_PERIODIC, Akima spline with periodic boundaries ( requires a minimum of 5 points);
+ <li>STEFFEN, Steffen monotonic interpolator ( requires a minimum of 3 points);
</ul>
@@ -62,7 +63,8 @@ namespace Math {
kCSPLINE,
kCSPLINE_PERIODIC,
kAKIMA,
- kAKIMA_PERIODIC
+ kAKIMA_PERIODIC,
+ KSTEFFEN
};
}
diff --git a/math/mathmore/src/GSLInterpolator.cxx b/math/mathmore/src/GSLInterpolator.cxx
index 1f5c3a1..9620bd2 100644
--- a/math/mathmore/src/GSLInterpolator.cxx
+++ b/math/mathmore/src/GSLInterpolator.cxx
@@ -63,9 +63,12 @@ GSLInterpolator::GSLInterpolator (unsigned int size, Interpolation::Type type) :
case ROOT::Math::Interpolation::kAKIMA :
fInterpType = gsl_interp_akima;
break ;
- case ROOT::Math::Interpolation::kAKIMA_PERIODIC :
- fInterpType = gsl_interp_akima_periodic;
- break ;
+ case ROOT::Math::Interpolation::kAKIMA_PERIODIC :
+ fInterpType = gsl_interp_akima_periodic;
+ break ;
+ case ROOT::Math::Interpolation::kSTEFFEN :
+ fInterpType = gsl_interp_steffen;
+ break;
default :
// cspline
fInterpType = gsl_interp_cspline;
```

My ./configure command is as follows:

```
./configure --prefix=/Users/jfcaron/Software/custom_root/compiled --etcdir=/Users/jfcaron/Software/custom_root/compiled/etc --with-gsl-incdir=/Users/jfcaron/Projects/GSL/compiled/include --with-gsl-libdir=/Users/jfcaron/Projects/GSL/compiled/lib --with-f77=/opt/local/bin/gfortran-mp-4.8
make -j8
make install
```

the official log is attached.

I can compile ROOT without errors (just warnings). I can run ROOT itself and do basic tests in CINT. Unfortunately when I try to use my GSL modifications, my added interpolation type is not found:

```
jfcaron@dhcp-128-189-72-21:~/Software/custom_root/compiled$ ./bin/root
ROOT 5.34/18 (v5-34-18@v5-34-18, Mar 14 2014, 16:29:50 on macosx64)
* ROOT v5.34/18 *
root [0] #include "Math/Interpolator.h"
root [1] ROOT::Math::Interpolation::
Type
kLINEAR
kPOLYNOMIAL
kCSPLINE
kCSPLINE_PERIODIC
kAKIMA
kAKIMA_PERIODIC
root [1] ROOT::Math::Interpolation::kSTEFFEN
Error: Symbol kSTEFFEN is not defined in current scope (tmpfile):1:
*** Interpreter error recovered ***
```

The same problem occurs when I try to compile a macro that would use my new interpolation type kSTEFFEN. I can confirm that the root binary that I am using for these tests is the one that I compiled myself, but I’m not 100% sure which file is found when I #include “Math/Interpolator.h”. I do have a standard ROOT 5.34.18 installed from MacPorts at /opt/local, so maybe it’s including the header from that installation?

I would appreciate any help in figuring out the problem.

By the way, I am running root directly with ./bin/root. If I do “source bin/thisroot.sh”, then try to run root, the splash screen says it’s ROOT 5.99 and immediately seg faults. The same thing happens if I run ./bin/root after doing “source bin/thisroot.sh”. Is thisroot.sh broken?

Jean-François

config.log.txt (183 KB)