Messy ncl installation in 20.04 and fix

Bug #1889040 reported by Muhammad Yunus Ahmad Mazuki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ncl (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hello.

If you look at the instruction of installation of binary or source code compilation from the original source, ncl will traditionally install in
/usr/local/ncl
Then environment NCARG_ROOT is set to /usr/local/ncl. The ncl folder contains bin, lib and include folders.

Various ncl scripts will call upon this environment NCARG_ROOT to load the various libraries and supporting scripts from the ncl package installation. There are also programs like RIP that depends on the classic installation path of ncl.

Installing ncl will install the ncl components in various places, that is:
/usr/bin
/usr/lib/ncarg
/usr/include/ncarg
/usr/share/ncarg

Even more messy is that there is a there is a folder inside /usr/share/ncarg/ and /usr/lib/ncarg that will just point at each other and creating endless loop.

The fix to this messy problem and making sure that the ncl installation will work

For the traditional lib directory and sub directories.
sudo mkdir /usr/local/ncl
sudo mkdir /usr/local/ncl/lib
sudo ln -sf /lib/x86_64-linux-gnu/ncarg/* /usr/local/ncl/lib/.
sudo mkdir /usr/local/ncl/lib/ncarg
sudo ln -sf /usr/share/ncarg/* /usr/local/ncl/lib/ncarg/.

For the traditional include directory and sub directories.
sudo mkdir /usr/local/ncl/include
sudo mkdir /usr/local/ncl/include/ncarg
sudo ln -sf /usr/include/ncarg* /usr/local/ncl/include/ncarg/.

Optional, remove the link loop
sudo rm /usr/share/ncarg/ncarg

I think there's no need to link the bin directory

Then add in ~./bashrc
export NCARG_ROOT=/usr/local/ncl

Now all typical ncl scripts, whether written by ncl developers themselves (as example) or by ncl users will work. Programs that utilise ncl such as RIP would also work now.

This is important, as ncl development has been discontinued. The binary installation provided by ncl websites still depends on libgfortran3 which has long been discontinued.

description: updated
Revision history for this message
YF.B (congroo) wrote :

It's useful for me, Thank you very much!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.