ARPA-SIMC / libsim

Command-line utilities and fortran modules for meteorological data processing
GNU General Public License v2.0
7 stars 1 forks source link

[Fedora 32] Tipe mismatch errors #83

Closed brancomat closed 3 years ago

brancomat commented 4 years ago

A type mismatch error prevents F32 builds for libsim.

Full log available here: https://travis-ci.org/github/ARPA-SIMC/libsim/jobs/683438323

Relevant bit:

/bin/sh ../libtool  --tag=FC   --mode=compile gfortran -DHAVE_CONFIG_H -I. -I..    -I../log4fortran -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -fbackslash -c -o georef_coord_class.lo georef_coord_class.F90
libtool: compile:  gfortran -DHAVE_CONFIG_H -I. -I.. -I../log4fortran -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -fbackslash -c georef_coord_class.F90  -fPIC -o .libs/georef_coord_class.o
f951: Warning: '-Werror=' argument '-Werror=format-security' is not valid for Fortran
/bin/sh ../libtool  --tag=FC   --mode=compile gfortran -DHAVE_CONFIG_H -I. -I..    -I../log4fortran -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -fbackslash -c -o optionparser_class.lo optionparser_class.F90
libtool: compile:  gfortran -DHAVE_CONFIG_H -I. -I.. -I../log4fortran -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I/usr/lib64/gfortran/modules -fbackslash -c optionparser_class.F90  -fPIC -o .libs/optionparser_class.o
optionparser_class.F90:625:85:
  625 |  CALL dirty_char_assignment(myoption%destc, myoption%destclen, default, LEN(default))
      |                                                                                     1
Error: Type mismatch in argument 'destc' at (1); passed CHARACTER(1) to INTEGER(1)
optionparser_class.F90:257:81:
  257 |   CALL dirty_char_assignment(this%destc, this%destclen, optarg, LEN_TRIM(optarg))
      |                                                                                 1
Error: Type mismatch in argument 'destc' at (1); passed CHARACTER(1) to INTEGER(1)
make[2]: Leaving directory '/root/rpmbuild/BUILD/libsim-6.4.3-4/base'
make[2]: *** [Makefile:755: optionparser_class.lo] Error 1
make[1]: Leaving directory '/root/rpmbuild/BUILD/libsim-6.4.3-4'
make[1]: *** [Makefile:481: all-recursive] Error 1
make: *** [Makefile:390: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.f0hBh3 (%build)
dcesari commented 4 years ago

Non per niente si chiamava "dirty_char_assignment", spero di riuscire a pezzarla.

dcesari commented 4 years ago

I pushed a fix, I would keep the issue open in order not to forget to find a more elegant and stable solution.

brancomat commented 4 years ago

Thanks! The fix is now in v6.4.4-1, I'll leave the issue open