Over the past 20 years I have used DISLIN as an alternative, Fortran-compatible with NCAR graphics (the latter is no longer supported by NCAR and seems perhaps impossible to make on "Silicon" architecture Macs.)
Recently I have begun using DISLIN again and had no problem on an older Mac running Mojave OS. However, when I attempt to link on a 2018 vintage Mac running Monterey OS I have run into link problems (using the Intel ifort compiler, as was true on my Mojave OS Mac too). Following the standard Mac OS instructions for DISLIN, I downloaded the OpenMotif libraries and put them in my Applications folder.
If I try to do a "standard" link with the dynamic libXm (Case 1 below), there is a link error ( ld: malformed universal file:
slice content is not mach-o or a static library file '/
Applications/OpenMotif21/lib/libXm.dylib' ). Most likely this is due to Monterey OS trying to deal with "universal" architures including Silicon OS and the Open Motif libraries were made many years previously before Silicon Macs were available.
If I try to link with a static libXm.a (Case 2), the linking appears to be successful but then when I try to run the resulting executable, I get an unresolved symbol error. ( dyld[17124]: symbol not found in flat namespace (_XtStrings) ).
Has anyone else seen issues like this and (ideally) overcome them?
Thank you (and deep thanks to Helmut Michels for making DISLIN available to the general community!)
Wm. Fawley, SLAC Natl. Accelerator Lab
Case 1: normal link with dynamic library libXm:
macmini-2018[567]>make xplotginh-DIS
ifort -mkl=sequential -g -Wl,-stack_size,0x4000000 -pie -diag-disable=406,8290,8291 -traceback -o xplotginh-DIS gplth_mod.o gplth_main.o gplth_core.o gplth_input.o g plth_spec.o gplth_pwr.o gplth_par.o gplth_ffld.o gplth_util.o gplth_output.o g plth_HDF5_output.o gplth_new.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/fawlib2K_mod.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/fawlib2k.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/grf_uti l2K.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/grf_devel2K.o /Users/bill/PROG/GRF2K/OBJ -DEBUG/make_blueorange.o ../GRF90/OBJ-DEBUG/faw_util90.o ../GRF90/OBJ-DEBUG/fft.o ../GRF90/OBJ-DEBUG/sdds_util90.o ../GRF90/OBJ-DEBUG/cray_equiv90.o \
../GRF90/OBJ-DEBUG/hdf5_util.o -L/opt/HDF5/lib -lhdf5_fo rtran -lhdf5 -L/opt/intel/mkl/lib -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -l z -L /opt/MacOS_SDK/usr/lib -L/opt/DISLIN -ldislin -L/Applications/OpenMotif21/ lib -lXm -lz
ipo: warning #11012: unable to find -l%s in %s
ipo: warning #11012: unable to find -l%s in %s
ipo: warning #11012: unable to find -l%s in %s
ipo: warning #11012: unable to find -l%s in %s
ipo: warning #11012: unable to find -l%s in %s
ld: malformed universal file: slice content is not mach-o or a static library file '/ Applications/OpenMotif21/lib/libXm.dylib'
make: *** [xplotginh-DIS] Error 1
My OpenMotif directory under lib is as follows (note I made the soft link
( libXm.dylib -> libXm.3.1.dylib. ) :
ls -l /Applications/OpenMotif21/lib
total 38512
drwxr-xr-x@ 5 bill admin 160 Oct 24 2015 X11
drwxr-xr-x@ 3 bill admin 96 Oct 24 2015 app-defaults
drwxr-xr-x@ 28 bill admin 896 Oct 24 2015 bindings
-rwxr-xr-x@ 1 bill admin 398328 Oct 24 2015 libMrm.3.1.dylib
lrwxr-xr-x 1 bill admin 16 Oct 24 2015 libMrm.3.dylib -> libMrm.3.1.dylib
-rwxr-xr-x@ 1 bill admin 582028 Oct 24 2015 libMrm.a
-rwxr-xr-x@ 1 bill admin 1160888 Oct 24 2015 libUil.3.1.dylib
lrwxr-xr-x 1 bill admin 16 Oct 24 2015 libUil.3.dylib -> libUil.3.1.dylib
-rwxr-xr-x@ 1 bill admin 1523044 Oct 24 2015 libUil.a
-rwxr-xr-x@ 1 bill admin 110844 Oct 24 2015 libWsm.a
-rwxr-xr-x@ 1 bill admin 6423972 Oct 24 2015 libXm.3.1.dylib
lrwxr-xr-x 1 bill admin 15 Oct 24 2015 libXm.3.dylib -> libXm.3.1.dylib
-rwxr-xr-x@ 1 bill admin 9107772 Oct 24 2015 libXm.a
lrwxr-xr-x 1 root admin 15 Jan 5 14:25 libXm.dylib -> libXm.3.1.dylib
-rwxr-xr-x@ 1 bill admin 392196 Oct 24 2015 libwml.a
Case 2: Linking with static library libXm.a succeeds but then execution cannot find symbol _XtStrings. :
macmini-2018[576]>make xplotginh-DIS
ifort -mkl=sequential -g -Wl,-stack_size,0x4000000 -pie -diag-disable=406,8290,8291 -traceback -o xplotginh-DIS gplth_mod.o gplth_main.o gplth_core.o gplth_input.o g plth_spec.o gplth_pwr.o gplth_par.o gplth_ffld.o gplth_util.o gplth_output.o g plth_HDF5_output.o gplth_new.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/fawlib2K_mod.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/fawlib2k.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/grf_uti l2K.o /Users/bill/PROG/GRF2K/OBJ-DEBUG/grf_devel2K.o /Users/bill/PROG/GRF2K/OBJ -DEBUG/make_blueorange.o ../GRF90/OBJ-DEBUG/faw_util90.o ../GRF90/OBJ-DEBUG/fft.o ../GRF90/OBJ-DEBUG/sdds_util90.o ../GRF90/OBJ-DEBUG/cray_equiv90.o \
../GRF90/OBJ-DEBUG/hdf5_util.o -L /opt/MacOS_SDK/usr/l ib -L/opt/DISLIN -ldislin /Applications/OpenMotif21/lib/libXm.a -L/opt/HDF5/l ib -lhdf5_fortran -lhdf5 -L/opt/intel/mkl/lib -lmkl_intel_lp64 -lmkl_intel_thread - lmkl_core -lz
ipo: warning #11012: unable to find -l%s in %s
ipo: warning #11012: unable to find -l%s in %s
ipo: warning #11012: unable to find -l%s in %s
ipo: warning #11012: unable to find -l%s in %s
macmini-2018[577]>xplotginh-DIS -h | head
dyld[17124]: symbol not found in flat namespace (_XtStrings)