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

GEMPAK & Ubuntu 20.04 #57

Closed
ghost opened this issue Mar 30, 2021 · 20 comments
Closed

GEMPAK & Ubuntu 20.04 #57

ghost opened this issue Mar 30, 2021 · 20 comments
Labels

Comments

@ghost
Copy link

ghost commented Mar 30, 2021

Trying to install GEMPAK on Ubuntu 20.04 and having no success.
The tutorial online is written for centOS/Redhat and the libraries required for Ubuntu do not translate across.
Can a tutorial for Ubuntu be created since it is one of the most popular Linux flavors?

@akrherz
Copy link
Collaborator

akrherz commented Feb 28, 2022

@whatheway sorry about the non-response here. There's not much in the way of developer resources here and sadly, I have no interest in Ubuntu :) But, some of the updates done for this to better compile on RHEL8, may have helped Ubuntu too. Are you able to give the current main branch a build try and let me know of errors encountered?

@mzuranski
Copy link
Contributor

Sorry, I must have missed this issue too. I run Ubuntu exclusively, though I haven't gone to 20.04 on any of my production machines yet. Below are the notes I have for 18.04, but I haven't tested these commands in a few years:

wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxp/libxp6_1.0.2-1ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/libx/libxp/libxp-dev_1.0.2-1ubuntu1_amd64.deb
sudo dpkg -i libxp6_1.0.2-1ubuntu1_amd64.deb
sudo dpkg -i libxp-dev_1.0.2-1ubuntu1_amd64.deb
sudo apt install -f

sudo apt install gcc build-essential gfortran libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev xorg xbitmaps flex byacc libmotif-common libmotif-dev xfonts-100dpi xfonts-75dpi xfonts-cyrillic

I also plan on testing 7.14 with Ubuntu 20.04 soon, hopefully this week. I'll report back with what I find on that expedition.

@mzuranski
Copy link
Contributor

I did run into another issue compiling 7.5.1 for Ubuntu 18.04 and found a work-around. I'm not a big fan of installing it like this, but I never ran into any problems after the install so there's that.

Here are the notes I made on that installation issue and work-around: https://www.unidata.ucar.edu/mailing_lists/archives/gembud/2020/msg00000.html

@mzuranski
Copy link
Contributor

I got 7.14 to install on Ubuntu 20.04, but I'm not 100% of the way there yet...

Here's the apt install command that got me going: sudo apt install gcc build-essential gfortran libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev xorg xbitmaps flex byacc libmotif-common libmotif-dev xfonts-100dpi xfonts-75dpi xfonts-cyrillic libxpm4 libxpm-dev libhdf5-dev gfortran-8

I don't seem to need those two external libxp packages I used before, libxpm4 and libxpm-dev appear to work instead. I also ran into some issues installing HDF5, which is why I put libhdf5-dev there, but I may not have actually needed that. And yes I know gfortran is listed twice; I installed the base version before I discovered I needed gfortran-8, keeping both here since that's what got me this far.

I still needed to apply my above hack with config/Makeinc.linux64_gfortran_ubuntu. That doesn't seem to have changed.

20.04 ships with gfortran version 9, which breaks this install. I had to install gfortran-8 and edit config/Makeinc.linux64_gfortran_ubuntu: FC = gfortran-8

@akrherz You might want to know about the gfortran issue. CentOS-7 ships with an older version so this probably hasn't bit many people yet. What I specifically ran into was a problem with IAND very similar to this one. Either we could just keep rolling with gfortran-8 and hope that remains easy to install, or the more proper fix would be to update the parts that break with version 9, but I'm thinking that'd be much more involved. I'll probably break this into a separate issue soon.

All of that got me through the install, but I'm not able to open up nmap2. The window starts to load then crashes with the following errors:

