cea-hpc / wi4mpi

Wrapper interface for MPI
BSD 3-Clause "New" or "Revised" License
80 stars 15 forks source link

error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion] #52

Closed yurivict closed 8 months ago

yurivict commented 1 year ago

Compilation fails:

/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/interface/header/_OMPI/app_mpi.h:935:9: warning: 'A_MPI_T_ERR_INVALID' macro redefined [-Wmacro-redefined]
#define A_MPI_T_ERR_INVALID           74  /* Generic error code for MPI_T added in MPI-3.1 */
        ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/interface/header/_OMPI/app_mpi.h:279:9: note: previous definition is here
#define A_MPI_T_ERR_INVALID             70
        ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:388:1: warning: '/*' within block comment [-Wcomment]
/* if(get_##type##_cte_a2r(&a_mpi_##varname,mpi_##varname)) return;*/\
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:789:1: warning: '/*' within block comment [-Wcomment]
/* if(get_##type##_cte_a2r(&a_mpi_##varname,mpi_##varname)) return;*/\
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:979:13: warning: redefinition of typedef 'A_MPI_Keyval' is a C11 feature [-Wtypedef-redefinition]
typedef int A_MPI_Keyval;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.h:281:13: note: previous definition is here
typedef int A_MPI_Keyval;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:980:13: warning: redefinition of typedef 'R_MPI_Keyval' is a C11 feature [-Wtypedef-redefinition]
typedef int R_MPI_Keyval;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.h:282:13: note: previous definition is here
typedef int R_MPI_Keyval;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:981:13: warning: redefinition of typedef 'A_MPI_Error' is a C11 feature [-Wtypedef-redefinition]
typedef int A_MPI_Error;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.h:283:13: note: previous definition is here
typedef int A_MPI_Error;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:982:13: warning: redefinition of typedef 'R_MPI_Error' is a C11 feature [-Wtypedef-redefinition]
typedef int R_MPI_Error;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.h:284:13: note: previous definition is here
typedef int R_MPI_Error;
            ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:987:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Comm,communicator, MPI_COMM_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:92:1: note: expanded from here
communicator_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:990:24: warning: redefinition of typedef 'R_MPI_Type' is a C11 feature [-Wtypedef-redefinition]
typedef R_MPI_Datatype R_MPI_Type;
                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.h:292:24: note: previous definition is here
typedef R_MPI_Datatype R_MPI_Type;
                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:991:24: warning: redefinition of typedef 'A_MPI_Type' is a C11 feature [-Wtypedef-redefinition]
typedef A_MPI_Datatype A_MPI_Type;
                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.h:293:24: note: previous definition is here
typedef A_MPI_Datatype A_MPI_Type;
                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:992:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Type,datatype, MPI_DATATYPE_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:143:1: note: expanded from here
