Compiling gRPC using MSYS2/Mingw32 - c++

I've come across an issue whilst trying to compile the latest branch of grpc under MSYS2, using mingw64 as suggested by the official installation guide.
The latest gcc for msys2 is 5.2.0, which isn't exactly on good terms with grpc. Still, downgrading to 4.9.1 helped a bit. Through a lot of manual editing of the makefile and a couple C headers, I was finally able to compile all the dependencies. As far as I can tell, most objects had successfully compiled. However, make keeps failing with the error "no target to make libgrp.dll, required by shared_c"(might not be perfect wording). I end up with botched static libs that are recognized by Qt as lacking symbols.
I would greatly appreciate a reliable compilation guide for grpc, and/or precompiled binaries fit for Qt 5.5 32-bit. I know the project is not too mature just yet, but it looks very promising and I can't wait to work with it!
Many thanks!

You're right that mingw isn't quite a first class citizen for grpc, but it's something we're looking to work on soon. Please file bugs at http://github.com/grpc/grpc/issues for anything you find!
That said, we do test the C codebase against Visual Studio 2013 regularly. I expect C++ to be tested regularly soon, along with VS2015. Could VS2015 be the solution to your problems, given it's now a free download?

Related

Should I compile Qt VS use the online installer?

I compiled Qt5 by myself years ago for a Linux project. These days I'm working on Windows and I install Qt5 using the online installer.
Here and there however I face indications that compiling Qt might led to a better debugging experience, last time I notice it was here.
From that days I was using compiled Qt I don't have any memories of better experience than using the online installer.
So I would like to know more about the possible benefits of using a Qt compiled by myself. Is it worth it? Does it give me any extras compared to the online installer?
TLDR: You can use the online installer for initial development and works great with Qt Creator. Maybe later, you might need to build it yourself.
Qt's Windows installer installs most everything you need - including pre-built reference binaries with the most common options available. Perfect for initial development. There's even an option to install the source with the binaries for easy debugging. Download the symbols too if you do this.
You may want to compile the binaries yourself would be for any of the following reasons:
Build with your own custom patches
In case you need to change a build option like the renderer or openssl linkage.
You have a business requirement to build all code you ship.
At least those are the 3 reasons why we build Qt binaries directly ourselves on my team.

How to set up Apache Thrift with Eclipse && MinGW in Windows?

I need to configure Thrift for Eclipse project with MinGW compiler. I googled for it. I couldn't find proper instructions to do that? Can somebody suggest any suitable way or proper link to do that?
There are several partial answers to this.
The Windows build is made by means of MinGW cross compiler on a Linux machine.
Since (at least) 0.9.2 it is no longer necessary to use MinGW to build the Thrift compiler on a Windows machine.1) Aside from the fact, that you don't need to do that at all, because a precompiled EXE is available on the download pages, there is a nice Visual Studio project to build the Windows Thrift compiler EXE. The project has only two dependencies: Bison and Lexx/Yacc, which are both available elsewhere as precompiled Setups as well.
In either case MinGW is only used to build the compiler. If you want to build the libraries with MinGW, I'm not sure if that even works. This way of doing things is not implemented or supported, simply because nobody needs it.
Which brings us back to the question, why you think you "need" it this way.
1)To my knowledge, numerous severe problems exist with the autotools and all the stuff needed to build Thrift under MinGW on a Windows machine. You will have to patch things, build some from source, spend a lot of time and do some strange things with your file system to make it work. At least that was the case when I stopped using MinGW to build Thrift about two years ago. And even if you get it to work, you still only get the compiler (which you could easily download in a fraction of that time), not the libraries.

Compiling cairo (cairomm) on Windows

