Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] i.vi.mpi doesn't compile on Windows #841

Open
HuidaeCho opened this issue Dec 16, 2022 · 1 comment
Open

[Bug] i.vi.mpi doesn't compile on Windows #841

HuidaeCho opened this issue Dec 16, 2022 · 1 comment
Labels
bug Something isn't working C Related code is in C grassmods grassmods Windows MS Windows specific

Comments

@HuidaeCho
Copy link
Member

HuidaeCho commented Dec 16, 2022

Name of the addon
i.vi.mpi

Describe the bug
Compiling this module using mingw-w64-x86_64-msmpi fails with this error:

test -d OBJ.x86_64-w64-mingw32 || mkdir -p OBJ.x86_64-w64-mingw32
mpicc  -I/c/OSGeo4W/include -Dsrandom=srand -Drandom=rand -I/c/OSGeo4W/include -I/c/usr/local/src/grass/dist.x86_64-w64-mingw32/include -I/c/usr/local/src/grass/dist.x86_64-w64-mingw32/include  -D_FILE_OFFSET_BITS=64  -DPACKAGE=\""grassmods"\"   -I/c/usr/local/src/grass/dist.x86_64-w64-mingw32/include -I/c/usr/local/src/grass/dist.x86_64-w64-mingw32/include -DRELDIR=\"/c/usr/local/src/grass-addons/src/imagery/i.vi.mpi\" -o OBJ.x86_64-w64-mingw32/main.o -c main.c
main.c: In function 'main':
<command-line>: error: 'grassmods' undeclared (first use in this function)
C:/usr/local/src/grass/dist.x86_64-w64-mingw32/include/grass/glocale.h:10:26: note: in expansion of macro 'PACKAGE'
   10 | #define _(str) G_gettext(PACKAGE,(str))
      |                          ^~~~~~~
main.c:80:23: note: in expansion of macro '_'
   80 |         G_add_keyword(_("vegetation index"));
      |                       ^
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
C:/usr/local/src/grass/dist.x86_64-w64-mingw32/include/grass/glocale.h:10:26: note: in expansion of macro 'PACKAGE'
   10 | #define _(str) G_gettext(PACKAGE,(str))
      |                          ^~~~~~~
main.c:80:23: note: in expansion of macro '_'
   80 |         G_add_keyword(_("vegetation index"));
      |                       ^
make: *** [/c/usr/local/src/grass/include/Make/Compile.make:32: OBJ.x86_64-w64-mingw32/main.o] Error 1

To Reproduce
Steps to reproduce the behavior:

  1. Install https://packages.msys2.org/package/mingw-w64-x86_64-msmpi
  2. Go to src/imagery/i.vi.mpi
  3. Compile
  4. See error

Expected behavior
No errors

Screenshots
If applicable, add screenshots to help explain your problem.

System description (please complete the following information):

  • Operating System: Windows 11
  • GRASS GIS version: main + grass8 branches

Additional context
Add any other context about the problem here.

@HuidaeCho HuidaeCho added bug Something isn't working C Related code is in C labels Dec 16, 2022
@HuidaeCho HuidaeCho changed the title [Bug] i.vi.mpi doesn't compile [Bug] i.vi.mpi doesn't compile on Windows Dec 16, 2022
@HuidaeCho HuidaeCho added the Windows MS Windows specific label Dec 17, 2022
@YannChemin YannChemin added the grassmods grassmods label Aug 23, 2023
@YannChemin
Copy link
Contributor

It looks like the translation macro is not working in Windows, thus bugging on the "_( informative string )". Any dev with a Windows machine can compile and find which mingw dependency is missing, and if it is fixable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working C Related code is in C grassmods grassmods Windows MS Windows specific
Projects
None yet
Development

No branches or pull requests

2 participants