'Math/SpecFuncMathMore.h' file not found

Hi,

I am trying to compile some code that uses ROOT::Math::sph_legendre functions.

Inside the script I place:
#include “Math/SpecFuncMathMore.h”

I then try to compile using:
g++ -pthread -stdlib=libc++ -std=c++11 -m64 -I/Users/espen/ROOT/root-6.06.00/include -L/Users/espen/ROOT/root-6.06.00/lib -lGui -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -lpthread -Wl,-rpath,/Users/espen/ROOT/root-6.06.00/lib -stdlib=libc++ -lm -ldl -lRooFitCore -lMathMore -I…/include -I/usr/include/python2.7 src/calc_mom.cpp -shared -lpython -lboost_python -o obj/lib_calc_mom.so

This gives me the following error:
src/calc_mom.cpp:22:10: fatal error: ‘Math/SpecFuncMathMore.h’ file not found
#include “Math/SpecFuncMathMore.h”
^
1 error generated.
make: *** [src/calc_mom] Error 1

Does anyone know what is going wrong?

Thanks,
Espen

Run:
root-config --features
and see if you have “mathmore” among reported features, or run:
root-config --has-mathmore
and see if you get “yes”.
If you do not have “mathmore”, you need to build your ROOT from scratch again and make sure that it’s enabled.

[quote=“Pepe Le Pew”]Run:
root-config --features
and see if you have “mathmore” among reported features, or run:
root-config --has-mathmore
and see if you get “yes”.
If you do not have “mathmore”, you need to build your ROOT from scratch again and make sure that it’s enabled.[/quote]

Hi Pepe,

Thanks, root-config --has-mathmore returns no. How do I configure this to be added? I normally do:
./configure macosx64 --all

Thanks,
Espen

First, you seem to use ROOT 6 and in this case you should stop using “configure” as it may misbehave -> start to use “cmake”, for example something like (note that your “build” subdirectory must be different from your “source” subdirectory):
cmake -Dall=ON -Dsoversion=ON /Source/Code/Directory > cmake.out.txt 2>&1
After this step check in the “cmake.out.txt” file the line which begins with “-- Enabled support for:” and see if you have “mathmore” there.
Note that “mathmore” requires GSL version >= 1.10.

Dear Pepe_Le_Pew,
I need to enable the “Mathmore” package in ROOT. I am using the ROOT version 6.12. Following your post (dated 16 Jan) I did whatever you suggested i.e.
cmake -Dall=“ON” -Dsoversion=“ON” /Source/Code/Directory > cmake.out.txt 2>&1

When I checked the “cmake.out.txt” I found the following where there is no mention of “mathmore” package.

– Enabled support for: asimage astiff builtin_afterimage builtin_ftgl builtin_gl2ps builtin_glew builtin_llvm builtin_lz4 builtin_tbb builtin_unuran cling cxx11 exceptions explicitlink gdml genvector http imt opengl pch python roofit shared soversion ssl thread tmva x11 xft

Please suggest how to enable “mathmore” package in ROOT.

With Kind Regards
Kalyan

Most probably, your operating system is missing the “libgsl-dev” or the “gsl-devel” package (depending on the operating system flavor).

You may also try to use the -Dbuiltin_gsl=ON cmake option (though I prefer to use GSL libraries provided by the operating system).

Note: ROOT 6.12 is quite old.