ibrewster / homebrew-avo

AVO related homebrew formulas
3 stars 2 forks source link

avog2s fails to brew on Linux Mint 20 (ulyana) #8

Closed alexjcwitsil closed 3 years ago

alexjcwitsil commented 3 years ago

I am trying to install avog2s on my linux machine with: brew install avog2s but it fails when installing the hourssince dependency. See below log for details:

start log

2020-10-20 20:02:27 -0600

make all FC=/usr/local/bin/gfortran

/usr/local/bin/gfortran -O3 -w -fno-math-errno -funsafe-math-optimizations -fno-trapping-math -fno-signaling-nans -fcx-limited-range -fno-rounding-math -fdefault-real-8 -L/usr/lib64 -I/usr/include -I/usr/lib64/gfortran/modules -c HoursSince.f90 make: /usr/local/bin/gfortran: Command not found make: *** [makefile:101: HoursSince.o] Error 127

HOMEBREW_VERSION: 2.5.6 ORIGIN: https://github.com/Homebrew/brew HEAD: abf214c01ff1edb57acf7e23d5eb24a777335e11 Last commit: 9 days ago Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core Core tap HEAD: 651446ef2e09e8fe9b3fcd527d981d893d5584d7 Core tap last commit: 4 hours ago Core tap branch: master HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew HOMEBREW_CASK_OPTS: [] HOMEBREW_DISPLAY: :0 HOMEBREW_MAKE_JOBS: 1 Homebrew Ruby: 2.6.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby CPU: single-core 64-bit icelake Clang: 11.0 build (parse error) Git: 2.25.1 => /usr/bin/git Curl: 7.68.0 => /usr/bin/curl Kernel: Linux 5.4.0-52-generic x86_64 GNU/Linux OS: Linux Mint 20 (ulyana) Host glibc: 2.31 /usr/bin/gcc: 9.3.0 /usr/bin/ruby: N/A glibc: N/A gcc: 5.5.0_7 xorg: N/A

HOMEBREW_CC: gcc-5 HOMEBREW_CXX: g++-5 MAKEFLAGS: -j1 CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew HOMEBREW_GIT: git ACLOCAL_PATH: /home/linuxbrew/.linuxbrew/share/aclocal PATH: /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super:/home/linuxbrew/.linuxbrew/opt/gcc/bin:/home/linuxbrew/.linuxbrew/opt/binutils/bin:/usr/bin:/bin:/usr/sbin:/sbin

end log

From what I can tell, this error is triggered when running the makefile within the HoursSince repo (https://github.com/usgs/volcano-ash3d-hourssince). Within this file, gfortran is hard referenced as: FC=/usr/local/bin/gfortran

However on my machine, I've installed gfortran via brew and its location is given as: /home/linuxbrew/.linuxbrew/bin/gfortran

If I download the repo and manually change the reference to gfortran as: FC=/home/linuxbrew/.linuxbrew/bin/gfortran and run make, I get this error: make: Nothing to be done for 'lib'.

Finally, just for giggles, I tried running make while leaving FC=/usr/local/bin/gfortran which presented a different error: /usr/bin/gfortran -O0 -g3 -Wall -fbounds-check -pedantic -fimplicit-none -Wunderflow -Wuninitialized -ffpe-trap=invalid,zero,overflow -fdefault-real-8 -L/usr/lib64 -I/usr/include -I/usr/lib64/gfortran/modules -c HoursSince.f90 f951: Warning: Nonexistent include directory ‘/usr/lib64/gfortran/modules’ [-Wmissing-include-dirs]

This error was interesting because I couldn't find any directory on my machine that had a path similar to 'gfortran/modules'

Is there anyway to change the gfortran hard reference from /usr/local/bin/gfortran to something more dynamic depending on where gfortran is installed on the local machine? Also, same question for directory /usr/lib64/gfortran/modules.

Any help on the matter would be much appreciated! Thanks!!

ibrewster commented 3 years ago

Interesting. I did fork and modify a number of other repositories to fix similar issues, but apparently I didn't do hourssince for some reason (I'm guessing it worked on my test machine). I'll have to set up a linux VM to test with, as it appears there are some path differences or the like. I actually didn't even know that homebrew was available for linux - I was thinking it was a Mac thing. Sorry about that!

alexjcwitsil commented 3 years ago

Hi Israel, no worries! I am very impressed with your organization of all the dependencies within the avo software suite. Thank you for your efforts! As soon as you push a new version, Ill give it a check on my machine. Thanks again for your help!

ibrewster commented 3 years ago

Nope, that didn't fix it. Continuing to work... :)

ibrewster commented 3 years ago

So technically this one is fixed, however we have the same issue with the "projection" requirement, so I'll need to fix that one too apparently.

ibrewster commented 3 years ago

I guess technically the bug report was about working on linux mint, not specifically that the hourssince requirement didn't work, so I'll re-open this again until it completely works :)

alexjcwitsil commented 3 years ago

I can confirm that HoursSince installed successfully! But, as you said, "projection" failed during the install of avog2s. Thanks for working so quickly on this!

ibrewster commented 3 years ago

Progress: projection now works. Running into a compilation issue with metreader.

ibrewster commented 3 years ago

Looks like it should install correctly now. No guaranties on functioning :)

alexjcwitsil commented 3 years ago

Thanks Israel! I can confirm that avog2s successfully installed on my linux box. Thank you for sorting out those issues so quickly. I look forward to using the software :)