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

Installation issue on Ubuntu 22.04 #367

Closed
pcg108 opened this issue Dec 17, 2022 · 11 comments · Fixed by #384
Closed

Installation issue on Ubuntu 22.04 #367

pcg108 opened this issue Dec 17, 2022 · 11 comments · Fixed by #384

Comments

@pcg108
Copy link

pcg108 commented Dec 17, 2022

Hello,

I am trying to install and run ILLIXR on a machine running Ubuntu 22.04. I run
./install_deps.sh
and then run
./runner.sh configs/headless.yaml

Resulting in the following error:

*Warning* Installation log for conda not found at '.cache/deps/miniconda3.sh'.
Checking in '/opt/ILLIXR/miniconda3'.
./runner.sh: line 43: /opt/ILLIXR/miniconda3/etc/profile.d/conda.sh: No such file or directory

CommandNotFoundError: Your shell has not been properly configured to use 'conda deactivate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.



CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.


Traceback (most recent call last):
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/main.py", line 404, in <module>
    main()
  File "/home/eecs/prashanthcganesh108/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/eecs/prashanthcganesh108/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/eecs/prashanthcganesh108/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/eecs/prashanthcganesh108/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/main.py", line 402, in main
    run_config(Path(config_path))
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/main.py", line 394, in run_config
    actions[action](config)
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/main.py", line 100, in load_native
    runtime_exe_path = build_runtime(config, "exe")
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/main.py", line 95, in build_runtime
    make(runtime_path, targets, runtime_config, env_override=env_override)
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/util.py", line 520, in make
    subprocess_run(
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/util.py", line 171, in subprocess_run
    raise CalledProcessError(
util.CalledProcessError: Command returned non-zero exit status 2
command: env ILLIXR_INTEGRATION=ON make -j 16 -C runtime main.opt.exe
stdout:
  make: Entering directory '/home/eecs/prashanthcganesh108/ILLIXR/runtime'
  clang++-10        -std=c++17  -DGLSL_VERSION='"330 core"'  -O3 -DNDEBUG  -Wall -Wextra -Werror \
  -o main.opt.exe main.cpp  -ggdb -ldl -pthread -lstdc++fs -L/usr/lib64 -lGLEW -lGL -lX11 -lGLU -lsqlite3 -lX11
  make: Leaving directory '/home/eecs/prashanthcganesh108/ILLIXR/runtime'

stderr:
  make: clang++-10: No such file or directory
  make: *** [common/common.mk:54: main.opt.exe] Error 127

I have tried to install clang-10 locally using the ILLIXR install_clang.sh script, but that still does not fix the issue. Any help would be greatly appreciated

@charmoniumQ
Copy link
Member

charmoniumQ commented Dec 17, 2022

Did you select "Y" to installing Conda in ./install_deps.sh?

P.S. It will be easier for us to know what's going on if you three backticks (under the escape key on American keyboards) around the error messages, so we know what's part of the message.

```
like this
```

@pcg108
Copy link
Author

pcg108 commented Dec 17, 2022

Hi,

Yes, I selected Yes to all the ./install_deps.sh prompts. When I run ./scripts/install_conda.sh, I get:

Found conda installation. Exiting installation script.

Fixed the formatting, thanks for the tip.

@pcg108
Copy link
Author

pcg108 commented Dec 17, 2022

I removed my existing conda installation and used the ILLIXR script to install conda in /opt/ILLIXR/miniconda3. So the conda errors are gone now but still seeing the following:

DETECT [dep <- 'miniconda3', dir <- '/opt/ILLIXR/miniconda3']
Traceback (most recent call last):
  File "runner/runner/main.py", line 404, in <module>
    main()
  File "/opt/ILLIXR/miniconda3/envs/illixr-runner/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/opt/ILLIXR/miniconda3/envs/illixr-runner/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/opt/ILLIXR/miniconda3/envs/illixr-runner/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/ILLIXR/miniconda3/envs/illixr-runner/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "runner/runner/main.py", line 402, in main
    run_config(Path(config_path))
  File "runner/runner/main.py", line 394, in run_config
    actions[action](config)
  File "runner/runner/main.py", line 100, in load_native
    runtime_exe_path = build_runtime(config, "exe")
  File "runner/runner/main.py", line 95, in build_runtime
    make(runtime_path, targets, runtime_config, env_override=env_override)
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/util.py", line 520, in make
    subprocess_run(
  File "/home/eecs/prashanthcganesh108/ILLIXR/runner/runner/util.py", line 171, in subprocess_run
    raise CalledProcessError(
util.CalledProcessError: Command returned non-zero exit status 2
command: env ILLIXR_INTEGRATION=ON make -j 16 -C runtime main.opt.exe
stdout:
  make: Entering directory '/home/eecs/prashanthcganesh108/ILLIXR/runtime'
  clang++-10        -std=c++17  -DGLSL_VERSION='"330 core"'  -O3 -DNDEBUG  -Wall -Wextra -Werror \
  -o main.opt.exe main.cpp  -ggdb -ldl -pthread -lstdc++fs -L/usr/lib64 -lGLEW -lGL -lX11 -lGLU -lsqlite3 -lX11
  make: Leaving directory '/home/eecs/prashanthcganesh108/ILLIXR/runtime'

stderr:
  make: clang++-10: No such file or directory
  make: *** [common/common.mk:54: main.opt.exe] Error 127


@charmoniumQ
Copy link
Member

Yeah, installation is not atomic, so it is possible that install_deps.sh thinks some package is already installed, but actually trying to use that package fails (imagine the package is "half"-installed). In this case, deleting and running install_deps.sh should help.

As for clang, do you have clang++-10 installed through the install script? Can you run clang++-10?

@pcg108
Copy link
Author

pcg108 commented Dec 19, 2022

I removed my system clang installations and installed clang to /opt/ILLIXR. I am able to run clang-10 (it is found at /opt/ILLIXR/clang) but not clang++-10. Is there a separate installation?

@pcg108
Copy link
Author

pcg108 commented Dec 20, 2022

Update: I mananged to the run the install_clang.sh script and seem to have clang-10 and clang++-10 installed. However, when I go to install opencv using ./scripts/install_opencv.h, I see the following error:

[ 16%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arena.cc.o
In file included from /opt/ILLIXR/opencv/3rdparty/protobuf/src/google/protobuf/arena.cc:31:
/opt/ILLIXR/opencv/3rdparty/protobuf/src/google/protobuf/arena.h:36:10: fatal error: 'limits' file not found
#include <limits>
         ^~~~~~~~
1 error generated.
make[2]: *** [3rdparty/protobuf/CMakeFiles/libprotobuf.dir/build.make:76: 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/arena.cc.o] Error 1
make[2]: Leaving directory '/opt/ILLIXR/opencv/build'
make[1]: *** [CMakeFiles/Makefile2:2816: 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/all] Error 2
make[1]: Leaving directory '/opt/ILLIXR/opencv/build'
make: *** [Makefile:166: all] Error 2
make: Leaving directory '/opt/ILLIXR/opencv/build'

It appears as though the locally built clang isn't finding the standard c++ headers? Any ideas here?

@charmoniumQ
Copy link
Member

They should be installed by a package called libstdc++ or something like that.

@charmoniumQ
Copy link
Member

What version of Ubuntu are you using?

@pcg108
Copy link
Author

pcg108 commented Dec 21, 2022

I have libstdc++ but I think perhaps the locally build clang++ isn't able to find it? I am using Ubuntu 22.04. Has the ILLIXR installation been tested with this?

@pcg108
Copy link
Author

pcg108 commented Dec 23, 2022

I solved this issue (I think) by setting my C++ and C compilers to G++ and GCC for the installation of OpenCV.
Now there appears to be a backwards compatibility issue with TBB when installing GTSam (./scripts/install_gtsam):

-- GTSAM_SOURCE_ROOT_DIR: [/opt/ILLIXR/gtsam]
CMake Error at cmake/FindTBB.cmake:187 (file):
  file failed to open for reading (No such file or directory):

    /usr/include/tbb/tbb_stddef.h
Call Stack (most recent call first):
  CMakeLists.txt:198 (find_package)


-- Could NOT find TBB: Found unsuitable version ".", but required is at least "4.4" (found /usr/include, )

I see that GTSAM_WITH_TBB=OFF is set, leading me to believe that this should not occur. Is there any workaround for this?

EDIT: To solve this, I uncommented line 198 in /opt/ILLIXR/gtsam/CMakeLists.txt (find_packages for TBB).

Additionally, there was an additional Boost error from the using the deb version (1.74 I believe), so I had to install version 1.73 from source.

@Madhuparna04 Madhuparna04 added this to PR Backlog in ILLIXR improvements Jan 11, 2023
@Madhuparna04 Madhuparna04 moved this from PR Backlog to Issue Backlog in ILLIXR improvements Jan 11, 2023
@astro-friedel astro-friedel linked a pull request Aug 18, 2023 that will close this issue
@astro-friedel
Copy link
Contributor

The upcoming release will address this issue. The build system has been completely rewritten to be CMake based which will streamline the build process.

ILLIXR improvements automation moved this from Issue Backlog to Done Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants