CARTAvis / homebrew-tap

0 stars 0 forks source link

Configuring incomplete, errors occurred! #10

Open Jinhua-He opened 2 years ago

Jinhua-He commented 2 years ago

I am not able to install the carta package on my mac 10.15 catalina system. I used the following command offered by the helpdesk: brew install --build-from-source cartavis/tap/carta

The error messages were as follows, but I couldn't find the said log files on my computer:

Last 15 lines from /Users/judge/Library/Logs/Homebrew/carta-casacore/05.cmake: make[1]: [cmTC_2f49e] Error 1 make: [cmTC_2f49e/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:48 (enable_language)

-- Configuring incomplete, errors occurred! See also "/tmp/carta-casacore-20211207-28721-qrzsf7/build/CMakeFiles/CMakeOutput.log". See also "/tmp/carta-casacore-20211207-28721-qrzsf7/build/CMakeFiles/CMakeError.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/cartavis/homebrew-tap/issues

Thank you! Jinhua He

ajm-ska commented 2 years ago

@Jinhua-He It is not clear to what caused the error there. Would you be able to show me a few more lines before the make[1]: *** [cmTC_2f49e] Error 1 line please?

Jinhua-He commented 2 years ago

OK, I copy all the outputs inside my Terminal window into a txt file (attached). report-carta-installation-issue-20211208.txt

ajm-ska commented 2 years ago

@Jinhua-He Thank you. Unfortunately I see Homebrew only shows that last 15 lines of the error, so it is still not clear what caused the problem.

In order to try and replicate your issue, I set up a fresh Catalina Parallels virtual machine. I installed Homebrew and ran: brew install --build-from-source cartavis/tap/carta. It worked without problems here.

So I was trying to compare my terminal output with yours. One difference I notice is that for me it installs a lot more packages. That is because they had not been previously installed. Two packages that could be important and that seem to be already installed on your system are cmake and gcc.

What versions of cmake and gcc are on your system?

Here, I have:

cmake --version cmake version 3.22.1

gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Jinhua-He commented 2 years ago

@ajm-asiaa Here it goes the outcome:

judge@judges-MacBook-Pro model % cmake --version cmake version 3.22.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).

judge@judges-MacBook-Pro model % gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

ajm-ska commented 2 years ago

@Jinhua-He That is the same as mine so cmake and gcc should be OK.

I got a suggestion from @kswang1029 who sometimes encountered build errors due to the presence of Anaconda Python. Do you have Anaconda Python installed on your MacBook? If so, you might need to temporarily comment out lines related to it in your ~/.zshrc file and do source ~/.zshrc. Alternatively it looks like brew also runs in the Bash shell, so you could type bash and then brew install --build-from-source cartavis/tap/carta.

Jinhua-He commented 2 years ago

Dear Anthony,

Thanks for further digging into this issue. Yes, I am using anaconda. Unfortunately, I cannot find the said .zshrc file. It is strange. Hereby I show you what .* files I have. Which file should I change to block anaconda? Shall I also close the running vscode (I launched it from anaconda navigator)?

judge@judges-MBP model % ls -ad ~/.* /Users/judge/.CFUserTextEncoding /Users/judge/.cache /Users/judge/.jsky3 /Users/judge/.pylint.d /Users/judge/.DS_Store /Users/judge/.cartavis /Users/judge/.jupyter /Users/judge/.python_history /Users/judge/.InstallAnywhere /Users/judge/.casa /Users/judge/.lesshst /Users/judge/.ssh /Users/judge/.Trash /Users/judge/.casarc /Users/judge/.local /Users/judge/.subversion /Users/judge/.Xauthority /Users/judge/.conda /Users/judge/.macports /Users/judge/.viminfo /Users/judge/.almaot /Users/judge/.condarc /Users/judge/.matplotlib /Users/judge/.vscode /Users/judge/.anaconda /Users/judge/.config /Users/judge/.nchsoftware /Users/judge/.wine /Users/judge/.aria2 /Users/judge/.continuum /Users/judge/.npm /Users/judge/.zoomus /Users/judge/.astropy /Users/judge/.cups /Users/judge/.ntfs-for-mac-license-backup /Users/judge/.zsh_history /Users/judge/.bash_history /Users/judge/.dropbox /Users/judge/.oracle_jre_usage /Users/judge/.bash_profile /Users/judge/.ipynb_checkpoints /Users/judge/.profile /Users/judge/.bash_sessions /Users/judge/.ipython /Users/judge/.pyenv

BTW, the installation in bash has led a similar error:

==> git submodule init ==> git submodule update ==> git submodule init ==> git submodule update ==> cmake .. -DUSE_FFTW3=ON -DUSE_HDF5=ON -DUSE_THREADS=ON -DUSE_OPENMP=ON -DBUILD_PYTHON=OFF -DUseCcache=1 -DHAS_CXX11=1 Last 15 lines from /Users/judge/Library/Logs/Homebrew/carta-casacore/05.cmake: make[1]: [cmTC_ca7ce] Error 1 make: [cmTC_ca7ce/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:48 (enable_language)

-- Configuring incomplete, errors occurred! See also "/tmp/carta-casacore-20211209-28388-1l0v8dl/build/CMakeFiles/CMakeOutput.log". See also "/tmp/carta-casacore-20211209-28388-1l0v8dl/build/CMakeFiles/CMakeError.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/cartavis/homebrew-tap/issues

ajm-ska commented 2 years ago

@Jinhua-He I assumed your system was using ZSH, but it looks like you may be using BASH by default as you have a ~/.bash_profile present. Therefore, maybe you actually need to switch to zsh first. Type zsh and then brew install --build-from-source cartavis/tap/carta. That's just my guess on how to prevent the presence of Anaconda affecting the CARTA installation. I thought an Anaconda installation writes source commands into the Shell that run automatically when you open a new terminal (Maybe .zshrc, .zsh_profile, .bashrc, or .bash_profile). So my idea is to use a non-default shell that will not run those sourcing commands. Otherwise, find where the Anaconda commands are sourced and temporarily comment them out until Homebrew installs CARTA.

Jinhua-He commented 2 years ago

Thank you, but my default shell is zsh:

judge@judges-MacBook-Pro ~ % echo $SHELL /bin/zsh judge@judges-MacBook-Pro ~ % ps -o comm= $$ -zsh

Now I have repeated the installation in a newly launched clean zsh and found similar error messages (see below). Before doing this, I have commented out the lines related to anaconda in .bash_profile, though I know that it actually won't affect the zsh. It simply means I happened to install my anaconda in bash, right? Don't know if this would complicate the deployment of Carta. (Note: I am trying to install Carta on a personal computer, not on a server.)

==> Installing carta from cartavis/tap ==> Installing dependencies for cartavis/tap/carta: cartavis/tap/carta-casacore, cartavis/tap/zfp, brotli, libidn2, libnghttp2, libssh2, openldap, rtmpdump, curl, fmt, abseil, c-ares, six, protobuf, re2, grpc, libomp, libuv, pugixml, gdbm, mpdecimal, readline, sqlite, xz, python@3.9 and tbb@2020 ==> Installing cartavis/tap/carta dependency: cartavis/tap/carta-casacore ==> git submodule init ==> git submodule update ==> git submodule init ==> git submodule update ==> cmake .. -DUSE_FFTW3=ON -DUSE_HDF5=ON -DUSE_THREADS=ON -DUSE_OPENMP=ON -DBUILD_PYTHON=OFF -DUseCcache=1 -DHAS_CXX11=1 Last 15 lines from /Users/judge/Library/Logs/Homebrew/carta-casacore/05.cmake: make[1]: [cmTC_3969a] Error 1 make: [cmTC_3969a/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:48 (enable_language)

-- Configuring incomplete, errors occurred! See also "/tmp/carta-casacore-20211213-7897-1n9ng2e/build/CMakeFiles/CMakeOutput.log". See also "/tmp/carta-casacore-20211213-7897-1n9ng2e/build/CMakeFiles/CMakeError.log".

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/cartavis/homebrew-tap/issues

ajm-ska commented 2 years ago

@Jinhua-He Thanks for trying that. So it seems my idea to get around the problem was wrong.

I guess we need to see why the make command is failing in order to understand what is causing the problem. It does not appear in the error message showing up in your terminal. We really need to see a few lines that come before the make[1]: *** [cmTC_3969a] Error 1 line.

Did you say before that you can not access the CMakeOutput.log and CMakeError.log files?

Jinhua-He commented 2 years ago

Now I have attached the full records of the output in my terminal window, including the contents in my /tmp directory from which you can see that I really cannot find the said files: "/tmp/carta-casacore-20211213-7897-1n9ng2e/build/CMakeFiles/CMakeOutput.log" "/tmp/carta-casacore-20211213-7897-1n9ng2e/build/CMakeFiles/CMakeError.log"

I tried spotlight, but didn't find the files either. This is partly due to that I only configured my spotlight to document limited types of files such as PDF. (There was a trouble with the spotlight on my mac before: eating too much resources). Welcome your suggestions on how to find the log files.

cmd_records_carta_install_on_mac.txt

michaelarmagh commented 11 months ago

Did this issue get solved, for it appears that I have the very same problem, viz the error message is:

==> cmake .. -DUSE_FFTW3=ON -DUSE_HDF5=ON -DUSE_THREADS=ON -DUSE_OPENMP=ON -DBUILD_PYTHON=OFF -DUseCcache=1 -DDATA_DIR=/usr/local/Cellar/carta-casacore/2022.5.11/share/casa Last 15 lines from /Users/mgb/Library/Logs/Homebrew/carta-casacore/05.cmake: _MAIN__ in testFortranCompiler.f.o collect2: error: ld returned 1 exit status make[1]: [cmTC_c9d31] Error 1 make: [cmTC_c9d31/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:60 (enable_language)

-- Configuring incomplete, errors occurred!

======

Have tried installing from source, starting from bash and from zsh as per some of the discussion above. But always comes back to the same problem.

I'm on Mac OSX Sonoma 14.0.

Thanks

Michael

ajm-ska commented 11 months ago

@michaelarmagh This is likely a new issue due to Clang 15.0.0 used by macOS Sonoma 14.0. It will be fixed by an updated carta-casacore once this Pull Request (https://github.com/CARTAvis/carta-casacore/pull/25) is fully tested, merged, and the Homebrew formulae updated.