I'm trying to compile cairo into a lib file using Mingw. I've downloaded the cairo, cairomm, and pixman source packages, but I can't figure out where to go from here. The INSTALL help file talks about a bunch of scripts that I can't seem to run or even find ('./configure', 'make', 'make install'). Googling the issue is bringing up nothing helpful.
I feel like this is a noobish question to ask. I've only recently started getting into the C++ side of programming (coming from Java/C#), and this is the first time I've had to compile an external library before using it. The shocking lack of explanations on the process makes me wonder if there was some chapter of a tutorial somewhere I was supposed to read that makes this whole process a complete no-brainer.
I think this project isn't supporting building with Mingw.
There are build instructions here for building with Visual Studio (which can be downloaded for free as the Visual Studio Express Edition from MS Website: http://www.visualstudio.com/en-US/products/visual-studio-express-vs
Build instructions here:
http://cairographics.org/end_to_end_build_for_win32/
It's probably possible to make this work for MingW, but you will have to make it work yourself, which may be a bit of a long step for someone who is new to compilers and build scripts in general.

Boost in an MFC app on NT4

I am trying to modify a current MFC application running on Windows NT4 to use boost libraries for ethernet communcications (originally, it used CommX for serial) and general increased performance, effieciency, and clarity of code.
I started out modifying it in VS2010, but I found that I was unable to produce a valid NT4 app with VS2010. I googled the issue and found that VS2005 was the last version able to create an NT4 app. I got everything to compile in VS2005, but found that I had to change certain #define statements in stdafx.h in order to get the app to run on NT4. However, even after doing that, when I execute the program on NT4, it immediately quits with no error. It doesn't show anything. I even checked the Task Manager processes while executing it. It is like it never executed at all.
I got desperate and tried compiling the app in VS2003, but I got so many errors that I gave that up.
My last attempt was VC6, but again, I got 262 errors and started wondering whether it was even possible for boost to run in VB6 or on an NT4 machine.
Is it even possible to compile and run an MFC app with boost libraries on an NT4 machine? If so, which environment/compiler do I need and how do I configure it to work correctly?
This is a very tight-schedule project, so any (prompt) help would be very appreciated! Thank you!
If you're trying to use VC6 to compile code that uses Boost, you may need an older version of Boost. Try 1.34.1.
You might try using STLport as the standard library implementation instead of the built-in STL that comes with VC6. I'm using boost 1.32 and STLport 4.6.2 successfully in VC6 with an MFC project. I haven't tried moving up to newer versions of boost or STLport, but STLport might be enough to get you going.

Intel Performance Primitive (IPP) runtime error

I have source code that was not written by me, and I cannot contact the author. It is written in C++ and requires libjpeg, boost, and the Intel Performance Primitives.
Compilation was a chore, but after days of problem solving, it compiles. Now, I get the following runtime error: error while loading shared libraries: libippi.so.5.1: cannot open shared object file: No such file or directory. The error occurs immediately regardless of the command line arguments.
I downloaded the trial version of IPP for Ubuntu 9.04. Under /opt/intel/ipp/6.1.2.051/ia32/sharedlib/, I see a bunch of files beginning with lib* and libippi*, including libippi.so.6.1. So I thought I would try to create a link libippi.so.5.1 that points to libippi.so.6.1, but that doesn't work. I tried creating a similar link in the local directory, and that does not work either.
I am not familiar with any of these libraries, so I don't know what else to try. I could not find any solutions on the net or SO. If you could kindly help me fix this error, I would greatly appreciate it. Thank you.
I know its been a while, but theres a solution here that helps with the problem
http://www.w-bremer.de/en/howtos/72-opencv-ubuntu-ipp :)
Looks like the app is compiled against an older version of IPP. Since 6.1.2 is called libippi.so.6.1, it may be as simple installing IPP 5.1.x (though linux library versioning isn't as simple as this.)
If you create a login for the intel non-commercial IPP download area, you can dig around and see if they offer older builds.
Alternatively, doing a quick google search I found this FTP site which seems to have it but note I have not actually downloaded or tried this code, and can not verify if this is a legal mirror or not or if it is the original Intel libraries, you will need to do your own due dilligence before using this code
http://21cma.bao.ac.cn/software/21cma/intel/ipp-5.1.1.005/
Note that to use this older version of IPP in a modern Ubuntu, you may need to get older versions of other libraries it depends on (the requirements are listed in the Release Notes), or even just run it under a chroot of a supported Linux Distro at least to test if it fixes your issue.