Pages: 1
  Print  
Author Topic: Cannot compile the source ("solved")  (Read 7903 times)
Offline (Unknown gender) mistermano
Posted on: April 15, 2019, 09:57:09 am
Member
Joined: Apr 2019
Posts: 5

View Profile
Following the installation guide, this is what I get whenever I run make
Code: [Select]
$ make
make -C shared/protos/
make[1]: Entering directory '/d/enigma/enigma-dev/shared/protos'
which: no grpc_cpp_plugin in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/)
make codegen
make[2]: Entering directory '/d/enigma/enigma-dev/shared/protos'
which: no grpc_cpp_plugin in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/)
mkdir -p codegen/
protoc -I=. -I=/usr/include --cpp_out=codegen/ Action.proto
make[2]: protoc: Command not found
make[2]: *** [Makefile:35: codegen//Action.pb.cc] Error 127
make[2]: Leaving directory '/d/enigma/enigma-dev/shared/protos'
make[1]: *** [Makefile:47: lib] Error 2
make[1]: Leaving directory '/d/enigma/enigma-dev/shared/protos'
make: *** [Makefile:29: libProtocols] Error 2
Searched for "grpc_cpp_plugin" in the forum, found this thread, installed the packages, make still gives the same error. What's going on?
Running on Windows 10, installed msys2 and followed all the steps of updating it before running the stuff in the wiki.

Quick edit: apparently, this is the culprit? https://github.com/grpc/grpc/issues/8774 - How do I work around this? Compile grpc and overwrite stuff in the msys folders?

PS: A bit off topic, but why not leave a link for the Discord channel in the homepage?

Edit2: Ok, I managed to make it work with something i can only see as a stupid oversight. That error above was running with msys-64. With 32, the plugin was found and it worked until it tried to run g++ (make[2]: g++: Command not found). At that failure, I ran make with the 64 again, and things followed without a problem. Seriously, what the fuck??
As a side note, someone should update the wiki to mention doing these things (pacman -Sy mingw-w64-grpc as per the linked thread + running make with msys32 first then with msys64), I doubt i'm the only one who suffered through this (exact same problem on 2 completely different win10 computers, no less).
« Last Edit: April 15, 2019, 12:11:47 pm by mistermano » Logged
Offline (Male) Goombert
Reply #1 Posted on: April 15, 2019, 02:19:07 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Hi mistermano! I'm sorry for the frustration but am glad you at least managed to get past it. This is going to sound awful, but I don't yet have an explanation for this. This is all relatively new stuff we've built and added (the protocol buffers being moved into the compiler). I do recall when we first got started there was a problem finding that GRPC plugin for me on Windows too. However, nobody else has reported your issue here or had any similar issues, which is why I am confused. One thing I am considering is if you already had MSYS2 installed prior to trying to set up ENIGMA today?

The fact that restarting, trying the 32 bit MSYS, then restarting again and trying the 64 bit MSYS again finally worked is odd too. If you followed the Wiki, G++ would not be found because you likely only installed the 64 bit dependencies and thus the 64 bit G++ would not be found in the 32 bit MSYS by design. What I think actually happened is you missed the crucial step in the MSYS2 installation procedure on their site where you restart MSYS2 and then continue the system upgrade a second time (I know MSYS2 setup is convoluted and messy and why I want to create an automated installer builder for ENIGMA). So I think it would have fixed it if you had just restarted the 64 bit MSYS without bothering with the 32 bit one, I don't think the 32 bit MSYS had anything to do with it.

Regardless, this does seem to be a one off, and you've got past it now. If you can maybe reason through my questions and give some more feedback then maybe we can see if something should be changed. For now, I can't really say whether or not we can improve the makefile or this was just a fluke.

Edit: Also, I should mention a community member has been maintaining an easy setup installation method for future reference.
https://enigma-dev.org/forums/index.php?topic=2954
« Last Edit: April 15, 2019, 02:22:40 pm by Goombert » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) mistermano
Reply #2 Posted on: April 15, 2019, 02:49:29 pm
Member
Joined: Apr 2019
Posts: 5

View Profile
It's possible I only installed specific architecture libraries and didn't notice, which would explain why the plugin only worked with 32, while g++ only worked with 64, at least regarding that

What I think actually happened is you missed the crucial step in the MSYS2 installation procedure on their site where you restart MSYS2 and then continue the system upgrade a second time (I know MSYS2 setup is convoluted and messy and why I want to create an automated installer builder for ENIGMA)
I followed that one to the letter. pacman -Syu, force close the window as the command line states, then open it again, run pacman -Su to finish it proper.
Afterwards, I ran the line for the 64bit packages: pacboy -S git: toolchain:x make: boost:x protobuf:x libpng:x rapidjson:x pugixml:x yaml-cpp:x openal:x dumb:x libvorbis:x libogg:x flac:x mpg123:x libsndfile:x libgme:x sfml:x gtk2:x zlib:x libffi:x box2d:x bullet:x glew:x glm:x alure:x grpc:x - While running msys64. Immediately, running make gave the grpc_cpp_plugin error.

I will also note that I only ran this line after that first problem with grpc
2. install grpc package:
for x86_64:
pacman -Sy mingw-w64-i686-grpc

I should probably test redoing everything I just did, but with msys32 from the beginning and the 32bit packages.

In the machine I managed this fix, I never installed msys before, so it's impossible the reason was any sort of leftovers.

Also, I should mention a community member has been maintaining an easy setup installation method for future reference.
https://enigma-dev.org/forums/index.php?topic=2954
I'll try that one later today on another machine
Logged
Offline (Male) Goombert
Reply #3 Posted on: April 15, 2019, 02:53:42 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
I think I see what the problem might be. Which target did you make? Was it just [snip]make[/snip] or [snip]make all[/snip]? The default installation in the Wiki is not supposed to have people building with GRPC yet (that's for the GRPC server which RGM uses for remote compiling). The default installation is only supposed to have you make the protocol buffers, compiler, and libraries.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) mistermano
Reply #4 Posted on: April 15, 2019, 08:01:34 pm
Member
Joined: Apr 2019
Posts: 5

View Profile
I only ran make. Was I supposed to run make all?

EDIT: Used that collection of .bat and script to install stuff. After running the x64 "install-or-update" ones, I've tried manually running make again. Now, here's something interesting:
Running MSYS2 MSYS, I got the same error as in the OP, which: no grpc_cpp_plugin in (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
Running MSYS2 MinGW 32, I also got that error
Running MSYS2 MinGW 64, the compiling works, both the grpc plugin and g++

So there's also THAT to look out for, whether you're running msys2 or one of the mingw prompts.
« Last Edit: April 15, 2019, 10:17:43 pm by mistermano » Logged
Offline (Male) Goombert
Reply #5 Posted on: April 16, 2019, 01:26:56 am

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
No, you were supposed to run just [snip]make[/snip] like you did correctly. I'll have to look at that soon, I mean by default the setup on the Wiki is not even supposed to have anything to do with GRPC yet. I list the dependency to be installed just so when we announce its readyness, some users will already have it installed. Other than that, you shouldn't be seeing that make error. I'll look into it.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Goombert
Reply #6 Posted on: May 17, 2019, 08:48:12 pm

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 2993

View Profile
Alright, I've sent a pull request which has just been merged into master and should address this. We now filter out the GRPC interfaces, which should stop the makefile from looking for the GRPC plugin.
https://github.com/enigma-dev/enigma-dev/pull/1724

If anybody has more problems please post about them here or on GitHub so we can find them and get them resolved. Cheers! (Y)
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Pages: 1
  Print