Finished reading tables...
Resource File: /home/gempak/gempak-7.14.0/resource/Nmap
Warning: Cannot convert string "-adobe-helvetica--r-normal--14--75-75-p--iso8859-1" to type FontStruct
Warning: Cannot convert string "-adobe-times-bold-r-normal--12--75-75-p--iso8859-1" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-normal-
--120---m---" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-normal--17-120---m---" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-normal-
-12--75-75-m--iso8859-1" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-normal---180---m---" to type FontStruct
Warning: Cannot convert string "-adobe-courier-bold-r-normal-
-14--75-75-m--iso8859-1" to type FontStruct
Warning: Cannot convert string "-adobe-times-bold-r-normal--10--75-75-p--iso8859-1" to type FontStruct
Warning: Cannot convert string "-adobe-courier-
-r-normal---140---m---*" to type FontStruct
X Error of failed request: BadName (named color or font does not exist)
Major opcode of failed request: 45 (X_OpenFont)
Serial number of failed request: 265917
Current serial number in output stream: 265926

xfonts-100dpi and xfonts-75dpi did install so I'm not sure what the problem here is; I never use nmap so I'm a little out of my element here.

I'm going to try to clean up this process a little more and will test some of the other programs another time, have to walk away from this now though.

@sgdecker
Copy link
Collaborator

sgdecker commented Mar 3, 2022

@mzuranski The issue with gfortran should be solved by #44 . As for the fonts, have you rebooted since installing xfonts-100dpi and xfonts-75dpi?

@mzuranski
Copy link
Contributor

The issue with gfortran should be solved by #44

Oh neat, that fix is much simpler than I thought it would be! I'll test that on my next install instead of gfortran-8.

As for the fonts, have you rebooted since installing xfonts-100dpi and xfonts-75dpi?

No... Dang it... Nmap2 loads just fine now.

Thanks @sgdecker!

@akrherz
Copy link
Collaborator

akrherz commented Mar 3, 2022

@mzuranski one of the goals I'd like to implement within this issue is to add a Github Actions CI job that builds GEMPAK on ubuntu, which is the default OS for runners. Presently, our CI runners are only using centos 6 and centos 7 docker images.

@ghost
Copy link
Author

ghost commented Mar 4, 2022 via email

@mzuranski
Copy link
Contributor

mzuranski commented Mar 4, 2022

I just spun up a fresh Ubuntu 20.04 VM, below are some cleaner instructions to get Gempak installed:

1. Install dependencies:
sudo apt install gcc build-essential gfortran libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev xorg xbitmaps flex byacc libmotif-common libmotif-dev xfonts-100dpi xfonts-75dpi xfonts-cyrillic libxpm4 libxpm-dev

2. Reboot

From here on it is assumed you're logged in as user gempak starting in the /home/gempak directory.

3. Download and extract Gempak:
wget https://github.com/Unidata/gempak/archive/refs/tags/7.14.0.tar.gz
tar -xvzf 7.14.0.tar.gz
ln -s gempak-7.14.0/ NAWIPS

4. Edit your Gemenviron file to fit your environment:
If you're using the Bash shell (Ubuntu default) this will be the ~/NAWIPS/Gemenviron.profile file.
If you're using the C-shell this will be the ~/NAWIPS/Gemenviron file.

Pay special attention to the NAWIPS= line (I had to change it to NAWIPS=/home/gempak/gempak-7.14.0 to match the install directory), as well as any data directories you will use.

5. Source Gemenviron at login:
If you're using the Bash shell: add . /home/gempak/NAWIPS/Gemenviron.profile to bottom of ~/.profile
If you're using the C-shell: add . /home/gempak/NAWIPS/Gemenviron to bottom of ~/.cshrc

6. Source Gemenviron now:
cd ~/NAWIPS (this is also a test that your symlink is pointing to the right directory).
Source the Gemenviron file: . Gemenviron.profile

7. Symlink to the Ubuntu Makefile:
cd config
mv Makeinc.linux64_gfortran Makeinc.linux64_gfortran.orig
ln -s Makeinc.linux64_gfortran_ubuntu Makeinc.linux64_gfortran

7.1. Work-around issue #42:
Edit ~/NAWIPS/config/Makeinc.linux64_gfortran_ubuntu and
Replace SYSLIBS = $(PYLIB) $(PYDEP) with SYSLIBS = $(PYLIB) $(PYDEP) -ldl.

If you're installing this before #44 is included:
Install Gfortran Version 8: sudo apt install gfortran-8
Edit Makeinc.linux64_gfortran_ubuntu: FC = gfortran-8
Or
You can manually edit ~/NAWIPS/gempak/source/gemlib/im/imnidh.f as in #44 to avoid gfortran-8.
This step will not be necessary once #44 is included in the release.

8. Begin the build process:
cd ~/NAWIPS
make all >& make.out

9. Work-around issue #42:
Edit ~/NAWIPS/config/Makeinc.linux64_gfortran_ubuntu and add LIBBZ2 = $(OS_LIB)/libbz2.a -ldl to the very bottom.
Run make all >& make2.out a second time.

This step is no longer necessary provided step 7.1.

Optional:
make programs_nc
make programs_gf

10. Install:
make install

Optional:
make clean

akrherz added a commit to akrherz/gempak that referenced this issue Mar 4, 2022
akrherz added a commit to akrherz/gempak that referenced this issue Mar 5, 2022
akrherz added a commit that referenced this issue Mar 7, 2022
@mzuranski
Copy link
Contributor

Fresh install instructions for Ubuntu, using Gempak 7.14.0.1 release and Ubuntu 20.04:

1. Install dependencies:
sudo apt install gcc build-essential gfortran libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev xorg xbitmaps flex byacc libmotif-common libmotif-dev xfonts-100dpi xfonts-75dpi xfonts-cyrillic libxpm4 libxpm-dev

2. Reboot

From here on it is assumed you're logged in as user gempak starting in the /home/gempak directory.

3. Download and extract Gempak:

wget https://github.com/Unidata/gempak/archive/refs/tags/7.14.0.1.tar.gz
tar -xvzf 7.14.0.1.tar.gz
ln -s gempak-7.14.0.1/ NAWIPS

4. Edit your Gemenviron file to fit your environment:
If you're using the Bash shell (Ubuntu default) this will be the ~/NAWIPS/Gemenviron.profile file.
If you're using the C-shell this will be the ~/NAWIPS/Gemenviron file.

Pay special attention to the NAWIPS= line (I had to change it to NAWIPS=/home/gempak/gempak-7.14.0.1 to match the install directory), as well as any data directories you will use.

5. Source Gemenviron at login:
If you're using the Bash shell: add . /home/gempak/NAWIPS/Gemenviron.profile to bottom of ~/.profile
If you're using the C-shell: add source /home/gempak/NAWIPS/Gemenviron to bottom of ~/.cshrc

6. Source Gemenviron now:
cd ~/NAWIPS (this is also a test that your symlink is pointing to the right directory).
If you're using the Bash shell: . Gemenviron.profile
If you're using the C-shell: source Gemenviron

7. Symlink to the Ubuntu Makefile:

cd config
mv Makeinc.linux64_gfortran Makeinc.linux64_gfortran.orig
ln -s Makeinc.linux64_gfortran_ubuntu Makeinc.linux64_gfortran

8. Begin the build process:

cd ~/NAWIPS
make all >& make.out

Optional:

make programs_nc
make programs_gf

9. Install:
make install

Optional:
make clean

@mzuranski
Copy link
Contributor

@akrherz How do you feel about editing Gemenviron and Gemenviron.profile to have the NAWIPS var preset to the release version? Right now it's being set to /home/gempak/GEMPAK7 in both, changing that to /home/gempak/gempak-7.14.0.1 would be one less change required out of the box.

@akrherz
Copy link
Collaborator

akrherz commented Mar 15, 2022

@mzuranski I've long boggled a better approach for the variables set in these scripts, but haven't settled on a solution. I think we should add code that dynamically sets that variable based on the directory location of the source script, but also add code that detects if that variable is already set and not over-ride it. Thoughts?

@vgensini
Copy link
Contributor

@mzuranski I've long boggled a better approach for the variables set in these scripts, but haven't settled on a solution. I think we should add code that dynamically sets that variable based on the directory location of the source script, but also add code that detects if that variable is already set and not over-ride it. Thoughts?

I fully support this! If anything, I'd at least consider changing Gemenviron and Gemenviron.profile to point NAWIPS to /home/gempak/gempak as that will be the default location for most folks forking the repo to the home directory of user gempak.

@ghost
Copy link
Author

