problem with source compiled root
Good day,
I encounter a problem while installing hdtv having root compiled from source. The error was associated with TGX11.h file that was not found. The file existed in the folder /Software/root/v6-28-02_Binaries/include/TGX11.h, even if the root was source correctly in the bash, hdtv would not compiled. When using the pre-compiled version of root the file is located in /usr-path/root/include/TGX11.h In this case I was able to compile hdtv.
Any reason or way to fix this with the root installed from the source and not pre-compiled?
Thank you. Luna
Hello!
First thing to check, can you use the script included with root that sets the environment variables? That should be /Software/root/v6-28-02_Binaries/bin/thisroot.sh or similar.
Dear Jan,
Thank you for your prompt response. I used that root script but even with that it still gives the problem for the version of root built from source.
Any idea or reason why?
Regards, Luna
On 26 Jun 2023, at 20:17, Jan Mayer @.***> wrote:
Hello!
First thing to check, can you use the script included with root that sets the environment variables? That should be /Software/root/v6-28-02_Binaries/bin/thisroot.sh or similar.
— Reply to this email directly, view it on GitHub https://github.com/janmayer/hdtv/issues/32#issuecomment-1607992461, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQDVFPQ2OSXU3ZTP256U43XNHG3TANCNFSM6AAAAAAZUJ4LFQ. You are receiving this because you authored the thread.
There can be several things. Does the installer find other root includes, i.e. did it build some parts and later failed on the TGX11? If so, you might have build root without X11 support. If not, please provide more detailed errors, so I can help you better.
Dear Jan,
Sorry for the late reply. Here is the output when trying to run hdtv after installation. Note that we installed ROOT v6-28-06 from source. We don't get the same problem if we install a precompiled version.
k600user@arthur:~/Software$ hdtv
-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ROOT Version 6.28.06 found in /Software/root/v6-28-06_Binaries/bin/root
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmpwjrtlb9_
[ 25%] Generating G__calibration.cxx, libcalibration_rdict.pcm, libcalibration.rootmap
Scanning dependencies of target calibration
[ 50%] Building CXX object CMakeFiles/calibration.dir/Calibration.cc.o
[ 75%] Building CXX object CMakeFiles/calibration.dir/G__calibration.cxx.o
[100%] Linking CXX shared library libcalibration.so
[100%] Built target calibration
[100%] Built target calibration
Install the project...
-- Install configuration: "Release"
-- Installing: /home/k600user/.cache/hdtv/50858736-62806-v22.11/lib/libcalibration.so
-- Set runtime path of "/home/k600user/.cache/hdtv/50858736-62806-v22.11/lib/libcalibration.so" to ""
-- Installing: /home/k600user/.cache/hdtv/50858736-62806-v22.11/lib/libcalibration.rootmap
-- Installing: /home/k600user/.cache/hdtv/50858736-62806-v22.11/lib/libcalibration_rdict.pcm
-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- ROOT Version 6.28.06 found in /Software/root/v6-28-06_Binaries/bin/root
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/tmpe2vs6deu
[ 5%] Generating G__display.cxx, libdisplay_rdict.pcm, libdisplay.rootmap
Scanning dependencies of target display
[ 16%] Building CXX object CMakeFiles/display.dir/DisplayBlock.cc.o
[ 16%] Building CXX object CMakeFiles/display.dir/DisplayFunc.cc.o
[ 22%] Building CXX object CMakeFiles/display.dir/DisplayObj.cc.o
[ 27%] Building CXX object CMakeFiles/display.dir/DisplaySpec.cc.o
[ 33%] Building CXX object CMakeFiles/display.dir/DisplayCut.cc.o
[ 44%] Building CXX object CMakeFiles/display.dir/DisplayStack.cc.o
[ 44%] Building CXX object CMakeFiles/display.dir/Marker.cc.o
[ 50%] Building CXX object CMakeFiles/display.dir/MTViewer.cc.o
[ 55%] Building CXX object CMakeFiles/display.dir/Viewer.cc.o
[ 61%] Building CXX object CMakeFiles/display.dir/View2D.cc.o
[ 66%] Building CXX object CMakeFiles/display.dir/Painter.cc.o
[ 72%] Building CXX object CMakeFiles/display.dir/View1D.cc.o
[ 77%] Building CXX object CMakeFiles/display.dir/View.cc.o
[ 83%] Building CXX object CMakeFiles/display.dir/XMarker.cc.o
[ 94%] Building CXX object CMakeFiles/display.dir/G__display.cxx.o
[ 94%] Building CXX object CMakeFiles/display.dir/YMarker.cc.o
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View1D.hh:31,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/DisplayObj.cc:29:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View1D.hh:31,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/DisplayStack.cc:28:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
compilation terminated.
make[2]: *** [CMakeFiles/display.dir/build.make:145: CMakeFiles/display.dir/DisplayObj.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/display.dir/build.make:171: CMakeFiles/display.dir/DisplayStack.cc.o] Error 1
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View1D.hh:31,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/Viewer.cc:30:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View2D.hh:40,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View2D.cc:23:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View1D.hh:31,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/Marker.cc:29:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
compilation terminated.
make[2]: *** [CMakeFiles/display.dir/build.make:262: CMakeFiles/display.dir/Viewer.cc.o] Error 1
make[2]: *** [CMakeFiles/display.dir/build.make:236: CMakeFiles/display.dir/View2D.cc.o] Error 1
make[2]: *** [CMakeFiles/display.dir/build.make:184: CMakeFiles/display.dir/Marker.cc.o] Error 1
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View2D.hh:40,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/MTViewer.hh:30,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/MTViewer.cc:23:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.cc:23:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/display.dir/build.make:197: CMakeFiles/display.dir/MTViewer.cc.o] Error 1
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View1D.hh:31,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/DisplayBlock.cc:33:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/display.dir/build.make:249: CMakeFiles/display.dir/View.cc.o] Error 1
make[2]: *** [CMakeFiles/display.dir/build.make:106: CMakeFiles/display.dir/DisplayBlock.cc.o] Error 1
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View1D.hh:31,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View1D.cc:23:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/Painter.cc:25:10: fatal error: TGX11.h: No such file or directory
25 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/display.dir/build.make:223: CMakeFiles/display.dir/View1D.cc.o] Error 1
In file included from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View2D.hh:40,
from /home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/MTViewer.hh:30,
from /tmp/tmpe2vs6deu/G__display.cxx:46:
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/View.hh:27:10: fatal error: TGX11.h: No such file or directory
27 | #include <TGX11.h>
| ^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/display.dir/build.make:210: CMakeFiles/display.dir/Painter.cc.o] Error 1
make[2]: *** [CMakeFiles/display.dir/build.make:301: CMakeFiles/display.dir/G__display.cxx.o] Error 1
/home/k600user/.local/lib/python3.8/site-packages/hdtv/rootext/display/XMarker.cc:24:10: fatal error: TGX11.h: No such file or directory
24 | #include "TGX11.h"
| ^~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/display.dir/build.make:275: CMakeFiles/display.dir/XMarker.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:77: CMakeFiles/display.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Traceback (most recent call last):
File "/home/k600user/.local/bin/hdtv", line 8, in
Hm. Assuming you've imported your root version, such that which root-config should point at /Software/root/v6-28-06_Binaries/bin/root-config: If you do
root-config --features
Does the output include x11? It should be active by default, by might have been deactivated automatically if it had problems finding dependencies during the cmake step. If its not in the list, you'll have to figure out why and fix it in the build of root. If it is included, we'll have to dig in deeper.
Dear Jan,
Thank you for the reply. We run the root-config —features and X11 is in the list.
L
On 06 Sep 2023, at 16:26, Jan Mayer @.***> wrote:
Hm. Assuming you've imported your root version, such that which root-config should point at /Software/root/v6-28-06_Binaries/bin/root-config: If you do
root-config --features Does the output include x11? It should be active by default, by might have been deactivated automatically if it had problems finding dependencies during the cmake step. If its not in the list, you'll have to figure out why and fix it in the build of root. If it is included, we'll have to dig in deeper.
— Reply to this email directly, view it on GitHub https://github.com/janmayer/hdtv/issues/32#issuecomment-1708479386, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQDVFPGMIBZJQIBCYYWC63XZCB2DANCNFSM6AAAAAAZUJ4LFQ. You are receiving this because you authored the thread.
Okay, next steps:
- Does
root-config --incdirpoint to the right directory, and is there aTGX11.h? - Do other parts of hdtv which require root compile, e.g. in the hdtv directory, can you do
python3 -c "import hdtv.rootext.mfile"andpython3 -c "import hdtv.rootext.fit"?
We run the root-config --incdir point to the right directory and we have TFX11.h in there.
Once we run python3 -c "import hdtv.rootext.mfile" it works but when we tried python3 -c "import hdtv.rootext.fit" it doesn't work. See attached file.
Hi!
This output suggests that you are missing the optional dependency MathMore of root. If you type
root-config --libs
does the output include MathMore?
This may just be another problem on the way to solving the original one.
yes indeed we are missing MathMore. Do we need to install it? and rebuild root with GSL, correct?
Yes, you need to recompile ROOT with the build option mathmore. For GSL, there is also the option builtin-gsl which might simplify the linking of the libraries.
we compiled root with the following options: cmake -Dmathmore=ON -Dbuiltin_gsl=ON /Software/root but after building it we still don't have the mathmore libraries when we in the configuration. if we run root-config --features we have mathmore but not when we run root-config --libs Any suggestions?
It has been a while since I compiled root from source. Please try also with -DENABLE_ROOFIT=ON and see if that works.