NOAA-PMEL / PyFerret

The PyFerret program and Python module from NOAA/PMEL
https://ferret.pmel.noaa.gov/Ferret/
The Unlicense
58 stars 22 forks source link

While compiling pyferret error #125

Open DevenderRaju opened 1 year ago

DevenderRaju commented 1 year ago

Hello,

Can anybody help me with the below error.

Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 21 at (1) /usr/bin/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fno-backslash -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/PyFerret/fer/common -I/root/PyFerret/fer/grdel -I/root/PyFerret/fer/cferbind -I/root/PyFerret/fer/ccr -I/root/PyFerret/fmt/cmn -I/root/PyFerret/ppl/include -I/root/PyFerret/ppl/tmap_inc -I/root/PyFerret/pyfermod -I/root/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include/cairo -I/usr/lib64/../include -I/usr/lib64/../include/pango-1.0 -I/usr/lib64/../include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -c strmar.F -o strmar.o /usr/bin/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fno-backslash -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/PyFerret/fer/common -I/root/PyFerret/fer/grdel -I/root/PyFerret/fer/cferbind -I/root/PyFerret/fer/ccr -I/root/PyFerret/fmt/cmn -I/root/PyFerret/ppl/include -I/root/PyFerret/ppl/tmap_inc -I/root/PyFerret/pyfermod -I/root/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include/cairo -I/usr/lib64/../include -I/usr/lib64/../include/pango-1.0 -I/usr/lib64/../include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -c upnsquish.F -o upnsquish.o upnsquish.F:73:23:

73 | x char(iand('DF'x,ichar(instr(i:i)))) | 1 Error: BOZ constant at (1) uses nonstandard postfix syntax [see ‘-fno-allow-invalid-boz’] make[4]: *** [Makefile:25: upnsquish.o] Error 1

regards, Raju

ACManke commented 1 year ago

Hi Raju,

There will be several Warning messages if you look through all of the compiler outputs.  These point out older constructs in the Fortran code, some of which is quite old.  I believe that these warnings such as the one about a DO loop can safely be ignored.

What operating system and compiler are you using? I use gfortran/ gcc version 9.4.0 under Ubuntu and I do not see the error you are seeing.

I do not know what this error message means, but the flag that is mentioned, -fno-allow-invalid-boz is not listed in the suggested flags in the platform_specific_flags files in the source code for PyFerret. I see "-fallow-invalid-boz" in the flags file platform_specific.mk.intel-mac.  You might try adding that flag to the lists given by FFLAGS and PPLUS_FFLAGS in your platform_specific file.

On 9/21/2022 2:28 AM, DevenderRaju wrote:

Hello,

Can anybody help me with the below error.

Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 21 at (1) /usr/bin/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fno-backslash -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/PyFerret/fer/common -I/root/PyFerret/fer/grdel -I/root/PyFerret/fer/cferbind -I/root/PyFerret/fer/ccr -I/root/PyFerret/fmt/cmn -I/root/PyFerret/ppl/include -I/root/PyFerret/ppl/tmap_inc -I/root/PyFerret/pyfermod -I/root/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include/cairo -I/usr/lib64/../include -I/usr/lib64/../include/pango-1.0 -I/usr/lib64/../include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -c strmar.F -o strmar.o /usr/bin/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fno-backslash -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/PyFerret/fer/common -I/root/PyFerret/fer/grdel -I/root/PyFerret/fer/cferbind -I/root/PyFerret/fer/ccr -I/root/PyFerret/fmt/cmn -I/root/PyFerret/ppl/include -I/root/PyFerret/ppl/tmap_inc -I/root/PyFerret/pyfermod -I/root/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include/cairo -I/usr/lib64/../include -I/usr/lib64/../include/pango-1.0 -I/usr/lib64/../include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -c upnsquish.F -o upnsquish.o upnsquish.F:73:23:

73 | x char(iand('DF'x,ichar(instr(i:i)))) | 1 Error: BOZ constant at (1) uses nonstandard postfix syntax [see ‘-fno-allow-invalid-boz’] make[4]: *** [Makefile:25: upnsquish.o] Error 1

