I assume you want to use the Mingw64 toolchain. In which case, start with the mingw64_shell.bat file instead. This files set up environment correctly to use the Mingw64 toolchain out of the box.
You should have more success like this. Checkout the wiki, there is this kind of information about building software in MSYS2.
Regards,
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks for the answer but that's what I did. I am running from the mingw32_shell.bat. As a matter of fact the library (petsc) builds when running from msys2_shell using msys2-gcc but it does not build with the mingw-i686 toolchain...
In fact the error is
petsc-3.5.2/src/sys/utils/ftn-auto/memcf.c:47:34: error: function 'void petscmemcmp_(void, void, size_t, PetscBool, int*)' definition is marked dllimport
as if the dllimport declaration is invalid.
Last edit: Chaffra 2015-06-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry Chaffra, when I read msys2 shell, I thought you were using the msys2_shell.bat script, that confused me.
I would advise creating a PKGBUILD file where the problem is reproducible. This always reduce the burden of other developers who could give you some insights about the problem.
It's possible the package does not compile with mingw out of the box. You may need to patch it a bit. The wiki as some information about it.
Good luck and report the progress here.
Matt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's possible the software has some support for Windows (judging by the presence of dllimport), but it needs some additional parameters to specify the correct build type. Maybe?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to build petsc with the msys2 shell and the mingw toolchain NOT the msys2 gcc compiler. I am getting an error of the type
error: function 'void petscmemmove_(void, void, size_t, int)' definition is marked dllimport
and warnings like
warning: 'PetscErrorCode PetscSegBufferGetSize(PetscSegBuffer, size_t*)' redeclared without dllimport attribute: previous dllimport ignored
Any idea what can cause these errors? Am I better off building with the msys2-gcc?
Last edit: Chaffra 2015-06-09
Hi,
I assume you want to use the Mingw64 toolchain. In which case, start with the
mingw64_shell.bat
file instead. This files set up environment correctly to use the Mingw64 toolchain out of the box.You should have more success like this. Checkout the wiki, there is this kind of information about building software in MSYS2.
Regards,
Matt
Hi Matt,
thanks for the answer but that's what I did. I am running from the mingw32_shell.bat. As a matter of fact the library (petsc) builds when running from msys2_shell using msys2-gcc but it does not build with the mingw-i686 toolchain...
In fact the error is
petsc-3.5.2/src/sys/utils/ftn-auto/memcf.c:47:34: error: function 'void petscmemcmp_(void, void, size_t, PetscBool, int*)' definition is marked dllimport
as if the dllimport declaration is invalid.
Last edit: Chaffra 2015-06-09
Sorry Chaffra, when I read
msys2 shell
, I thought you were using themsys2_shell.bat
script, that confused me.I would advise creating a
PKGBUILD
file where the problem is reproducible. This always reduce the burden of other developers who could give you some insights about the problem.It's possible the package does not compile with mingw out of the box. You may need to patch it a bit. The wiki as some information about it.
Good luck and report the progress here.
Matt
It's possible the software has some support for Windows (judging by the presence of
dllimport
), but it needs some additional parameters to specify the correct build type. Maybe?