datatype_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:995:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Errhandler,errhandler, MPI_ERRHANDLER_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:190:1: note: expanded from here
errhandler_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:998:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Op,operation, MPI_OP_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:14:1: note: expanded from here
operation_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1001:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Group,group, MPI_GROUP_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:44:1: note: expanded from here
group_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1004:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Win,win, MPI_WIN_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:35:1: note: expanded from here
win_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1007:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Message,message, MPI_MESSAGE_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:302:1: note: expanded from here
message_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1010:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPT_NO_FORTRAN(MPI_T_enum, t_enum, MPI_T_ENUM_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:168:20: note: expanded from macro 'HASHTABLE_NO_OPT_NO_FORTRAN'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:8:1: note: expanded from here
t_enum_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1013:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPT_NO_FORTRAN(MPI_T_cvar_handle, cvar_handle, MPI_T_CVAR_HANDLE_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:168:20: note: expanded from macro 'HASHTABLE_NO_OPT_NO_FORTRAN'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:189:1: note: expanded from here
cvar_handle_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1016:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPT_NO_FORTRAN(MPI_T_pvar_handle, pvar_handle, MPI_T_PVAR_HANDLE_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:168:20: note: expanded from macro 'HASHTABLE_NO_OPT_NO_FORTRAN'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:131:1: note: expanded from here
pvar_handle_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1056:14: error: redefinition of 'request_Lock' with a different type: 'table_lock_t' (aka 'struct pthread_spinlock **') vs 'volatile int *'
table_lock_t request_Lock=&tt;
             ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1027:33: note: previous definition is here
/*table_lock_t*/ volatile int * request_Lock;
                                ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1077:17: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
      lock_init(request_Lock);
                ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:24:40: note: expanded from macro 'lock_init'
#define lock_init(a) pthread_spin_init(a,PTHREAD_PROCESS_PRIVATE)
                                       ^
/usr/include/pthread.h:285:45: note: passing argument to parameter '__spin' here
int             pthread_spin_init(pthread_spinlock_t * __spin, int)
                                                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1152:10: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    lock(request_Lock);
         ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:25:36: note: expanded from macro 'lock'
#define lock(a)  pthread_spin_lock(a)
                                   ^
/usr/include/pthread.h:289:45: note: passing argument to parameter '__spin' here
int             pthread_spin_lock(pthread_spinlock_t * __spin)
                                                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1157:12: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    unlock(request_Lock);
           ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:26:39: note: expanded from macro 'unlock'
#define unlock(a) pthread_spin_unlock(a)
                                      ^
/usr/include/pthread.h:293:47: note: passing argument to parameter '__spin' here
int             pthread_spin_unlock(pthread_spinlock_t * __spin)
                                                         ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1167:10: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    lock(request_Lock);
         ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:25:36: note: expanded from macro 'lock'
#define lock(a)  pthread_spin_lock(a)
                                   ^
/usr/include/pthread.h:289:45: note: passing argument to parameter '__spin' here
int             pthread_spin_lock(pthread_spinlock_t * __spin)
                                                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1172:12: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    unlock(request_Lock);
           ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:26:39: note: expanded from macro 'unlock'
#define unlock(a) pthread_spin_unlock(a)
                                      ^
/usr/include/pthread.h:293:47: note: passing argument to parameter '__spin' here
int             pthread_spin_unlock(pthread_spinlock_t * __spin)
                                                         ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1183:10: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    lock(request_Lock);
         ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:25:36: note: expanded from macro 'lock'
#define lock(a)  pthread_spin_lock(a)
                                   ^
/usr/include/pthread.h:289:45: note: passing argument to parameter '__spin' here
int             pthread_spin_lock(pthread_spinlock_t * __spin)
                                                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1195:12: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    unlock(request_Lock);
           ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:26:39: note: expanded from macro 'unlock'
#define unlock(a) pthread_spin_unlock(a)
                                      ^
/usr/include/pthread.h:293:47: note: passing argument to parameter '__spin' here
int             pthread_spin_unlock(pthread_spinlock_t * __spin)
                                                         ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1202:10: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    lock(request_Lock);
         ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:25:36: note: expanded from macro 'lock'
#define lock(a)  pthread_spin_lock(a)
                                   ^
/usr/include/pthread.h:289:45: note: passing argument to parameter '__spin' here
int             pthread_spin_lock(pthread_spinlock_t * __spin)
                                                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1214:12: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    unlock(request_Lock);
           ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:26:39: note: expanded from macro 'unlock'
#define unlock(a) pthread_spin_unlock(a)
                                      ^
/usr/include/pthread.h:293:47: note: passing argument to parameter '__spin' here
int             pthread_spin_unlock(pthread_spinlock_t * __spin)
                                                         ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1225:10: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    lock(request_Lock);
         ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:25:36: note: expanded from macro 'lock'
#define lock(a)  pthread_spin_lock(a)
                                   ^
/usr/include/pthread.h:289:45: note: passing argument to parameter '__spin' here
int             pthread_spin_lock(pthread_spinlock_t * __spin)
                                                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1237:12: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    unlock(request_Lock);
           ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:26:39: note: expanded from macro 'unlock'
#define unlock(a) pthread_spin_unlock(a)
                                      ^
/usr/include/pthread.h:293:47: note: passing argument to parameter '__spin' here
int             pthread_spin_unlock(pthread_spinlock_t * __spin)
--- src/CMakeFiles/mpi_mod.dir/all ---
--- src/CMakeFiles/mpi_mod.dir/interface/module/mpi_sizeof.f90.o ---
--- src/CMakeFiles/wi4mpi_OMPI.dir/all ---
                                                         ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1246:10: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    lock(request_Lock);
         ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:25:36: note: expanded from macro 'lock'
#define lock(a)  pthread_spin_lock(a)
                                   ^
/usr/include/pthread.h:289:45: note: passing argument to parameter '__spin' here
int             pthread_spin_lock(pthread_spinlock_t * __spin)
                                                       ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1250:12: warning: incompatible pointer types passing 'volatile int *' to parameter of type 'pthread_spinlock_t *' (aka 'struct pthread_spinlock **') [-Wincompatible-pointer-types]
    unlock(request_Lock);
           ^~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/thread_safety.h:26:39: note: expanded from macro 'unlock'
#define unlock(a) pthread_spin_unlock(a)
                                      ^
/usr/include/pthread.h:293:47: note: passing argument to parameter '__spin' here
int             pthread_spin_unlock(pthread_spinlock_t * __spin)
                                                         ^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1258:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_File,file, MPI_FILE_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:119:1: note: expanded from here
file_vLock
^
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:1265:1: error: incompatible integer to pointer conversion initializing 'pthread_spinlock_t' (aka 'struct pthread_spinlock *') with an expression of type 'int' [-Wint-conversion]
HASHTABLE_NO_OPTI(MPI_Info,info, MPI_INFO_NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4/src/common/engine.c:321:20: note: expanded from macro 'HASHTABLE_NO_OPTI'
pthread_spinlock_t varname##_vLock=1;\
                   ^               ~
<scratch space>:143:1: note: expanded from here
info_vLock
^
25 warnings and 13 errors generated.

Configured with: -DWI4MPI_COMPILER=LLVM -DFREEBSD_FC=gfortran12

Version: 3.6.4 clang-15 FreeBSD 13.2

adrien-cotte commented 10 months ago

Hi,

Could you try PR #58 ? @Clement-Fontenaille should have fixed your issue.

Best,

yurivict commented 10 months ago

Now the build fails like this:

/usr/ports/net/wi4mpi/work/wi4mpi-3.6.4-26-g8b969ed/src/common/helper.c:176:41: error: incompatible function pointer types passing 'int (*)(void *)' to parameter of type 'void *(*)(void *)' [-Wincompatible-function-pointer-types]
  pthread_create(&timeout_thread, NULL, &wi4mpi_timeout_main_loop,
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pthread.h:213:50: note: passing argument to parameter here
                    const pthread_attr_t * __restrict, void *(*) (void *),
                                                               ^
kevin-juilly commented 9 months ago

Hello, I set a FreeBSD VM up to progress on this issue without having to do back and forth with you for each change.

I would like to know more about your system. I see you said you used a -DFREEBSD_FC=gfortran12, did you patch the CMakeLists.txt? You say you are using clang-15. Did you install llvm15 using pkg or did you compile your own from the ports? If you compiled it, did you build flang? (I am trying to be the closest to your setup, as far as wi4mpi compilation is concerned).