regards, Raju

— Reply to this email directly, view it on GitHub https://github.com/NOAA-PMEL/PyFerret/issues/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOZLFOOV6RMBKIHQBNQDY4DV7LIMNANCNFSM6AAAAAAQR35PQE. You are receiving this because you are subscribed to this thread.Message ID: @.***>

DevenderRaju commented 1 year ago

Dear Support,

I am using CentOS 9 with gfortran/ gcc 11 version.

Regards, Raju

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: ACManke @.> Sent: Thursday, September 22, 2022 6:57:26 AM To: NOAA-PMEL/PyFerret @.> Cc: Raju Devender @.>; Author @.> Subject: Re: [NOAA-PMEL/PyFerret] While compiling pyferret error (Issue #125)

Hi Raju,

There will be several Warning messages if you look through all of the compiler outputs. These point out older constructs in the Fortran code, some of which is quite old. I believe that these warnings such as the one about a DO loop can safely be ignored.

What operating system and compiler are you using? I use gfortran/ gcc version 9.4.0 under Ubuntu and I do not see the error you are seeing.

I do not know what this error message means, but the flag that is mentioned, -fno-allow-invalid-boz is not listed in the suggested flags in the platform_specific_flags files in the source code for PyFerret. I see "-fallow-invalid-boz" in the flags file platform_specific.mk.intel-mac. You might try adding that flag to the lists given by FFLAGS and PPLUS_FFLAGS in your platform_specific file.

On 9/21/2022 2:28 AM, DevenderRaju wrote:

Hello,

Can anybody help me with the below error.

Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 21 at (1) /usr/bin/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fno-backslash -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/PyFerret/fer/common -I/root/PyFerret/fer/grdel -I/root/PyFerret/fer/cferbind -I/root/PyFerret/fer/ccr -I/root/PyFerret/fmt/cmn -I/root/PyFerret/ppl/include -I/root/PyFerret/ppl/tmap_inc -I/root/PyFerret/pyfermod -I/root/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include/cairo -I/usr/lib64/../include -I/usr/lib64/../include/pango-1.0 -I/usr/lib64/../include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -c strmar.F -o strmar.o /usr/bin/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fno-backslash -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/PyFerret/fer/common -I/root/PyFerret/fer/grdel -I/root/PyFerret/fer/cferbind -I/root/PyFerret/fer/ccr -I/root/PyFerret/fmt/cmn -I/root/PyFerret/ppl/include -I/root/PyFerret/ppl/tmap_inc -I/root/PyFerret/pyfermod -I/root/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/lib64/../include/cairo -I/usr/lib64/../include -I/usr/lib64/../include/pango-1.0 -I/usr/lib64/../include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -c upnsquish.F -o upnsquish.o upnsquish.F:73:23:

73 | x char(iand('DF'x,ichar(instr(i:i)))) | 1 Error: BOZ constant at (1) uses nonstandard postfix syntax [see ‘-fno-allow-invalid-boz’] make[4]: *** [Makefile:25: upnsquish.o] Error 1

regards, Raju

— Reply to this email directly, view it on GitHub https://github.com/NOAA-PMEL/PyFerret/issues/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOZLFOOV6RMBKIHQBNQDY4DV7LIMNANCNFSM6AAAAAAQR35PQE. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/NOAA-PMEL/PyFerret/issues/125#issuecomment-1254395263, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXQ4AIBMGCMUAHOWWZAFXDLV7OYX5ANCNFSM6AAAAAAQR35PQE. You are receiving this because you authored the thread.Message ID: @.***>

ACManke commented 1 year ago

The code in the routine "ppl/tmapadds/upnsquish.F" uses out-of-date function calls for changing a string to upper-case form. I have not run into build errors with this, but elsewhere in the Ferret/PyFerret code, such functionality is done with calls to the C routine str_upcase.c. I would suggest an experiment: Replace the code in your local copy with the contents of the file I will attach here:

upnsquish.F.txt

DevenderRaju commented 1 year ago

Hello ACManke,

I will make try after replacing the F file and let you know the status.

regards, Raju

DevenderRaju commented 1 year ago

Dear ACManke,

The earlier error gone but new error came up with the below. Can you help me.

/usr/bin/gfortran -m64 -fPIC -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fno-backslash -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/git/PyFerret/fer/common -I/root/git/PyFerret/fer/grdel -I/root/git/PyFerret/fer/cferbind -I/root/git/PyFerret/fer/ccr -I/root/git/PyFerret/fmt/cmn -I/root/git/PyFerret/ppl/include -I/root/git/PyFerret/ppl/tmap_inc -I/root/git/PyFerret/pyfermod -I/root/git/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -c alphas.F -o alphas.o alphas.F:97:19:

84 | CALL CHOUT(US,1) | 2 ...... 97 | CALL CHOUT(TEKOFF,5) | 1 Error: Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(1)/INTEGER(4)). make[4]: [Makefile:25: alphas.o] Error 1 make[4]: Leaving directory '/root/git/PyFerret/ppl/complot' make[3]: [Makefile:23: all] Error 1 make[3]: Leaving directory '/root/git/PyFerret/ppl' make[2]: [Makefile:107: ppl_libraries] Error 2 make[2]: Leaving directory '/root/git/PyFerret/fer' make[1]: [Makefile:39: optimized] Error 2 make[1]: Leaving directory '/root/git/PyFerret/fer' make: *** [Makefile:25: optimized] Error 2 f951: Fatal Error: alphas.F: No such file or directory

