# Some problems when I make castor installing

**URL:** <https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772>\
**Category:** General Discussions\
**Created:** [May 6, 2024, 1:24pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772 "2024-05-06T13:24:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [May 6, 2024, 1:24pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/1 "2024-05-06T13:24:27Z")

</div>

Hi

I am installing castor , and I use “ccmake” to generate “makefile”,like this:

CASTOR\_CONFIG /home/cdy/castor/castor\_v3.1.1/config  
CASTOR\_CONFIG\_DIR /home/cdy/castor/castor\_v3.1.1/include/manage  
CASToR\_64bits ON  
CASToR\_BUILD\_DEVEL OFF  
CASToR\_BUILD\_GATE\_UTILITIES ON  
CASToR\_BUILD\_SAMPLE\_UTILITIES ON  
CASToR\_DEBUG OFF  
CASToR\_MPI OFF  
CASToR\_OMP ON  
CASToR\_ROOT ON  
CASToR\_SIMD ON  
CASToR\_VERBOSE ON  
CMAKE\_BUILD\_TYPE Release  
CMAKE\_INSTALL\_PREFIX /home/cdy/castor/install

But when I “make -j4”,the error happen:

c1plus: warning: ‘-fassociative-math’ disabled; other options take precedence  
make[2]: \*\*\* [CMakeFiles/castor-recon.dir/build.make:661：CMakeFiles/castor-recon.dir/src/management/gDataConversionUtilities.cc.o] error 1  
make[1]: \*\*\* [CMakeFiles/Makefile2:146：CMakeFiles/castor-recon.dir/all] error 2  
make: \*\*\* [Makefile:130：all] error 2

Could you help me to solve the problem?

---

<div class="post-metadata">

**Author:** ![tmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/castor-project.discourse.group/tmerlin/32/216_2.png) [@tmerlin](https://castor-project.discourse.group/u/tmerlin)\
**Post date:** [May 6, 2024, 2:17pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/2 "2024-05-06T14:17:00Z")

</div>

Hi,  
I believe this is associated to compilation with SIMD. Try to regenerate with CASToR\_SIMD set to OFF.

Hope this helps,  
Thibaut

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [May 7, 2024, 1:22am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/3 "2024-05-07T01:22:46Z")

</div>

Hi,

Thank you for your kind help. But when I turn it off like this:

CASTOR\_CONFIG /home/cdy/castor/castor\_v3.1.1/config  
CASTOR\_CONFIG\_DIR /home/cdy/castor/castor\_v3.1.1/include/manage  
CASToR\_64bits ON  
CASToR\_BUILD\_DEVEL OFF  
CASToR\_BUILD\_GATE\_UTILITIES ON  
CASToR\_BUILD\_SAMPLE\_UTILITIES ON  
CASToR\_DEBUG OFF  
CASToR\_MPI OFF  
CASToR\_OMP ON  
CASToR\_ROOT ON  
CASToR\_SIMD OFF  
CASToR\_VERBOSE ON  
CMAKE\_BUILD\_TYPE Release  
CMAKE\_INSTALL\_PREFIX /home/cdy/castor/install

The error still exists:

make[2]: \*\*\* [CMakeFiles/castor-datafileExplorer.dir/build.make:661：CMakeFiles/castor-datafileExplorer.dir/src/management/gDataConversionUtilities.cc.o] error1  
make[1]: \*\*\* [CMakeFiles/Makefile2:173：CMakeFiles/castor-datafileExplorer.dir/all] error 2

Does castor have requirement for the Version of g++ or the other dependencies ?

---

<div class="post-metadata">

**Author:** ![tmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/castor-project.discourse.group/tmerlin/32/216_2.png) [@tmerlin](https://castor-project.discourse.group/u/tmerlin)\
**Post date:** [May 10, 2024, 4:38pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/4 "2024-05-10T16:38:05Z")

</div>

Hi,  
CASToR requires ROOT for some utilities. Your error comes from a file related to root functions but it is hard to tell it is the issue without more details.

Do you still have an error if you set the ROOT and UTILITIES options to OFF ?

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [May 15, 2024, 6:31am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/5 "2024-05-15T06:31:54Z")

</div>

Hi

Thank you for your help , I failed installing CASTOR like you say. But I install it with makefile successfully. There is another question ,I want to learn more about reconstruction of GATE PET .  
But when I search “[https://www.castorproject.org/files/castor/castor\_training\_tmp/cstr\_training\_demos.zip](https://www.castorproject.org/files/castor/castor_training_tmp/cstr_training_demos.zip)”,  
it show “The requested page could not be found.” So that ,I can not install the zip.  
Is there another way to down load the training-zip?

---

<div class="post-metadata">

**Author:** ![tmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/castor-project.discourse.group/tmerlin/32/216_2.png) [@tmerlin](https://castor-project.discourse.group/u/tmerlin)\
**Post date:** [May 15, 2024, 5:13pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/6 "2024-05-15T17:13:05Z")

</div>

Hi,  
I am not sure where did you find the link but those files were just training data to be used for a short course, and were only planned to be online temporary.  
However the section 9 of the documentation covers the utilities, and among them how to use the GATE converters. It should be helpful regarding how to use these tools. Do not hesitate if you have any question though.

Best,  
Thibaut

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [May 17, 2024, 3:16am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/7 "2024-05-17T03:16:26Z")

</div>

Dear tmerlin

I am very grateful for your enthusiastic help. I am a new user both for GATE and CASToR . And now , I just have ".mac " and the output “.root”. I know the steps:

1. get the .lut file from the .geom file  
2.get .cdh/.cdf file from the .lut file  
3.use the .cdh/.cdf file to get .img

But I can not understand how to use the “.mac” or “.root” to get my own “.geom”. Is there some examples or teaching video .

---

<div class="post-metadata">

**Author:** ![acoussat](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@acoussat](https://castor-project.discourse.group/u/acoussat)\
**Post date:** [May 20, 2024, 8:40am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/8 "2024-05-20T08:40:23Z")

</div>

Hi,

To convert your “.mac” to a “.geom”, you need to use the utility `castor-GATEMacToGeom`. Similarly, to convert GATE output (“.root” files) to CASToR datafiles (“.Cdh” and “.Cdf”), you can use `castor-GATERootToCastor`.

To use these utilities, you need to compile CASToR with `CASToR_BUILD_GATE_UTILITIES=ON`.

You will find additional information about these tools in section 9.2 of [CASToR documentation](https://castor-project.org/sites/default/files/2020-09/CASToR_general_documentation.pdf).

Hope this helps and good luck!

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [May 20, 2024, 1:41pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/9 "2024-05-20T13:41:40Z")

</div>

Hi,

I first used cmake-gui to install CASToR like this:

export CASTOR\_ROOT=ON  
export CASTOR\_GATE\_UTILITIES=ON  
or  
export CASTOR\_ROOT=OFF  
export CASTOR\_GATE\_UTILITIES=ON

But when I typed “make” , it show:

make[2]: \*\*\* [CMakeFiles/[castor-GATEMacToGeom.dir/build.make:63：CMakeFiles/castor-GATEMacToGeom.dir/toolkits/castor-GATEMacToGeom.cc.o](http://castor-gate-mactogeom.dir/build.make:63%EF%BC%9ACMakeFiles/castorGATEMacToGeom.dir/toolkits/castor-GATEMacToGeom.cc.o)] error  
make[1]: \*\*\* [CMakeFiles/Makefile2:80：CMakeFiles/[castor-GATEMacToGeom.dir/all](http://castor-gatemactogeom.dir/all)] error

Then , I used directly the makefile it offered directly like:  
export CASTOR\_ROOT=1  
export CASTOR\_GATE\_UTILITIES=1  
export CASTOR\_CONFIG=/home/cdy/castor/castor\_v3.1.1/config  
But when I used ,it still showed: can not find the CASTOR\_CONFIG.I think I’m already going crazy. Could you help me please?

---

<div class="post-metadata">

**Author:** ![acoussat](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@acoussat](https://castor-project.discourse.group/u/acoussat)\
**Post date:** [May 21, 2024, 8:50am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/10 "2024-05-21T08:50:56Z")

</div>

> [@gogi](#):
>
> export CASTOR\_ROOT=OFF  
> export CASTOR\_GATE\_UTILITIES=ON

I think this cannot be correct, as GATE utilities rely on ROOT to operate. You need to keep `CASToR_ROOT=ON`. (Also, I don’t know if it matters, but it should be “CASToR” with lowercase “o”.)

> [@gogi](#):
>
> But when I used ,it still showed: can not find the CASTOR\_CONFIG.

Do you get the error during compilation or after, when using CASToR? Could you copy-paste the exact error message that you are getting?

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [May 21, 2024, 2:26pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/11 "2024-05-21T14:26:50Z")

</div>

Hi,

I am sure that it is the problem with the root. The question below always appears ,when turn CASTOR\_ROOT to ON.

like this:

/home/cdy/GATE/root/include/ROOT/RStringView.hxx:32:37: error: ‘experimental’ in namespace ‘std’ does not name a type  
using basic\_string\_view = ::std::experimental::basic\_string\_view\<\_CharT,\_Traits\>;  
/home/cdy/GATE/root/include/ROOT/RStringView.hxx:35:12: error: ‘basic\_string\_view’ does not name a type; did you mean ‘basic\_streambuf’?  
typedef basic\_string\_view string\_view;

---

<div class="post-metadata">

**Author:** ![tmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/castor-project.discourse.group/tmerlin/32/216_2.png) [@tmerlin](https://castor-project.discourse.group/u/tmerlin)\
**Post date:** [May 21, 2024, 7:31pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/12 "2024-05-21T19:31:44Z")

</div>

Hi,  
Maybe a potential C++ standard mismatch, ROOT being compiled with a given C++ standard while CASToR enforces C++11. You can check C++ standard used to compile ROOT with `root-config --features`.  
If they are different, could you follow the steps from the following thread ?  
(use the CMakeLists.txt provided in the discussion, and set CXX\_FLAGS to the one used to compile ROOT)

> [@Problem building castor om Mac Ventura](https://castor-project.discourse.group/t/problem-building-castor-om-mac-ventura/487/2):
>
> Hi Michael, I think this could come from compilation options incompatibility between late ROOT version (\>6.24 I believe) and CASToR. CASToR still forces compilation with c++11, while ROOT uses more recent norm (14 or 17). It could be related to something else as well though. So I would first try to recompile CASToR with CXXFLAGS / CMAKE\_CXX\_FLAGS set to a more recent norm and check if that solves the issue. Best, Thibaut

Hope this works,  
Thibaut

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [June 7, 2024, 3:52am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/13 "2024-06-07T03:52:16Z")

</div>

Hi,

I am using CASTOR for pet, but the result look like strange.  
Could you provide some suggestion?

 ![image](https://global.discourse-cdn.com/free1/uploads/castor_project/original/1X/c3789fac6f29b42482bf4494542c7aa4d4da240b.png)

gogi

---

<div class="post-metadata">

**Author:** ![Maxime\_Toussaint](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Maxime\_Toussaint](https://castor-project.discourse.group/u/Maxime_Toussaint)\
**Post date:** [June 7, 2024, 11:05am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/14 "2024-06-07T11:05:11Z")

</div>

Hi,

It is possible that the problem comes from Amide (see [1]). Do you have access to another software that can read Interfile image to quickly validate if the problem is on Amide side?

Bests,  
Maxime

[1] [Reading Interfile with ImageJ](https://castor-project.discourse.group/t/reading-interfile-with-imagej/259)

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [June 7, 2024, 11:48am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/15 "2024-06-07T11:48:46Z")

</div>

Hi,

No I just open it in Amide. Because I do not kown how to use imageJ to open the .img.

Bests,  
gogi

---

<div class="post-metadata">

**Author:** ![tmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/castor-project.discourse.group/tmerlin/32/216_2.png) [@tmerlin](https://castor-project.discourse.group/u/tmerlin)\
**Post date:** [June 7, 2024, 11:05pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/16 "2024-06-07T23:05:45Z")

</div>

Hi,  
You should try to open the image directly from the raw file, as it is possible the issue comes from Amide itself as suggested by Maxime.

Best,  
Thibaut

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [June 8, 2024, 2:11am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/17 "2024-06-08T02:11:53Z")

</div>

Hi,

Thank you for your reply. In fact, I did open the file directly in .Raw format. Even when I opened the file using IMAGEJ, the image still looks like this. I’m wondering if there’s an issue with my input file. Are there any relevant examples, such as the output ROOT and MAC files from GATE in PET? I’d like to see what the normal process and results look like.  
 ![image](https://global.discourse-cdn.com/free1/uploads/castor_project/original/1X/e148e302f11a619fc40176eb27ab1dcf264d1b69.png)

Best,  
Gogi

---

<div class="post-metadata">

**Author:** ![Maxime\_Toussaint](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Maxime\_Toussaint](https://castor-project.discourse.group/u/Maxime_Toussaint)\
**Post date:** [June 8, 2024, 12:00pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/18 "2024-06-08T12:00:16Z")

</div>

Hi,

For examples, see [1].

Could you share pet\_it9.{hdr/img}? The (possible) problem about Amide linked previously is about Endianness not being read correctly. Therefore, opening the .img as a raw is one way to make sure IF you use the good Endianness.

Bests,  
Maxime

[1] [Benchmarks CASToR v3 | CASToR](https://www.castor-project.org/benchmarksv3)

---

<div class="post-metadata">

**Author:** ![gogi](https://avatars.discourse-cdn.com/v4/letter/g/958977/32.png) [@gogi](https://castor-project.discourse.group/u/gogi)\
**Post date:** [June 11, 2024, 3:50am UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/20 "2024-06-11T03:50:52Z")

</div>

Hi,

Here is my output, [https://we.tl/t-iKxWKIWkWr](https://we.tl/t-iKxWKIWkWr).  
It seems like I’m not opening the file correctly. Even when I try opening the examples on the official website, I still encounter the same issue. Is there any tips while open the file?

Best,  
Gogi

---

<div class="post-metadata">

**Author:** ![Maxime\_Toussaint](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@Maxime\_Toussaint](https://castor-project.discourse.group/u/Maxime_Toussaint)\
**Post date:** [June 11, 2024, 12:21pm UTC](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772/21 "2024-06-11T12:21:08Z")

</div>

Hi,

I opened your file with amide with Endianness reading corrected and it is still mostly noise.

Did you try to open examples that are already generated or those generated by the benchmark?

If it is the first case, I would assume that you set Endianness wrongly in ImageJ or did not correct Endianness reading in Amide.

If it is the second, it would feel like your installation of CASToR has some problems which result in always generating incorrect images.

Bests,  
Maxime

[Next page](https://castor-project.discourse.group/t/some-problems-when-i-make-castor-installing/772.md?page=2)
