Problem to use a compiled library in a root script

I am trying to use a library to improve and simplify root graphics. For the moment I am doing the following program for testing.

  1 R__ADD_INCLUDE_PATH(/afs/cern.ch/user/l/ltarbour/PlottingHelper)
  2 #include "TCanvas.h"
  3 #include "TH1D.h"
  4 #include "TString.h"
  5 #include "plottingHelper.h"
  6 
  7 R__LOAD_LIBRARY(libPlottingHelper.so)
  8 
  9 namespace ph=PlottingHelper;
 10 using namespace std;
 11 
 12 void plot_TriggerCurves(std::string filename="2017H.root")
 13 {
 14     TFile *f = new TFile(filename.c_str());
 15 
 16     vector<double> x_edges{.2,1,.1,1,.1,1,.1,1,.1,1,.2};
 17     vector<double> y_edges{.2,2,.1,1,.2};
 18 
 19     TCanvas *c1 = new TCanvas();
 20     ph::DivideTransparent(x_edges, y_edges, true);
 21 }

And I am stuck with the following error message :

/afs/cern.ch/user/l/ltarbour/PlottingHelper/libPlottingHelper.so:1:585: error: source file is not valid UTF-8

I am executing this macro with root -l plot_TriggerCurves.C
I uploaded the code of the library on the following git repository: GitHub - zleba/PlottingHelper: Plotting utilities to make plotting in ROOT a bit easier
I compiled the it with makeand the standard provided make file (I can provide the makefile if needed).

Where could this error come from? Should I force the encoding to be UTF-8, and how?

To be more specific I have the following questions:

  1. I am using the environment CMSSW_12_2_0 and the compiling architecture slc7_amd64_gcc900. I do not think that the library I am using was contracted in this context so could be the cause of the problem ?
  2. What is the minimal content of a root make file? Is there a tutorial or root documentation for that? I would like to understand the different ways that root uses to compile a library, and how do write this in a make file. (I would like to check that the make file I have is OK, maybe simplify it)

Thank you in advance for any advice or information about the way ROOT works. Do not hesitate to ask for further information.

Best regards,
Leo

I would suggest you contact the author of this utility directly.