regards, Raju

ACManke commented 1 year ago

Hello, This also comes from outdated calls in some of the legacy code used by PyFerret. It is interesting that we had not run into trouble with these until now, but I think that gcc 11 has not yet been used.

I suggest that you add the flag -std=legacy. This will be placed in the platform_specific_flags file, and is needed only in the PPLUS_FLAGS section:

PPLUS_FFLAGS    = -m64 -fPIC \
          -std=legacy  \
          -fno-automatic \
          -fno-second-underscore \
          -fdollar-ok \
          -ffixed-line-length-132 \
          -fno-backslash \
          $(MYDEFINES) $(MYINCLUDES)
ACManke commented 1 year ago

Adding some general information to this ticket. The -std option is documented here: https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html

and a short discussion of -std=legacy is here: https://www.scivision.dev/gcc-gfortran-std-legacy/

The Gfortran flag -std=legacy disables warning for very out-of-date non-standard Fortran syntax that should not be used anymore. However, where you are using a legacy package where the code isn’t being changed, using -std=legacy can be necessary, particularly for Gfortran ≥ 8.

-std=legacy should not be used when developing code, but for code that is never changed, or for building but not developing PyFerret, this is fine.

DevenderRaju commented 1 year ago

Dear ACManke,

The previous error gone after -std=legacy in Flags. After that two more error came that i have solved, but one error below i couldn't solve. Please help me.

/usr/bin/gfortran -m64 -fPIC -std=legacy -fallow-invalid-boz -fno-automatic -fno-second-underscore -fdollar-ok -ffixed-line-length-132 -fallow-argument-mismatch -ffpe-trap=overflow -fno-backslash -fimplicit-none -fdefault-real-8 -fdefault-double-8 -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/git/PyFerret/fer/common -I/root/git/PyFerret/fer/grdel -I/root/git/PyFerret/fer/cferbind -I/root/git/PyFerret/fer/ccr -I/root/git/PyFerret/fmt/cmn -I/root/git/PyFerret/ppl/include -I/root/git/PyFerret/ppl/tmap_inc -I/root/git/PyFerret/pyfermod -I/root/git/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O -DNDEBUG -c do_internal_gc_fcn.F -o do_internal_gc_fcn.o do_internal_gc_fcn.F:1157:132:

