gRPC build for Windows using Mingw(C++)

774 views
Skip to first unread message

maac...@gmail.com

unread,
Jun 19, 2017, 12:50:04 AM6/19/17
to grpc.io
Hi gRPC Group,


I am new to windows application development with mingw , I am trying to build gRPC lib with mingw. But while building i am getting one lib missing error can any one help in this regard.


Package libcares was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcares.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcares' found
Package libcares was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcares.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcares' found
Makefile:14148: *** multiple target patterns.  Stop.


 

Mario Emmenlauer

unread,
Jun 19, 2017, 4:11:06 AM6/19/17
to maac...@gmail.com, grpc.io

Hi,

do you know the MSYS2 distribution for Windows? I built a grpc
package using their Mingw compiler there:
https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-grpc

Personally I find this the easiest way to use grpc on Windows. You
can also get protobuf and lots of other packages.

Cheers,

Mario




On 19.06.2017 06:50, maac...@gmail.com wrote:
> Hi gRPC Group,
>
>
> I am new to windows application development with mingw , I am trying to build gRPC lib with mingw. But while building i am getting one lib missing error can any
> one help in this regard.
>
> /*
> */
>
> /*Package libcares was not found in the pkg-config search path.*/
>
> /*Perhaps you should add the directory containing `libcares.pc'*/
>
> /*to the PKG_CONFIG_PATH environment variable*/
>
> /*No package 'libcares' found*/
>
> /*Package libcares was not found in the pkg-config search path.*/
>
> /*Perhaps you should add the directory containing `libcares.pc'*/
>
> /*to the PKG_CONFIG_PATH environment variable*/
>
> /*No package 'libcares' found*/
>
> /*Makefile:14148: *** multiple target patterns. Stop.*/
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com
> <mailto:grpc-io+u...@googlegroups.com>.
> To post to this group, send email to grp...@googlegroups.com <mailto:grp...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/5cb1f228-fc90-43e0-a5ef-509ad0a363d4%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/5cb1f228-fc90-43e0-a5ef-509ad0a363d4%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.



Viele Gruesse,

Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
Balanstr. 43 mailto: memmenlauer * biodataanalysis.de
D-81669 München http://www.biodataanalysis.de/

maac...@gmail.com

unread,
Jun 19, 2017, 5:17:14 AM6/19/17
to grpc.io, maac...@gmail.com
Thank you Mario, 

I am also using the MSYS only , but while building the gRPC source i am receiving the that error . 

So how can i make up the build and use that grpc package in windows by solving the above those error.

Mario Emmenlauer

unread,
Jun 19, 2017, 5:32:53 AM6/19/17
to maac...@gmail.com, grpc.io

Hi!

Can you post exactly how you try to build the package and the
logs you get? I assume you are not using the MSYS2 makepkg
build script, are you? Did you modify the PKGBUILD?

I do not get this error so its hard for me to be certain. But
it looks like you would be missing libcares. Try installing
mingw-w64-c-ares?

All the best,

Mario



On 19.06.2017 11:17, maac...@gmail.com wrote:
> Thank you Mario,
>
> I am also using the MSYS only , but while building the gRPC source i am receiving the that error .
>
> So how can i make up the build and use that grpc package in windows by solving the above those error.
>
>
>
> On Monday, 19 June 2017 13:41:06 UTC+5:30, Mario Emmenlauer wrote:
>
>
> Hi,
>
> do you know the MSYS2 distribution for Windows? I built a grpc
> package using their Mingw compiler there:
> https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-grpc <https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-grpc>
>
> Personally I find this the easiest way to use grpc on Windows. You
> can also get protobuf and lots of other packages.
>
> Cheers,
>
> Mario
>
>
>
>
> On 19.06.2017 06:50, maac...@gmail.com <javascript:> wrote:
> > Hi gRPC Group,
> >
> >
> > I am new to windows application development with mingw , I am trying to build gRPC lib with mingw. But while building i am getting one lib missing error
> can any
> > one help in this regard.
> >
> > /*
> > */
> >
> > /*Package libcares was not found in the pkg-config search path.*/
> >
> > /*Perhaps you should add the directory containing `libcares.pc'*/
> >
> > /*to the PKG_CONFIG_PATH environment variable*/
> >
> > /*No package 'libcares' found*/
> >
> > /*Package libcares was not found in the pkg-config search path.*/
> >
> > /*Perhaps you should add the directory containing `libcares.pc'*/
> >
> > /*to the PKG_CONFIG_PATH environment variable*/
> >
> > /*No package 'libcares' found*/
> >
> > /*Makefile:14148: *** multiple target patterns. Stop.*/
> >
> >
> >
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "grpc.io <http://grpc.io>" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com <javascript:>
> > <mailto:grpc-io+u...@googlegroups.com <javascript:>>.
> > To post to this group, send email to grp...@googlegroups.com <javascript:> <mailto:grp...@googlegroups.com <javascript:>>.
> > Visit this group at https://groups.google.com/group/grpc-io <https://groups.google.com/group/grpc-io>.
> > <https://groups.google.com/d/msgid/grpc-io/5cb1f228-fc90-43e0-a5ef-509ad0a363d4%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/grpc-io/5cb1f228-fc90-43e0-a5ef-509ad0a363d4%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
>
>
> Viele Gruesse,
>
> Mario Emmenlauer
>
>
> --
> BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
> Balanstr. 43 mailto: memmenlauer * biodataanalysis.de <http://biodataanalysis.de>
> D-81669 München http://www.biodataanalysis.de/ <http://www.biodataanalysis.de/>
>
> --
> You received this message because you are subscribed to the Google Groups "grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com
> <mailto:grpc-io+u...@googlegroups.com>.
> To post to this group, send email to grp...@googlegroups.com <mailto:grp...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/23357a24-7471-4d97-8f88-386405e56b48%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/23357a24-7471-4d97-8f88-386405e56b48%40googlegroups.com?utm_medium=email&utm_source=footer>.

maac...@gmail.com

unread,
Jun 19, 2017, 6:05:18 AM6/19/17
to grpc.io, maac...@gmail.com
yes i am trying with " mingw32-make" from grpc masters folder . which i kept inside MSYS "/home/username" path.

the output which i got 

$ mingw32-make
Package libcares was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcares.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcares' found
Package libcares was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcares.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcares' found

DEPENDENCY ERROR

You are missing system dependencies that are essential to build grpc,
and the third_party directory doesn't have them:

  cares

Installing the development packages for your system will solve
this issue. Please consult INSTALL to get more information.

If you need information about why these tests failed, run:

  make run_dep_checks

mingw32-make: *** [Makefile:942: stop] Error 1

 

maac...@gmail.com

unread,
Jun 19, 2017, 6:12:01 AM6/19/17
to grpc.io, maac...@gmail.com
Mario, 

Can you tell how you build the gRPC for Windows.

Mario Emmenlauer

unread,
Jun 19, 2017, 6:13:35 AM6/19/17
to maac...@gmail.com, grpc.io

Hi,

do you need to build a newer version? Otherwise I highly recommend to
use the mingw-w64-grpc folder from https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-grpc
and build the package with "makepkg-mingw". You can sue something like:
makepkg-mingw --skippgpcheck --syncdeps --needed --cleanbuild

This works well. If you need a newer version, then modify the file
PKGBUILD in that folder, and update the version to a git checkout.

All the best,

Mario



