[Thread Prev][Thread Next][Index]

[ferret_users] Compilation of pyferret with gcc > 4.8



Dear ferret developers!

ferret (version 731) incorporates many other libraries under rapid development and this motivates to compile pyferret with a gnu compiler version > 4.8.

All test  are carried out on Suse Linux os 42.3 but on machines with different processors. .

With gcc 4.8.5, i.e. the systems default compiler I get running code. It is compiled on one machine and works on others with the same system but different processor too. But compiling hdf5 (1.10.1) and netcdf (4.6.0) warnings show up that the compiler does not fully support some c99 standard, which motivates to use a more recent gcc version. I have checked gcc-5 and gcc-7 and the related gfortran available with opensude 42.3.

Compiling .  with  gcc 5.3.1, ferret fails for example with

yes? go multi_view 1, 2, 0.38, 0.07, 0.1, 0.8, 0.15, 0.02, "V", 0.05,0.05
 **ERROR: invalid subcommand: mv_r    = 1
defiymbol mv_r    = 1
Command file, command group, or REPEAT execution aborted

One may write simpler scripts with similar errors - just the script parsing does not work properly. Images can be produced and many ferret elements work as they should.

Remarkably, on another machine this binary works well. The installed system packages "should" be the same on all machines and I could not identify a significant difference in the results of ldd applied on the pyferret-library.. It does not matter, on which machine the code is compiled, it runs on the some distinct machines and on others it does not.

Compiling with gcc-7 the binary fails on all machines when started. The error comes from

PyFerret-master/fmt/src/tm_fmt

around line 300. The code in question is

       sig_needed = sig_needed + need_adjust
       nright = MIN( sig_needed-pow10, slen-(nleft+1) )
       str_len = nleft + nright + 1
       WRITE ( fmt, 3200 ) str_len, nright
 3200       FORMAT ( '(F',I2,'.',I2,')' )
       WRITE ( outstring, fmt ) val

 "fmt" contains only "(F" and nothing else, so the last write fails. With the "print-debugger" I have checked that  str_len and nright are filled with correct values, even writing to stdout instead of fmt reveals a resonable format string. Introducing more prints and trying to introduce intermediate variables gives strange results like for a corrupted memory.

hdf5/netcdf are build with the same compiler like ferret is. Many other libraries (cairo, pangoo, python) come from the system.

My questions:

- did anybody compile pyferret with gcc > 4.8?

- any idea what could be wrong?

Best,

Martin


--
Dr. Martin Schmidt/PyFerret-master/fmt/src/tm_fmt
Leibniz-Institute for Baltic Sea Research
Seestrasse 15
D18119 Rostock
Germany




[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement