<div dir="ltr"><div>Oops, sent to wrong list. Now I CC to ncl-install.</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 3, 2021 at 4:39 PM Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov">dave.allured@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I think fontc is a standalone program that is used only during the NCL build process. You may be able to sidestep the program issue completely, by simply copying over the compiled fontcap files from a different build. Look at one of the X86 binary distributions, or a working install on any X86 system. I suspect that the only compatibility issue is endianness of 16- and 32-bit integers. ARM64 and X86 should both be little endian; not sure because I lack ARM experience. </div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 11:37 AM Michael Graf via ncl-install <<a href="mailto:ncl-install@mailman.ucar.edu" target="_blank">ncl-install@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Dear all, <br>
<br>
Thanks for adding me to the NCL mailing list.<br>
<br>
I am trying to compile the latest NCL Version 6.6.2 from scratch on Amazon<br>
Linux 2 (ARM64 architecture). Everything works fine except that a<br>
segmentation fault occurs when the fontcaps are compiled respectively when<br>
the fontc binary is processing fontcaps (see output below). No other error<br>
occurs. The ncl binary is compiled and it can be started without problems,<br>
but when I run a plotting script a segmentation fault occurs that is<br>
probably related to the compilation error in fontcap. <br>
<br>
I also compiled a minimal version with as few dependencies as possible (no<br>
GDAL, HDF5, NETCDF-4 and so on) to rule out that they cause the problem<br>
without any effect. I have also randomly tried different compiler options<br>
for the compilation in the folder fontcap, but the error always remains the<br>
same. I suspect that the compiler is causing the problem, but there is no<br>
alternative on Amazon Linux 2 so far. I'm using gfortran (version 7.3.1) and<br>
gcc (version 7.3.1), but here only Fortran77 code seems to be compiled. <br>
<br>
It would be great if somebody has a hint how to overcome this problem. Maybe<br>
there is another option, so that I don't have to build it from scratch. The<br>
installation with conda does not work on ARM64. <br>
<br>
Best, Michael<br>
<br>
************************************************************************<br>
Making ./common/src/fontcap<br>
make[4]: Entering directory<br>
`/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap'<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c<br>
cfaamn.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
cfrdln.o cfrdln.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
cfwrit.o cfwrit.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
ffgttk.o ffgttk.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
ffinfo.o ffinfo.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
ffphol.o ffphol.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
ffppkt.o ffppkt.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
ffprcf.o ffprcf.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
ffprsa.o ffprsa.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
fftbkd.o fftbkd.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
fftkin.o fftkin.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
sffndc.o sffndc.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
sfgtin.o sfgtin.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
sfgtkw.o sfgtkw.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
sfprcf.o sfprcf.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
sfskbk.o sfskbk.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -c -o<br>
sftbkd.o sftbkd.f<br>
gfortran -fPIC -fno-second-underscore -fno-range-check -fopenmp -O -o<br>
fontc cfaamn.o cfrdln.o cfwrit.o ffgttk.o ffinfo.o ffphol.o ffppkt.o<br>
ffprcf.o ffprsa.o fftb<br>
kd.o fftkin.o sffndc.o sfgtin.o sfgtkw.o sfprcf.o sfskbk.o sftbkd.o<br>
-L../../.././common/src/libncarg_c -lncarg_c -L/usr/local/ncarg_gdal/lib<br>
-L/usr/local/lib<br>
Processing fontcap font1<br>
<br>
Program received signal SIGSEGV: Segmentation fault - invalid memory<br>
reference.<br>
<br>
Backtrace for this error:<br>
#0 0x40001dcb99a3<br>
#1 0x40001dcb888f<br>
#2 0x40001dc90667<br>
#3 0x403bdc<br>
#4 0x403c63<br>
#5 0x4032af<br>
#6 0x400efb<br>
#7 0x401213<br>
#8 0x40001df5ace3<br>
#9 0x400d07<br>
make[4]: *** [font1] Segmentation fault<br>
make[4]: Leaving directory<br>
`/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap'<br>
<br>
************************************************************************<br>
gfortran -g -fbacktrace -Wall -fcheck=all -o fontc cfaamn.o cfrdln.o<br>
cfwrit.o ffgttk.o ffinfo.o ffphol.o ffppkt.o ffprcf.o ffprsa.o<br>
fftbkd.o fftkin.o sffndc.o<br>
sfgtin.o sfgtkw.o sfprcf.o sfskbk.o sftbkd.o<br>
-L../../.././common/src/libncarg_c -lncarg_c -L/usr/local/ncarg/lib<br>
-L/usr/local/lib <br>
Processing fontcap font1<br>
<br>
Program received signal SIGSEGV: Segmentation fault - invalid memory<br>
reference.<br>
<br>
Backtrace for this error:<br>
#0 0x40001a29595b in ???<br>
#1 0x40001a29488f in ???<br>
#2 0x40001a26c667 in ???<br>
#3 0x40723c in ???<br>
#4 0x4072e7 in ???<br>
#5 0x405c97 in sfgtwk_<br>
at /home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/sfgtkw.f:95<br>
#6 0x4061cb in sfprcf_<br>
at /home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/sfprcf.f:108<br>
#7 0x40119b in cfaamn<br>
at /home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/cfaamn.f:304<br>
#8 0x401633 in main<br>
at /home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/cfaamn.f:358<br>
make: *** [font1] Segmentation fault<br>
<br>
************************************************************************<br>
gfortran -g -fsanitize=address,undefined -o fontc cfaamn.o cfrdln.o<br>
cfwrit.o ffgttk.o ffinfo.o ffphol.o ffppkt.o ffprcf.o ffprsa.o<br>
fftbkd.o fftkin.o sffndc.o <br>
sfgtin.o sfgtkw.o sfprcf.o sfskbk.o sftbkd.o<br>
-L../../.././common/src/libncarg_c -lncarg_c -L/usr/local/ncarg/lib<br>
-L/usr/local/lib <br>
Processing fontcap font1<br>
ASAN:DEADLYSIGNAL<br>
=================================================================<br>
==2477==ERROR: AddressSanitizer: SEGV on unknown address 0x100005104df40 (pc<br>
0x00000040ffd0 bp 0xffffd104daf0 sp 0xffffd104daf0 T0)<br>
==2477==The signal is caused by a READ memory access.<br>
#0 0x40ffcf in gbyte_<br>
(/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/fontc+0x40ffcf)<br>
#1 0x410057 in gbytes_<br>
(/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/fontc+0x410057)<br>
#2 0x40deab in sfprcf_<br>
/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/sfprcf.f:117<br>
#3 0x40213f in cfaamn<br>
/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/cfaamn.f:304<br>
#4 0x402d7b in main<br>
/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/cfaamn.f:358<br>
#5 0x40002cbc7ce3 in __libc_start_main (/lib64/libc.so.6+0x1fce3)<br>
#6 0x4018a7<br>
(/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/fontc+0x4018a7)<br>
<br>
AddressSanitizer can not provide additional info.<br>
SUMMARY: AddressSanitizer: SEGV<br>
(/home/ec2-user/wrf/NCL/ncl_ncarg-6.6.2/common/src/fontcap/fontc+0x40ffcf)<br>
in gbyte_<br>
==2477==ABORTING<br>
make: *** [font1] Error 1<br>
<br>
_______________________________________________<br>
ncl-install mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-install" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-install</a><br>
</blockquote></div></div>
</blockquote></div></div>