What's up with the list?
matej.tyc at gmail.com
Sun Oct 19 03:57:13 PDT 2008
Hello again, :-)
> For cross compiling you, the user, create a XXXX-pkg-config
> wrapper script for every cross compiler you use and stick them
> somewhere on your path. The wrapper sets up a few environement
> variables and then calls the native pkg-config so that it now
> acts in a manner specified by the environment variables.
Maybe those env variables could be changed in the autoconf macro as
> Why? When you are cross compiling $prefix/bin is where your
> cross compiled binaries go. In most cases cross compiled
> binaries will not work on the host you are compiling on.
That's right, I have forgot about that :-) However, cross-compiled
libraries's .pc files are going to be installed in $prefix/lib/pkgconfig
> If you have just cross compiled a wince-arm-pkg-config on an
> i386 Linux host, that wince-arm-pkg-config binary will not run on
> your Linux host.
Now I see what's wrong with it, thanks!
The "cross-compiling pkg-config" thing wasn't a really smart idea.
> > pkg-config is, unfortunatelly, not a standard cross compiler tool.
> Neither is Make. So what?
make is little bit special, since AFAIK it behaves +- the same way on
all platforms. What about trying to make pkg-config a standard cross
compile tool? This could result in the fact that the cross-compiler's
packager would write the script for everybody else...
> Each developer that has set up a cross compiler tool chain has
> probably put those tools in a separate place. Some would have them
> in /usr, some in /usr/local, some in /opt and some in their home
This is actually packager's responsibility.
> That is why everyone needs to set up their own wrapper script and
> that fixing it in one place won't help the vast majority.
> > Without any official guide.
> So document it and submit a patch for the pkg-config docs.
No problem, but before I do that, I would like to find the smartest
solution to this problem.
> > Some people (not only me) do and they can name several different reasons
> > for that.
> You still haven't come up with one concrete problem that cannot
> be fixed in a totally satisfatory way in 10 minutes.
You are right about that. But do you like using tools that you have to
fix first before you can use them?
Anyway, there is a sample problem:
wxWidgets library doesn't use pkg-config:
> We also use --cxxflags (do *NOT* use --cflags with
> wx-config!) but we still need --cflags as well. So while I
> love following the standards myself, I just don't see how
> can we map wx-config options to pkg-config.
> If you *really* have need for this I'd suggest investigating
> it by yourself, possibly asking pkg-config developers about
> how are C++ libraries supposed to use it. But currently I
> just have no idea about how is this possible.
> I really don't think anyone uses anything more than
> --cxxflags, --libs, --debug and selection of libs.
> Robin replied to this already, I can add that --unicode is very
> useful, of course. And --cflags is also important if you compile any C
> sources and must use options compatible with wx compilation.
Could anybody explain me why this proposal has been neglected?
What's wrong with it? It doesn't seem to be too hard to implement...
> You haven't come up with a single concrete suggestion for an
> improvement that actually looks like an improvement.
As you can see, I am currently trying to find out whether it is
recognized as a problem in the first place. Now I am trying to explain
why do I think so.
> So, at the moment its just you and me on this list. I feel that I
> am not getting my point across or that you are simply not getting
> my point and we're not making any progress on this issue. I feel
> I'm wasting my time. I am therefore unlikely to add anything more
> to this thread.
No, it's not like that, at least not on my part. Please, don't give up.
Actually, what do the maintainers think of this? Cross compilation with
pkg-config is not working out of the box and you have to post to the
mailing list to get some clues... This is not good at all...
More information about the pkg-config