On 19.06.2017 12:05, maac...@gmail.com wrote:
> yes i am trying with " mingw32-make" from grpc masters folder . which i kept inside MSYS "/home/username" path.
>
> the output which i got
>
> */$ mingw32-make/*
> */Package libcares was not found in the pkg-config search path./*
> */Perhaps you should add the directory containing `libcares.pc'/*
> */to the PKG_CONFIG_PATH environment variable/*
> */No package 'libcares' found/*
> */Package libcares was not found in the pkg-config search path./*
> */Perhaps you should add the directory containing `libcares.pc'/*
> */to the PKG_CONFIG_PATH environment variable/*
> */No package 'libcares' found/*
> */
> /*
> */DEPENDENCY ERROR/*
> */
> /*
> */You are missing system dependencies that are essential to build grpc,/*
> */and the third_party directory doesn't have them:/*
> */
> /*
> */ cares/*
> */
> /*
> */Installing the development packages for your system will solve/*
> */this issue. Please consult INSTALL to get more information./*
> */
> /*
> */If you need information about why these tests failed, run:/*
> */
> /*
> */ make run_dep_checks/*
> */
> /*
> */mingw32-make: *** [Makefile:942: stop] Error 1/*
> > > You received this message because you are subscribed to the Google Groups "grpc.io <http://grpc.io> <http://grpc.io>" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com <javascript:>
> > > <mailto:grpc-io+u...@googlegroups.com <javascript:>>.
> > > To post to this group, send email to grp...@googlegroups.com <javascript:> <mailto:grp...@googlegroups.com <javascript:>>.
> > > Visit this group at https://groups.google.com/group/grpc-io <https://groups.google.com/group/grpc-io> <https://groups.google.com/group/grpc-io
> > > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout> <https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>>.
> >
> >
> >
> > Viele Gruesse,
> >
> > Mario Emmenlauer
> >
> >
> > --
> > BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
> > Balanstr. 43 mailto: memmenlauer * biodataanalysis.de <http://biodataanalysis.de> <http://biodataanalysis.de>
> > D-81669 München http://www.biodataanalysis.de/ <http://www.biodataanalysis.de/> <http://www.biodataanalysis.de/
> <http://www.biodataanalysis.de/>>
> >
> > --
> > You received this message because you are subscribed to the Google Groups "grpc.io <http://grpc.io>" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com <javascript:>
> > <mailto:grpc-io+u...@googlegroups.com <javascript:>>.
> > To post to this group, send email to grp...@googlegroups.com <javascript:> <mailto:grp...@googlegroups.com <javascript:>>.
> > Visit this group at https://groups.google.com/group/grpc-io <https://groups.google.com/group/grpc-io>.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/23357a24-7471-4d97-8f88-386405e56b48%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/23357a24-7471-4d97-8f88-386405e56b48%40googlegroups.com>
> > <https://groups.google.com/d/msgid/grpc-io/23357a24-7471-4d97-8f88-386405e56b48%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/grpc-io/23357a24-7471-4d97-8f88-386405e56b48%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> > For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
>
>
>
> Viele Gruesse,
>
> Mario Emmenlauer
>
>
> --
> BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
> Balanstr. 43 mailto: memmenlauer * biodataanalysis.de <http://biodataanalysis.de>
> D-81669 München http://www.biodataanalysis.de/ <http://www.biodataanalysis.de/>
>
> --
> You received this message because you are subscribed to the Google Groups "grpc.io" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com
> <mailto:grpc-io+u...@googlegroups.com>.
> To post to this group, send email to grp...@googlegroups.com <mailto:grp...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/grpc-io.
> To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/3a68bfc3-890e-42f0-b665-4d6ad5038010%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/3a68bfc3-890e-42f0-b665-4d6ad5038010%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mario Emmenlauer

unread,
Jun 19, 2017, 6:17:23 AM6/19/17
to maac...@gmail.com, grpc.io

If you want to learn a bit how MSYS2 packages are usually built,
maybe read about the ARCH Linux build system here first:
https://wiki.archlinux.org/index.php/makepkg

MSYS2 adapted this build system with pacman to Windows. So if you
use makepkg-mingw it will download the sources, make the build,
and produce a binary installer package for you. You can configure
the build in the PKGBUILD file. If you need to add patches, or
you want to build the newest git checkout, you can look at other
PKGBUILD files how to do that.

But if you really need the newest git snapshot, maybe it requires
a bit of fiddling until you get it working. Good luck!

Cheers,

Mario
Reply all
Reply to author
Forward
0 new messages