ghost commented Apr 21, 2022

Fresh install instructions for Ubuntu, using Gempak 7.14.0.1 release and Ubuntu 20.04:

1. Install dependencies: sudo apt install gcc build-essential gfortran libx11-dev libxt-dev libxext-dev libxft-dev libxtst-dev xorg xbitmaps flex byacc libmotif-common libmotif-dev xfonts-100dpi xfonts-75dpi xfonts-cyrillic libxpm4 libxpm-dev

2. Reboot

From here on it is assumed you're logged in as user gempak starting in the /home/gempak directory.

3. Download and extract Gempak:

wget https://github.com/Unidata/gempak/archive/refs/tags/7.14.0.1.tar.gz
tar -xvzf 7.14.0.1.tar.gz
ln -s gempak-7.14.0.1/ NAWIPS

4. Edit your Gemenviron file to fit your environment: If you're using the Bash shell (Ubuntu default) this will be the ~/NAWIPS/Gemenviron.profile file. If you're using the C-shell this will be the ~/NAWIPS/Gemenviron file.

Pay special attention to the NAWIPS= line (I had to change it to NAWIPS=/home/gempak/gempak-7.14.0.1 to match the install directory), as well as any data directories you will use.

5. Source Gemenviron at login: If you're using the Bash shell: add . /home/gempak/NAWIPS/Gemenviron.profile to bottom of ~/.profile If you're using the C-shell: add source /home/gempak/NAWIPS/Gemenviron to bottom of ~/.cshrc

6. Source Gemenviron now: cd ~/NAWIPS (this is also a test that your symlink is pointing to the right directory). If you're using the Bash shell: . Gemenviron.profile If you're using the C-shell: source Gemenviron

7. Symlink to the Ubuntu Makefile:

cd config
mv Makeinc.linux64_gfortran Makeinc.linux64_gfortran.orig
ln -s Makeinc.linux64_gfortran_ubuntu Makeinc.linux64_gfortran

8. Begin the build process:

cd ~/NAWIPS
make all >& make.out

Optional:

make programs_nc
make programs_gf

9. Install: make install

Optional: make clean

Good morning,

Thank you for working on this. I'm going to try to build a self install script for GEMPAK using all of your suggestions. I will keep you updated on my progress.

@ghost
Copy link
Author

ghost commented Apr 21, 2022

@mzuranski I've long boggled a better approach for the variables set in these scripts, but haven't settled on a solution. I think we should add code that dynamically sets that variable based on the directory location of the source script, but also add code that detects if that variable is already set and not over-ride it. Thoughts?

I fully support this! If anything, I'd at least consider changing Gemenviron and Gemenviron.profile to point NAWIPS to /home/gempak/gempak as that will be the default location for most folks forking the repo to the home directory of user gempak.

I'm thinking about making my self install script point to that directory and then let the user comment it out if it needs to change to the default directory.

@ghost ghost closed this as completed Apr 27, 2022
@ghost ghost reopened this Apr 27, 2022
@ghost
Copy link
Author

ghost commented Apr 27, 2022

Sorry didn't mean to close this issue.

@ghost
Copy link
Author

ghost commented Apr 27, 2022

@akrherz
@mzuranski

I recently finished my self install script for the current version of GEMPAK. I hope you have the time to take a look at it on my Github. I made a few changes in the steps so that users can stay in their home directory for GEMPAK.

Please let me know what you think.

https://github.com/whatheway/GEMPAK

Regards,
Will

@ghost
Copy link
Author

ghost commented May 2, 2022

@akrherz
@mzuranski

Do either of you have experience with GARP to get Gempak to visualize

@akrherz
Copy link
Collaborator

akrherz commented May 3, 2022

Do either of you have experience with GARP to get Gempak to visualize

As much as GEMPAK is old and not supported, GARP is even more so and should not be used. yes, I have gotten it to compile and run, but it fails and segfaults at various random times.

@akrherz
Copy link
Collaborator

akrherz commented May 3, 2022

I made a few changes in the steps so that users can stay in their home directory for GEMPAK.

Please let me know what you think.

Thanks for contributing this.

@ghost ghost closed this as completed May 10, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy