"C system headers must be installed" error with VSCode Jupyter, breaks only in 6.32

Dear ROOT experts,

I noticed this issue after upgrading to v6.32.02 from 6.30. I am running JupyROOT in the vscode Jupyter server. Weirdly, if I serve a jupyterlab, or just pure pyROOT, the error does not show. Root functions okay despite these errors.

Here are the errors:

import ROOT

out:
C system headers (glibc/Xcode/Windows SDK) must be installed.
In file included from input_line_4:36:
/home/qidong/micromamba/envs/work/bin/../lib/gcc/x86_64-conda-linux-gnu/12.4.0/include/c++/cassert:44:10: fatal error: 'assert.h' file not found
#include <assert.h>
         ^~~~~~~~~~
input_line_35:1:10: fatal error: 'dlfcn.h' file not found
#include "dlfcn.h"
         ^~~~~~~~~

However, this issue does render gInterpreter.Declare('#include "custom.h"') returning false, complaining about c headers, which means I was not able to declare custom cpp functions. Here is an example:

ROOT.gInterpreter.ResetAll()
ROOT.gInterpreter.Declare('#include "libs/cppOnnxModel.hxx"')

out:
In file included from input_line_49:1:
In file included from ./libs/cppOnnxModel.hxx:5:
In file included from /home/qidong/micromamba/envs/work/include/onnxruntime/core/session/onnxruntime_cxx_api.h:26:
/home/qidong/micromamba/envs/work/include/onnxruntime/core/session/onnxruntime_c_api.h:35:10: fatal error: 'string.h' file not found
#include <string.h>
         ^~~~~~~~~~

Since this was not shown in 6.30, I was wondering if this is a known issue? Here is the same commands with 6.30.2:

import ROOT

out:
Welcome to JupyROOT 6.30/02

ROOT Version: 6.32.02
Platform: Alma Linux 9.4
Compiler: gcc 12.4


… Some additional findings:

When executing from pyROOT, the ROOT.gInterpreter.Declare('#include "libs/cppOnnxModel.hxx"') call still fails with ROOT 6.30.4 onward, here are the outputs:

import ROOT
ROOT.gInterpreter.Declare('#include "libs/cppOnnxModel.hxx"')

out:
cling JIT session error: Failed to materialize symbols: { (main, { ... }) }
True

I have also checked the later 6.30 versions. It stopped working from 6.30.4.

Cheers, Dong

Hi @qidong,

Thanks for your question. To help identify the problem. Can you try running the following (with any of the headers that ROOT complains is missing) and see if it’s working?

ROOT.gInterpreter.Declare('#include <time.h>')
// OR
ROOT.gInterpreter.Declare('#include <assert.h>`')

Cheers,
Dev

Hi Dev,

Thanks very much for your quick reply.

As you asked:

ROOT.gInterpreter.Declare('#include <time.h>')
ROOT.gInterpreter.Declare('#include <assert.h>')

out:
False
input_line_55:1:10: error: 'time.h' file not found with <angled> include; use "quotes" instead
#include <time.h>
         ^~~~~~~~
         "time.h"
input_line_56:1:10: fatal error: 'assert.h' file not found
#include <assert.h>
         ^~~~~~~~~~

To add a bit more context, I installed root from coda-forge:

conda create -n myenv python=3.12
conda activate myenv
conda install conda-forge::root=6.32.2
...

Hi @qidong, I tried to replicate your issue in a fresh Alma9 Docker container. I installed ROOT as you did, but I couldn’t reproduce the issue, unfortunately. It might be that you have multiple root versions (conflicts), and that might be causing the problem.

Maybe @vpadulan has more ideas on why this might be happening.

Cheers,
Dev

Cheers,
Dev

Hi Dev,

Thanks for the update.

hmm, thanks for confirming, I will try using a docker container and report back if it still don’t work.

Cheers, Dong

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