From: Lionel Orry <lionel.orry@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit] czmq: unbreak static linking
Date: Wed, 13 May 2015 07:44:23 +0200 [thread overview]
Message-ID: <CAKAx1ciU57KJKuZoQ+vTT5muE9tTM+kVgKF1wMzOq6D-L6xs4w@mail.gmail.com> (raw)
In-Reply-To: <87617xh2tt.fsf@dell.be.48ers.dk>
Hi,
On Wed, May 13, 2015 at 12:02 AM, Peter Korsgaard <peter@korsgaard.com> wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
> Hi,
>
>>> I agree that it would be better if we could get this kind of fixes
> >> upstream. I don't know how receptive upstream will be as this doesn't
> >> affect "normal people" though.
>
> > Well, upstream zeromq should be able to accept patches making their .pc
> > file more correct.
>
> True.
>
> >> That is arguable correct, but things are a bit more complicated as:
> >>
> >> - libzerozmq is written in C++ and uses libstdc++ but exposes a C api
> >> - czmq is a higher level wrapper also written in C
> >> - Test program (czmq_selftest) is a C program linking against libczmq
> >> (and in term libzeromq)
>
> > Right, but that still doesn't answer whether using gcc to link a
> > C program against a C++ library is correct or not :-)
>
> I believe it is. How are people using E.G. libczmq to know that they
> need to link with g++ just because a library libczmq uses happens to use
> C++?
>
>
> >> > * Or using gcc to link with a C++ library is correct, and in this
> >> > case, libzmq.pc should be fixed to include -lstdc++ in Libs.private.
> >>
> >> While this is correct, it is not directly related to this. Czmq doesn't
> >> use its own .pc file to know how to link the selftest program.
>
> > I'm not talking about fixing the czmq .pc file, but the zeromq one. If
> > zeromq uses C++, then its .pc file should have -lstdc++, no?
>
> Ahh, now I get it. Yes, fixing libzmq.pc to have a Libs.privat: -lstdc++
> should also work.
>
> I'll give it a try.
I agree, the libzmq.pc needs to be fixed. It is not specific to czmq
but to all software components which statically link against libzmq
but are not necessarily written in C++.
I have this issue on other projects and I manually add '-lstdc++'.
>
> czmq seems to be missing a dependency on host-pkgconf though.
>
> --
> Venlig hilsen,
> Peter Korsgaard
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Regards,
Lionel
next prev parent reply other threads:[~2015-05-13 5:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 18:43 [Buildroot] [git commit] czmq: unbreak static linking Peter Korsgaard
2015-05-12 19:00 ` Thomas Petazzoni
2015-05-12 19:30 ` Peter Korsgaard
2015-05-12 20:34 ` Thomas Petazzoni
2015-05-12 22:02 ` Peter Korsgaard
2015-05-13 5:44 ` Lionel Orry [this message]
2015-05-13 7:19 ` Peter Korsgaard
2015-05-13 7:23 ` Thomas Petazzoni
2015-05-13 7:57 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKAx1ciU57KJKuZoQ+vTT5muE9tTM+kVgKF1wMzOq6D-L6xs4w@mail.gmail.com \
--to=lionel.orry@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.