Discussion:
how to select toolchain in wxWidgets configure
arnholm
2014-01-22 12:44:24 UTC
Permalink
Hi,

I have been using ./configure and make to compile wxWidgets 3.0 on linux
Kubuntu 13.10, it is working fine with standard compilers. I have now
created a Kubuntu 13.10 virtual machine with the intention of cross
compiling to raspberry PI, and have cloned a tool-chain from
https://github.com/raspberrypi/tools and got the basic "hello world"
program to function after cross compiling it.

My question is what do I do to tell wxWidgets ./configure and make on the
Kubuntu machine to use the relevant cross-compilation toolchain for
raspberry pi? What I want to do is obviously cross-compile wxWidgets for
the raspberry pi, and later applications using wxWidgets.

I have looked at configure --help , but it isn't all that clear to me which
parameters control which toolchain to use, unless it is enough to simply
define the environment variable "CXX" to point to the actual
cross-compilation "some-prefix-g++"

Thanks

Carsten Arnholm
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Vadim Zeitlin
2014-01-22 13:03:40 UTC
Permalink
On Wed, 22 Jan 2014 04:44:24 -0800 (PST) arnholm wrote:

a> My question is what do I do to tell wxWidgets ./configure and make on the
a> Kubuntu machine to use the relevant cross-compilation toolchain for
a> raspberry pi?

You should use the usual --host option to cross-compile. I don't know what
is the host string for Raspberry Pi toolchain, but it's the same
"some-prefix" that you have in your "some-prefix-g++".

a> I have looked at configure --help , but it isn't all that clear to me which
a> parameters control which toolchain to use, unless it is enough to simply
a> define the environment variable "CXX" to point to the actual
a> cross-compilation "some-prefix-g++"

This might work too, but you'd have to do it for CC and AR and so on as
well. Using --host is better and simpler.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
arnholm
2014-01-23 08:48:10 UTC
Permalink
Post by Vadim Zeitlin
You should use the usual --host option to cross-compile. I don't know
what
Post by Vadim Zeitlin
is the host string for Raspberry Pi toolchain, but it's the same
"some-prefix" that you have in your "some-prefix-g++".
Thank you! I have tried it and it works. I ran into other problems, but
those are unrelated to wxWidgets.

Basically, what is needed is that the toolchain must exist in PATH and you
have to specify --host=arm-linux-gnueabihf
<https://github.com/raspberrypi/tools/blob/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-c%2B%2B>for
the toolchain in
https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin

Thanks for your help
Carsten Arnholm
<https://github.com/raspberrypi/tools/blob/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-c%2B%2B>
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Stephan van den Akker
2014-01-22 13:31:07 UTC
Permalink
Hi Arnholm,

Nothing beats an example. When I compile for 32-bit Windows on a
64-bit Linux machine, the compiler name prefix is: i686-w64-mingw32.
For this I use:

../configure --host=i686-w64-mingw32 --build=x86_64-linux

Hope it helps.

Greetings,

Stephan van den Akker
Post by arnholm
Hi,
I have been using ./configure and make to compile wxWidgets 3.0 on linux
Kubuntu 13.10, it is working fine with standard compilers. I have now
created a Kubuntu 13.10 virtual machine with the intention of cross
compiling to raspberry PI, and have cloned a tool-chain from
https://github.com/raspberrypi/tools and got the basic "hello world" program
to function after cross compiling it.
My question is what do I do to tell wxWidgets ./configure and make on the
Kubuntu machine to use the relevant cross-compilation toolchain for
raspberry pi? What I want to do is obviously cross-compile wxWidgets for the
raspberry pi, and later applications using wxWidgets.
I have looked at configure --help , but it isn't all that clear to me which
parameters control which toolchain to use, unless it is enough to simply
define the environment variable "CXX" to point to the actual
cross-compilation "some-prefix-g++"
Thanks
Carsten Arnholm
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
arnholm
2014-01-23 08:53:50 UTC
Permalink
On Wednesday, January 22, 2014 2:31:07 PM UTC+1, Stephan van den Akker
Post by Stephan van den Akker
Hi Arnholm,
Nothing beats an example. When I compile for 32-bit Windows on a
64-bit Linux machine, the compiler name prefix is: i686-w64-mingw32.
../configure --host=i686-w64-mingw32 --build=x86_64-linux
Hi Stephan,

Thank you! I agree, an example is almost always the best way. For the above
to work, the cross-compiler must be in path I guess. Can you explain the
purpose of --build=x86_64-linux? It describes the platform you are building
on, but why is that not obvious?

Best regards
Carsten Arnholm
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Stephan van den Akker
2014-01-23 09:00:09 UTC
Permalink
Hi Arnholm

Sometimes configure scripts compile and run small test programs to see
if the toolset supports certain features or contains certain bugs.
When host != build you tell configure that these test will fail
because the executables are for a different platform.
Post by arnholm
On Wednesday, January 22, 2014 2:31:07 PM UTC+1, Stephan van den Akker
Post by Stephan van den Akker
Hi Arnholm,
Nothing beats an example. When I compile for 32-bit Windows on a
64-bit Linux machine, the compiler name prefix is: i686-w64-mingw32.
../configure --host=i686-w64-mingw32 --build=x86_64-linux
Hi Stephan,
Thank you! I agree, an example is almost always the best way. For the above
to work, the cross-compiler must be in path I guess. Can you explain the
purpose of --build=x86_64-linux? It describes the platform you are building
on, but why is that not obvious?
Best regards
Carsten Arnholm
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Carsten A. Arnholm
2014-01-24 22:09:28 UTC
Permalink
Post by Stephan van den Akker
Hi Arnholm
Sometimes configure scripts compile and run small test programs to see
if the toolset supports certain features or contains certain bugs.
When host != build you tell configure that these test will fail
because the executables are for a different platform.
Thank you, it makes sense.

Carsten Arnholm
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...