1157 | . buff(:TM_LENSTR1(buff)), *5000 ) | 1 Error: Missing alternate return specifier in subroutine call at (1) make[3]: [../../platform_specific.mk.x86_64-linux:133: do_internal_gc_fcn.o] Error 1 make[3]: Leaving directory '/root/git/PyFerret/fer/doo' make[2]: [Makefile:117: fer_libraries] Error 1 make[2]: Leaving directory '/root/git/PyFerret/fer' make[1]: [Makefile:39: optimized] Error 2 make[1]: Leaving directory '/root/git/PyFerret/fer' make: [Makefile:25: optimized] Error 2

regards, Raju

ACManke commented 1 year ago

Hi, This points to a recent undiscovered bug. The compiler version you are using is more strict and so it has found this.

At the end of the file fer/doo/do_internal_gc_fcn.F there is a call to an error routine. The last few lines of this file should be as follows:

 5400   CONTINUE
    CALL ERRMSG(ferr_grid_definition, status,
     .     'Result 1-d grid too large for 4-byte integer indexing: '//
     .   fcn_name(:TM_LENSTR1(fcn_name)) //' '//
     .   buff(:TM_LENSTR1(buff)), *5000 )

    END

In the code base, there is currently a comma at the end of the line that ends with indexing, but that line should end with the characters //

If you change your copy of this routine I believe we will get beyond this error.

DevenderRaju commented 1 year ago

Hi ACManke,

The above error has gone after replacing the text in the F file. Now there is an error regarding the python. Below the is the error. Is Pyferret support for Version 3.9.

