Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble installing Alexandria #123

Open
RussLaher opened this issue May 7, 2024 · 10 comments
Open

Trouble installing Alexandria #123

RussLaher opened this issue May 7, 2024 · 10 comments

Comments

@RussLaher
Copy link

I am trying without success to install Alexandria-2.27.1 inside a redhat/ubi9 docker container. I have been following the instructions on https://astrorama.github.io/SourceXtractorPlusPlus/Installing.html. All prerequisite software has been installed, including Elements-6.1.4. The output from my cmake command is given below, which shows the error. I would appreciate from anyone a hint for moving past the error. I am attaching my build script for Elements and Alexandria (and plan to add SourceXtractorPlusPlus later).

mybuild.sh.txt

Thanks!

`[root@b6639e6204de build]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
CMake Warning (dev) in CMakeLists.txt:
No project() command is present. The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command. Add a line of
code such as

project(ProjectName)

near the top of the file, but after cmake_minimum_required().

CMake is pretending there is a "project(Project)" command on the first
line.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Deprecation Warning at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Warning at /root/Work/Projects/Elements-6.1.4/cmake/SGSPlatform.cmake:209 (message):
Unkown OS, assuming 'linux'
Call Stack (most recent call first):
/root/Work/Projects/Elements-6.1.4/cmake/SGSPlatform.cmake:296 (sgs_find_host_os)
/root/Work/Projects/Elements-6.1.4/cmake/SGSPlatform.cmake:428 (sgs_detect_host_platform)
/root/Work/Projects/Elements-6.1.4/cmake/ElementsLocations.cmake:5 (include)
/root/Work/Projects/Elements-6.1.4/cmake/ElementsProjectConfig.cmake:161 (include)
CMakeLists.txt:14 (elements_project)

-- Target system: x86_64-linux-gcc114
-- Build type: o2g
-- The build prefix is set to build
-- The path to the sources is set to /root/Work/Projects/Alexandria-2.27.1
-- The path to the build is set to /root/Work/Projects/Alexandria-2.27.1/build
-- The relative location for the build is set to build
-- The installation location is /usr/local
-- The squeezing of the installation is ON
-- Looking for local directories...
-- Found:
-- AlexandriaKernel
-- Configuration
-- FilePool
-- GridContainer
-- Histogram
-- KdTree
-- MathUtils
-- NdArray
-- PhysicsUtils
-- Pyston
-- SOM
-- SourceCatalog
-- Table
-- XYDataset
-- Looking for projects
CMake Error at /root/Work/Projects/Elements-6.1.4/cmake/ElementsProjectConfig.cmake:1618 (message):

Cannot find project Elements 6.1.4

with the suffixes:
Elements/6.1.4/InstallArea/x86_64-linux-gcc114-o2g;Elements/6.1.4/InstallArea/x86_64-linux-gcc114-opt;Elements/6.1.4/InstallArea/x86_64-linux-gcc114-dbg;Elements/6.1.4/InstallArea/x86_64-linux-gcc114-pro;Elements/6.1.4/InstallArea/x86_64-linux-gcc114-cov;Elements/6.1.4/InstallArea/x86_64-linux-gcc114-min;Elements_6.1.4/InstallArea/x86_64-linux-gcc114-o2g;Elements_6.1.4/InstallArea/x86_64-linux-gcc114-opt;Elements_6.1.4/InstallArea/x86_64-linux-gcc114-dbg;Elements_6.1.4/InstallArea/x86_64-linux-gcc114-pro;Elements_6.1.4/InstallArea/x86_64-linux-gcc114-cov;Elements_6.1.4/InstallArea/x86_64-linux-gcc114-min

or with the suffixes:
Elements/InstallArea/x86_64-linux-gcc114-o2g;Elements/InstallArea/x86_64-linux-gcc114-opt;Elements/InstallArea/x86_64-linux-gcc114-dbg;Elements/InstallArea/x86_64-linux-gcc114-pro;Elements/InstallArea/x86_64-linux-gcc114-cov;Elements/InstallArea/x86_64-linux-gcc114-min

in the paths:

Call Stack (most recent call first):
/root/Work/Projects/Elements-6.1.4/cmake/ElementsProjectConfig.cmake:241 (_elements_use_other_projects)
CMakeLists.txt:14 (elements_project)

-- Configuring incomplete, errors occurred!
`

@RohanVaradaraj
Copy link

Hi there, I'm replying to this because I am having the same issue when trying to follow the SourceXtractorPlusPlus installation guide for building from source.

@RussLaher
Copy link
Author

Glad it is not just me! I have made no further progress on this. Hopefully the developers will chime in soon...

@marcschefer
Copy link
Member

Hi,

From what I can see your method of installation is quite different from what we recommend in our SourceXtractor++ instructions.

We don't recommend running cmake manually and I think using a --prefix is causing problems.

If you're getting the same result following the instructions, at what point does that happen?

@RohanVaradaraj
Copy link

Hi Marc, thanks for your reply! You're right, I realised that my method of installation wasn't necessarily the exact same as Russ. I was following the documentation, but unfortunately I have to use the --prefix flag (or similar) since I am running on a shared cluster, otherwise I don't have permission to install.

I had some help from the Facility Manager of our cluster to try and do a user installation from source. Building Elements with cmake -DCMAKE_INSTALL_PREFIX=/users/varadaraj/Elements_install/ -DCMAKE_INSTALL_INCLUDEDIR=/usr/local/shared/python/3.11.4/include/python3.11 works fine, but then ElementsProject_DIR=/users/varadaraj/Elements cmake -DCMAKE_INSTALL_PREFIX=/users/varadaraj/Alexandra_install/ .. complains at the following step:

-- =======================================================================
--                   --- Building Alexandria 2.32 ---               
-- =======================================================================
-- Target system: x86_64-ub22-gcc11
-- Build type: o2g
-- The build prefix is set to build
-- The path to the sources is set to /mnt/users/varadaraj/Alexandria
-- The path to the build is set to /mnt/users/varadaraj/Alexandria
-- The relative location for the build is set to 
-- Generated the IWYU Mapping file file: /mnt/users/varadaraj/Alexandria/check/common.imp
-- From the template file: /mnt/users/varadaraj/Elements/cmake/check/common.imp.in
-- Could NOT find IWYU (missing: IWYU_EXECUTABLE IWYU_TOOL_EXECUTABLE) 
-- The installation location is /mnt/zfsusers/varadaraj/Alexandra_install
-- The squeezing of the installation is ON
-- Looking for local directories...
-- Found:
-- Looking for projects
CMake Error at /mnt/users/varadaraj/Elements/cmake/ElementsProjectConfig.cmake:1642 (message):
  

  Cannot find project Elements 6.2.3

  with the suffixes:
  Elements/6.2.3/InstallArea/x86_64-ub22-gcc11-o2g;Elements/6.2.3/InstallArea/x86_64-ub22-gcc11-opt;Elements/6.2.3/InstallArea/x86_64-ub22-gcc11-dbg;Elements/6.2.3/InstallArea/x86_64-ub22-gcc11-pro;Elements/6.2.3/InstallArea/x86_64-ub22-gcc11-cov;Elements/6.2.3/InstallArea/x86_64-ub22-gcc11-min;Elements_6.2.3/InstallArea/x86_64-ub22-gcc11-o2g;Elements_6.2.3/InstallArea/x86_64-ub22-gcc11-opt;Elements_6.2.3/InstallArea/x86_64-ub22-gcc11-dbg;Elements_6.2.3/InstallArea/x86_64-ub22-gcc11-pro;Elements_6.2.3/InstallArea/x86_64-ub22-gcc11-cov;Elements_6.2.3/InstallArea/x86_64-ub22-gcc11-min


  or with the suffixes:
  Elements/InstallArea/x86_64-ub22-gcc11-o2g;Elements/InstallArea/x86_64-ub22-gcc11-opt;Elements/InstallArea/x86_64-ub22-gcc11-dbg;Elements/InstallArea/x86_64-ub22-gcc11-pro;Elements/InstallArea/x86_64-ub22-gcc11-cov;Elements/InstallArea/x86_64-ub22-gcc11-min


  in the paths:

Call Stack (most recent call first):
  /mnt/users/varadaraj/Elements/cmake/ElementsProjectConfig.cmake:260 (_elements_use_other_projects)
  CMakeLists.txt:15 (elements_project)

Apologies if this isn't clear, I'm not so well-versed with this kind of thing.

My workaround has been to revert to SourceXtractor==0.18, which doesn't have dependencies on Elements and Alexandria. I just need the ability to use a measurement image with a different image size and pixel scale to the detection image, so hoping I can still use it in this version!

@marcschefer
Copy link
Member

Hi,

You should be able to install in your home directory without problems. What is important is to set your project directory

For example:
'''
export CMAKE_PROJECT_PATH=/users/varadaraj/ElementsProjects/
export CMAKE_PREFIX_PATH=$CMAKE_PROJECT_PATH/Elements/cmake
mkdir -p $CMAKE_PROJECT_PATH
'''

Now you need to put Elements, Alexandria, SourceXtractor++ all inside /users/varadaraj/ElementsProjects/ so that they can find each other automatically.

Do not use the cmake command, use make install in those directories, cmake will be called automatically and everything will be "installed" inside your projects directory.

All versions of SourceXtractor++ have dependencies on Elements and Alexandria. You probably have some versions of those installed already if you can build 0.18 but not the most recent versions.

I hope that helps.

@RussLaher
Copy link
Author

Hi Marc,
I am using the build instructions at the bottom of the webpage on
https://github.com/astrorama/Alexandria
and there is an explicit
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
If I understand you correctly, should I just skip this?

@marcschefer
Copy link
Member

Hi,

I see, I recommend following the steps here: https://astrorama.github.io/SourceXtractorPlusPlus/Installing.html instead.

@RussLaher
Copy link
Author

Okay, thanks! I think I tried that first and it did not work, but I did not document what happened. I should probably start from scratch and install all the libraries in standard locations (since I am root inside a container). The process was complicated by some of the source code files in Elements not brought up to the changes in latest Boost library, and by Alexandria expecting Elements 6.0.1 instead of the 6.1.4 (latest Elements release at the time I tried to build). The perl one-liners in my build script (mybuild.sh.txt) endeavored to rectify it.

@mkuemmel
Copy link

mkuemmel commented Jun 7, 2024

@RohanVaradaraj did the discussion in the last days also help you?

@RohanVaradaraj
Copy link

Hi @mkuemmel, apologies for my slow reply. I hadn't tried the above yet, but the administrator of my cluster installed conda and so I am able to install the sourcextractor++ with this. I might try to build from source in the future but this is working for now! Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants