Hi Jeff,

Here is a sample file I used some times ago (some definitions might be missing though ...)


In order to automatically generate this file - this is a bit of an egg and the chicken problem -

you can run

configure -c

on the RISC-V node. It will generate a config.cache file.

Then you can

grep ^ompi_cv_fortran_ config.cache

to generate the file you can pass to --with-cross when cross compiling on your x86 system


Cheers,


Gilles


On 9/7/2021 7:35 PM, Jeff Hammond via users wrote:
I am attempting to cross-compile Open-MPI for RISC-V on an x86 system.  I get this error, with which I have some familiarity:

checking size of Fortran CHARACTER... configure: error: Can not determine size of CHARACTER when cross-compiling

I know that I need to specify the size explicitly using a cross-compilation file.  According to configure, this is documented.

--with-cross=FILE       Specify configure values that can not be determined in a cross-compilation environment. See the Open MPI FAQ.

Where is this documented? https://www.open-mpi.org/faq/?category=building <https://www.open-mpi.org/faq/?category=building> contains nothing relevant.

Thanks,

Jeff

--
Jeff Hammond
jeff.scie...@gmail.com <mailto:jeff.scie...@gmail.com>
http://jeffhammond.github.io/ <http://jeffhammond.github.io/>
ompi_cv_fortran_alignment_CHARACTER=${ompi_cv_fortran_alignment_CHARACTER=1}
ompi_cv_fortran_alignment_COMPLEX=${ompi_cv_fortran_alignment_COMPLEX=4}
ompi_cv_fortran_alignment_COMPLEXp16=${ompi_cv_fortran_alignment_COMPLEXp16=4}
ompi_cv_fortran_alignment_COMPLEXp32=${ompi_cv_fortran_alignment_COMPLEXp32=4}
ompi_cv_fortran_alignment_COMPLEXp8=${ompi_cv_fortran_alignment_COMPLEXp8=4}
ompi_cv_fortran_alignment_DOUBLE_COMPLEX=${ompi_cv_fortran_alignment_DOUBLE_COMPLEX=4}
ompi_cv_fortran_alignment_DOUBLE_PRECISION=${ompi_cv_fortran_alignment_DOUBLE_PRECISION=4}
ompi_cv_fortran_alignment_INTEGER=${ompi_cv_fortran_alignment_INTEGER=4}
ompi_cv_fortran_alignment_INTEGERp1=${ompi_cv_fortran_alignment_INTEGERp1=1}
ompi_cv_fortran_alignment_INTEGERp2=${ompi_cv_fortran_alignment_INTEGERp2=2}
ompi_cv_fortran_alignment_INTEGERp4=${ompi_cv_fortran_alignment_INTEGERp4=4}
ompi_cv_fortran_alignment_INTEGERp8=${ompi_cv_fortran_alignment_INTEGERp8=8}
ompi_cv_fortran_alignment_LOGICAL=${ompi_cv_fortran_alignment_LOGICAL=4}
ompi_cv_fortran_alignment_LOGICALp1=${ompi_cv_fortran_alignment_LOGICALp1=1}
ompi_cv_fortran_alignment_LOGICALp2=${ompi_cv_fortran_alignment_LOGICALp2=2}
ompi_cv_fortran_alignment_LOGICALp4=${ompi_cv_fortran_alignment_LOGICALp4=4}
ompi_cv_fortran_alignment_LOGICALp8=${ompi_cv_fortran_alignment_LOGICALp8=8}
ompi_cv_fortran_alignment_REAL=${ompi_cv_fortran_alignment_REAL=4}
ompi_cv_fortran_alignment_REALp16=${ompi_cv_fortran_alignment_REALp16=4}
ompi_cv_fortran_alignment_REALp4=${ompi_cv_fortran_alignment_REALp4=4}
ompi_cv_fortran_alignment_REALp8=${ompi_cv_fortran_alignment_REALp8=4}
ompi_cv_fortran_external_symbol=${ompi_cv_fortran_external_symbol='single 
underscore'}
ompi_cv_fortran_handle_max=${ompi_cv_fortran_handle_max=2147483647}
ompi_cv_fortran_have_CHARACTER=${ompi_cv_fortran_have_CHARACTER=yes}
ompi_cv_fortran_have_COMPLEX=${ompi_cv_fortran_have_COMPLEX=yes}
ompi_cv_fortran_have_COMPLEXp16=${ompi_cv_fortran_have_COMPLEXp16=yes}
ompi_cv_fortran_have_COMPLEXp32=${ompi_cv_fortran_have_COMPLEXp32=yes}
ompi_cv_fortran_have_COMPLEXp4=${ompi_cv_fortran_have_COMPLEXp4=no}
ompi_cv_fortran_have_COMPLEXp8=${ompi_cv_fortran_have_COMPLEXp8=yes}
ompi_cv_fortran_have_DOUBLE_COMPLEX=${ompi_cv_fortran_have_DOUBLE_COMPLEX=yes}
ompi_cv_fortran_have_DOUBLE_PRECISION=${ompi_cv_fortran_have_DOUBLE_PRECISION=yes}
ompi_cv_fortran_have_INTEGER=${ompi_cv_fortran_have_INTEGER=yes}
ompi_cv_fortran_have_INTEGERp16=${ompi_cv_fortran_have_INTEGERp16=no}
ompi_cv_fortran_have_INTEGERp1=${ompi_cv_fortran_have_INTEGERp1=yes}
ompi_cv_fortran_have_INTEGERp2=${ompi_cv_fortran_have_INTEGERp2=yes}
ompi_cv_fortran_have_INTEGERp4=${ompi_cv_fortran_have_INTEGERp4=yes}
ompi_cv_fortran_have_INTEGERp8=${ompi_cv_fortran_have_INTEGERp8=yes}
ompi_cv_fortran_have_LOGICAL=${ompi_cv_fortran_have_LOGICAL=yes}
ompi_cv_fortran_have_LOGICALp1=${ompi_cv_fortran_have_LOGICALp1=yes}
ompi_cv_fortran_have_LOGICALp2=${ompi_cv_fortran_have_LOGICALp2=yes}
ompi_cv_fortran_have_LOGICALp4=${ompi_cv_fortran_have_LOGICALp4=yes}
ompi_cv_fortran_have_LOGICALp8=${ompi_cv_fortran_have_LOGICALp8=yes}
ompi_cv_fortran_have_REAL=${ompi_cv_fortran_have_REAL=yes}
ompi_cv_fortran_have_REALp16=${ompi_cv_fortran_have_REALp16=yes}
ompi_cv_fortran_have_REALp2=${ompi_cv_fortran_have_REALp2=no}
ompi_cv_fortran_have_REALp4=${ompi_cv_fortran_have_REALp4=yes}
ompi_cv_fortran_have_REALp8=${ompi_cv_fortran_have_REALp8=yes}
ompi_cv_fortran_have_iso_c_binding=${ompi_cv_fortran_have_iso_c_binding=yes}
ompi_cv_fortran_have_iso_fortran_env=${ompi_cv_fortran_have_iso_fortran_env=yes}
ompi_cv_fortran_have_storage_size=${ompi_cv_fortran_have_storage_size=yes}
ompi_cv_fortran_ignore_tkr_data=${ompi_cv_fortran_ignore_tkr_data='0:real:!'}
ompi_cv_fortran_interface=${ompi_cv_fortran_interface=yes}
ompi_cv_fortran_kind_value_C_DOUBLE=${ompi_cv_fortran_kind_value_C_DOUBLE=8}
ompi_cv_fortran_kind_value_C_DOUBLE_COMPLEX=${ompi_cv_fortran_kind_value_C_DOUBLE_COMPLEX=8}
ompi_cv_fortran_kind_value_C_FLOAT=${ompi_cv_fortran_kind_value_C_FLOAT=4}
ompi_cv_fortran_kind_value_C_FLOAT_COMPLEX=${ompi_cv_fortran_kind_value_C_FLOAT_COMPLEX=4}
ompi_cv_fortran_kind_value_C_INT16_T=${ompi_cv_fortran_kind_value_C_INT16_T=2}
ompi_cv_fortran_kind_value_C_INT32_T=${ompi_cv_fortran_kind_value_C_INT32_T=4}
ompi_cv_fortran_kind_value_C_INT64_T=${ompi_cv_fortran_kind_value_C_INT64_T=8}
ompi_cv_fortran_kind_value_C_INT=${ompi_cv_fortran_kind_value_C_INT=4}
ompi_cv_fortran_kind_value_C_LONG_DOUBLE=${ompi_cv_fortran_kind_value_C_LONG_DOUBLE=16}
ompi_cv_fortran_kind_value_C_LONG_DOUBLE_COMPLEX=${ompi_cv_fortran_kind_value_C_LONG_DOUBLE_COMPLEX=16}
ompi_cv_fortran_kind_value_C_LONG_LONG=${ompi_cv_fortran_kind_value_C_LONG_LONG=8}
ompi_cv_fortran_kind_value_C_SHORT=${ompi_cv_fortran_kind_value_C_SHORT=2}
ompi_cv_fortran_kind_value_C_SIGNED_CHAR=${ompi_cv_fortran_kind_value_C_SIGNED_CHAR=1}
ompi_cv_fortran_logical_array_correct=${ompi_cv_fortran_logical_array_correct=yes}
ompi_cv_fortran_max_array_rank=${ompi_cv_fortran_max_array_rank=15}
ompi_cv_fortran_module_include_flag=${ompi_cv_fortran_module_include_flag=-I}
ompi_cv_fortran_sizeof_CHARACTER=${ompi_cv_fortran_sizeof_CHARACTER=1}
ompi_cv_fortran_sizeof_COMPLEX=${ompi_cv_fortran_sizeof_COMPLEX=8}
ompi_cv_fortran_sizeof_COMPLEXp16=${ompi_cv_fortran_sizeof_COMPLEXp16=16}
ompi_cv_fortran_sizeof_COMPLEXp32=${ompi_cv_fortran_sizeof_COMPLEXp32=32}
ompi_cv_fortran_sizeof_COMPLEXp8=${ompi_cv_fortran_sizeof_COMPLEXp8=8}
ompi_cv_fortran_sizeof_DOUBLE_COMPLEX=${ompi_cv_fortran_sizeof_DOUBLE_COMPLEX=16}
ompi_cv_fortran_sizeof_DOUBLE_PRECISION=${ompi_cv_fortran_sizeof_DOUBLE_PRECISION=8}
ompi_cv_fortran_sizeof_INTEGER=${ompi_cv_fortran_sizeof_INTEGER=4}
ompi_cv_fortran_sizeof_INTEGERp1=${ompi_cv_fortran_sizeof_INTEGERp1=1}
ompi_cv_fortran_sizeof_INTEGERp2=${ompi_cv_fortran_sizeof_INTEGERp2=2}
ompi_cv_fortran_sizeof_INTEGERp4=${ompi_cv_fortran_sizeof_INTEGERp4=4}
ompi_cv_fortran_sizeof_INTEGERp8=${ompi_cv_fortran_sizeof_INTEGERp8=8}
ompi_cv_fortran_sizeof_LOGICAL=${ompi_cv_fortran_sizeof_LOGICAL=4}
ompi_cv_fortran_sizeof_LOGICALp1=${ompi_cv_fortran_sizeof_LOGICALp1=1}
ompi_cv_fortran_sizeof_LOGICALp2=${ompi_cv_fortran_sizeof_LOGICALp2=2}
ompi_cv_fortran_sizeof_LOGICALp4=${ompi_cv_fortran_sizeof_LOGICALp4=4}
ompi_cv_fortran_sizeof_LOGICALp8=${ompi_cv_fortran_sizeof_LOGICALp8=8}
ompi_cv_fortran_sizeof_REAL=${ompi_cv_fortran_sizeof_REAL=4}
ompi_cv_fortran_sizeof_REALp16=${ompi_cv_fortran_sizeof_REALp16=16}
ompi_cv_fortran_sizeof_REALp4=${ompi_cv_fortran_sizeof_REALp4=4}
ompi_cv_fortran_sizeof_REALp8=${ompi_cv_fortran_sizeof_REALp8=8}
ompi_cv_fortran_true_value=${ompi_cv_fortran_true_value=1}

Reply via email to