CCompilerOpt.generate_dispatch_header[2245] : dispatch header dir build/src.linux-x86_64-3.9/numpy/distutils/include does not exist, creating it error: Command "gcc -shared -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -g -m64 -fPIC -Dcrptd_cat_argument -Ddouble_p -Dgfortran -Dreclen_in_bytes -Dunix -Dxgks -DG77 -DG77_SIGNAL -DINTERNAL_READ_FORMAT_BUG -DMANDATORY_FORMAT_WIDTHS -DNEED_IAND -DNO_DOUBLE_ESCAPE_SLASH -DNO_OPEN_CARRIAGECONTROL -DNO_OPEN_READONLY -DNO_OPEN_RECORDTYPE -DNO_OPEN_SHARED -DNO_PASSED_CONCAT -DNO_PREPEND_STRING -DSTAR_1_SUPPORTED -I/usr/include/python3.9 -I/root/git/PyFerret/fer/common -I/root/git/PyFerret/fer/grdel -I/root/git/PyFerret/fer/cferbind -I/root/git/PyFerret/fer/ccr -I/root/git/PyFerret/fmt/cmn -I/root/git/PyFerret/ppl/include -I/root/git/PyFerret/ppl/tmap_inc -I/root/git/PyFerret/pyfermod -I/root/git/PyFerret/external_functions/ef_utility -I/usr/lib64/../include -I/usr/lib64/../include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -DNDEBUG -O build/temp.linux-x86_64-3.9/pyfermod/copy_pystat_data.o build/temp.linux-x86_64-3.9/pyfermod/decref_pyobj.o build/temp.linux-x86_64-3.9/pyfermod/libpyferret.o build/temp.linux-x86_64-3.9/pyfermod/pyefcn_compute.o build/temp.linux-x86_64-3.9/pyfermod/pyefcn_custom_axes.o build/temp.linux-x86_64-3.9/pyfermod/pyefcn_get_error.o build/temp.linux-x86_64-3.9/pyfermod/pyefcn_init.o build/temp.linux-x86_64-3.9/pyfermod/pyefcn_result_limits.o build/temp.linux-x86_64-3.9/pyfermod/set_memory.o fer/ef_utility/ef_get_arg_type.o fer/ef_utility/ef_get_bad_flags.o fer/ef_utility/ef_get_cx_list.o fer/ef_utility/ef_get_mres.o fer/ef_utility/ef_get_mr_list.o fer/ef_utility/ef_get_one_val.o fer/ef_utility/ef_get_result_type.o fer/ef_utility/ef_put_string.o fer/ef_utility/ef_put_string_ptr.o fer/ef_utility/ef_set_alt_fcn_name_sub.o fer/ef_utility/ef_set_arg_desc_sub.o fer/ef_utility/ef_set_arg_name_sub.o fer/ef_utility/ef_set_arg_type.o fer/ef_utility/ef_set_arg_unit_sub.o fer/ef_utility/ef_set_axis_extend.o fer/ef_utility/ef_set_axis_influence.o fer/ef_utility/ef_set_axis_influence_6d.o fer/ef_utility/ef_set_axis_inheritance.o fer/ef_utility/ef_set_axis_inheritance_6d.o fer/ef_utility/ef_set_axis_limits.o fer/ef_utility/ef_set_axis_reduction.o fer/ef_utility/ef_set_axis_reduction_6d.o fer/ef_utility/ef_set_custom_axis_sub.o fer/ef_utility/ef_set_desc_sub.o fer/ef_utility/ef_set_num_args.o fer/ef_utility/ef_set_freq_axis_sub.o fer/ef_utility/ef_set_has_vari_args.o fer/ef_utility/ef_set_num_work_arrays.o fer/ef_utility/ef_set_piecemeal_ok.o fer/ef_utility/ef_set_piecemeal_ok_6d.o fer/ef_utility/ef_set_result_type.o fer/ef_utility/ef_set_work_array_dims.o fer/ef_utility/ef_set_work_array_dims_6d.o fer/ef_utility/ef_set_work_array_lens.o fer/ef_utility/ef_set_work_array_lens_6d.o fer/ef_utility/ef_version_test.o fer/ef_utility/ef_bail_out.o fer/ef_utility/ef_convert_date_string.o fer/ef_utility/ef_get_arg_info.o fer/ef_utility/ef_get_arg_mem_subscripts.o fer/ef_utility/ef_get_arg_mem_subscripts_6d.o fer/ef_utility/ef_get_arg_string.o fer/ef_utility/ef_get_arg_subscripts.o fer/ef_utility/ef_get_arg_subscripts_6d.o fer/ef_utility/ef_get_arg_ss_extremes.o fer/ef_utility/ef_get_arg_ss_extremes_6d.o fer/ef_utility/ef_get_axis_calendar.o fer/ef_utility/ef_get_axis_dates.o fer/ef_utility/ef_get_axis_info.o fer/ef_utility/ef_get_axis_info_6d.o fer/ef_utility/ef_get_axis_modulo_len.o fer/ef_utility/ef_get_box_hi_lim.o fer/ef_utility/ef_get_box_limits.o fer/ef_utility/ef_get_box_lo_lim.o fer/ef_utility/ef_get_box_size.o fer/ef_utility/ef_get_coordinates.o fer/ef_utility/ef_get_its_dsg.o fer/ef_utility/ef_get_one_arg_string.o fer/ef_utility/ef_get_one_val_sub.o fer/ef_utility/ef_get_one_val_sub_sub.o fer/ef_utility/ef_get_res_mem_subscripts.o fer/ef_utility/ef_get_res_mem_subscripts_6d.o fer/ef_utility/ef_get_res_subscripts.o fer/ef_utility/ef_get_res_subscripts_6d.o fer/ef_utility/ef_get_string_arg_element.o fer/ef_utility/ef_get_string_arg_element_6d.o fer/ef_utility/ef_get_string_arg_element_len.o fer/ef_utility/ef_get_string_arg_element_len_6d.o fer/ef_utility/ef_get_string_arg_elem_len_sub.o fer/ef_utility/ef_get_string_arg_element_sub.o fer/ef_utility/ef_get_string_arg_max_len.o fer/ef_utility/ef_get_wrk_mem_subscripts.o fer/ef_utility/ef_get_wrk_mem_subscripts_6d.o fer/ef_utility/ef_set_alt_fcn_name.o fer/ef_utility/ef_set_arg_desc.o fer/ef_utility/ef_set_arg_name.o fer/ef_utility/ef_set_arg_unit.o fer/ef_utility/ef_set_custom_axis.o fer/ef_utility/ef_set_freq_axis.o fer/ef_utility/ef_set_desc.o fer/ef_utility/ef_set_real_to_string.o fer/ef_utility/ef_get_date_tstep.o fer/special/FerMem_routines.o fer/special/fakes3.o fer/special/ferret_dispatch.o fer/special/gui_fakes.o fer/special/linux_routines.o fer/special/xmake_date_data.o fer/special/xrevision_type_data.o fer/special/xplatform_type_data.o fmt/src/tm_lenstr.o fmt/src/tm_fmt.o fmt/src/tm_lefint.o -Llib -L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -L/usr/lib64 -ltmapadds -lcmp -lour -lplt -lpll -lepi -lusr -lsym -ltmap -lagg -lccr -lcferbind -lctx -ldat -ldoo -lefi -lefn -lfmt -lgnl -lgrdel -lino -lmem -lferplt -lpyf -lrpn -lstk -lutl -lxeq -ltmapadds -lcmp -lour -lplt -lpll -lepi -lusr -lsym -ltmap -lagg -lccr -lcferbind -lctx -ldat -ldoo -lefi -lefn -lfmt -lgnl -lgrdel -lino -lmem -lferplt -lpyf -lrpn -lstk -lutl -lxeq -ltmapadds -lcmp -lour -lplt -lpll -lepi -lusr -lsym -ltmap -lagg -lccr -lcferbind -lctx -ldat -ldoo -lefi -lefn -lfmt -lgnl -lgrdel -lino -lmem -lferplt -lpyf -lrpn -lstk -lutl -lxeq -ltmapadds -lcmp -lour -lplt -lpll -lepi -lusr -lsym -ltmap -lagg -lccr -lcferbind -lctx -ldat -ldoo -lefi -lefn -lfmt -lgnl -lgrdel -lino -lmem -lferplt -lpyf -lrpn -lstk -lutl -lxeq -ltmapadds -lcmp -lour -lplt -lpll -lepi -lusr -lsym -ltmap -lagg -lccr -lcferbind -lctx -ldat -ldoo -lefi -lefn -lfmt -lgnl -lgrdel -lino -lmem -lferplt -lpyf -lrpn -lstk -lutl -lxeq -o build/lib.linux-x86_64-3.9/pyferret/libpyferret.cpython-39-x86_64-linux-gnu.so /usr/lib64/libnetcdff.a /usr/lib64/libnetcdf.a /usr/lib64/libhdf5_hl.a /usr/lib64/libhdf5.a -lcairo -lpangocairo-1.0 -lcurl -lgfortran -lz -ldl -lm -fPIC -Wl,-Bsymbolic -Wl,--exclude-libs,ALL" failed with exit status 1 make[1]: [Makefile:72: pymod_optimized_build] Error 1 make[1]: Leaving directory '/root/git/PyFerret' make: [Makefile:26: optimized] Error 2

Regards, Raju

ACManke commented 1 year ago

Hi Raju, I am knowledgeable only about the Fortran and C in PyFerret, and about the Ferret command language. This error on the "build" step is not something I know about.

What I do under Ubuntu is to install PyFerret using the miniconda installation method. Then in my build of PyFerret from source, I use the Python and other libraries from the miniconda directory. I directed the miniconda installation to use python3.9:

> conda create -n FERRET python=3.9 -c conda-forge pyferret ferret_datasets --yes

Once the installation is complete, I set my site_specific.mk file so that all of the LIBDIR statements point to the library location under the miniconda installation. Here is part of my site_specific.mk file:

...

## =========================
## Directory containing the Cairo static libraries (v1.12 or later).
## Include files are assumed to be located in an "include" sibling directory.
## If given and not empty, the Cairo static libraries found under this directory will be used.
## If empty or not given, the system's Cairo shared libraries will be used.
## =========================
CAIRO_LIBDIR = /home/acm/miniconda3/envs/FERRET/lib

## =========================
## Directory containing the Pixman static libraries used by the above Cairo static libraries.
## Include files are assumed to be located in an "include" sibling directory.
## If given and not empty, the Pixman-1 static libraries found in this directory will be used.
## If empty or not given, the system's Pixman-1 shared library will be used.
## This value should be empty or not given if CAIRO_LIBDIR is empty or not given.
## =========================
PIXMAN_LIBDIR = /home/acm/miniconda3/envs/FERRET/lib

...

## =========================
## Location of the NetCDF libraries.
## Include files are assumed to be located in an "include" sibling directory.
## If HDF5_LIBDIR is given and not empty, the static libraries will be used
## (along with the HDF5 static libraries).
## If HDF5_LIBDIR is empty or not given, NetCDF shared libraries will be used.
## =========================
NETCDF_LIBDIR = /home/acm/miniconda3/envs/FERRET/lib

Before building PyFerret I enable the miniconda environment so that python from that environment is used in the build:

> conda activate FERRET

> make 
> make install
DevenderRaju commented 1 year ago

Dear ACManke,

I have installed the PyFerret for the python 3.9 by using the following below steps and got success and running smoothly without the conda nor to make a build. And i thank you for your support.

  1. Installing PyFerret dependencies installation (For python 3.9) centos 9
    • yum install pip epel-release python3-qt5-base python3-qt5 netcdf-fortran netcdf-fortran-devel netcdf-devel netcdf
    • pip install --upgrade pip
    • pip install numpy pyshp scipy pyside2
  2. Installing PyFerret

Mainly my purpose of the installing the PyFerret is for LAS 9 on CentOS 9. Here we are running las 8 now we want to upgrade to the las 9.

Regards, Raju Devender

From: ACManke @.> Sent: 15 October 2022 04:57 To: NOAA-PMEL/PyFerret @.> Cc: Raju Devender @.>; Author @.> Subject: Re: [NOAA-PMEL/PyFerret] While compiling pyferret error (Issue #125)

Hi Raju, I am knowledgeable only about the Fortran and C in PyFerret, and about the Ferret command language. This error on the "build" step is not something I know about.

What I do under Ubuntu is to install PyFerret using the miniconda installation method. Then in my build of PyFerret from source, I use the Python and other libraries from the miniconda directory. I directed the miniconda installation to use python3.9:

conda create -n FERRET python=3.9 -c conda-forge pyferret ferret_datasets --yes

Once the installation is complete, I set my site_specific.mk file so that all of the LIBDIR statements point to the library location under the miniconda installation. Here is part of my site_specific.mk file:

...

=========================

Directory containing the Cairo static libraries (v1.12 or later).

Include files are assumed to be located in an "include" sibling directory.

If given and not empty, the Cairo static libraries found under this directory will be used.

If empty or not given, the system's Cairo shared libraries will be used.

=========================

CAIRO_LIBDIR = /home/acm/miniconda3/envs/FERRET/lib

=========================

Directory containing the Pixman static libraries used by the above Cairo static libraries.

Include files are assumed to be located in an "include" sibling directory.

If given and not empty, the Pixman-1 static libraries found in this directory will be used.

If empty or not given, the system's Pixman-1 shared library will be used.

This value should be empty or not given if CAIRO_LIBDIR is empty or not given.

=========================

PIXMAN_LIBDIR = /home/acm/miniconda3/envs/FERRET/lib

...

=========================

Location of the NetCDF libraries.

Include files are assumed to be located in an "include" sibling directory.

If HDF5_LIBDIR is given and not empty, the static libraries will be used

(along with the HDF5 static libraries).

If HDF5_LIBDIR is empty or not given, NetCDF shared libraries will be used.

=========================

NETCDF_LIBDIR = /home/acm/miniconda3/envs/FERRET/lib

Before building PyFerret I enable the miniconda environment so that python from that environment is used in the build:

conda activate FERRET

make

make install

— Reply to this email directly, view it on GitHubhttps://github.com/NOAA-PMEL/PyFerret/issues/125#issuecomment-1279588667, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXQ4AID5R7NHZMJNXZBTUA3WDHT4ZANCNFSM6AAAAAAQR35PQE. You are receiving this because you authored the thread.Message ID: @.***>