Page 1 of 1

Re: Advise on Cross-Compiling Windows Part 2

Posted: Mon Oct 17, 2011 7:31 pm
by Scribe
Hi guys,

I\'ve made a new post on my trials and tribulations of cross-compiling in Windows for an ARM device and hope very much that this post will be of help to the cross-compiling folk (Windows, Linux, Mac) that are out there.

http://blog.quickforge.co.uk/2011/10/cr ... et-device/

You will be able to find my previous posts on this site also.

Cheers

Re: Advise on Cross-Compiling Windows Part 2

Posted: Mon Oct 17, 2011 8:12 pm
by Dietmar
Hi Scribe,
please, can you tell me in some for me understandable sentences, what you are trying to do? Is it something like the Rosetta approach from Apple to make their Power PPC programs run on x86 chipset without any modyfication at nearly the same velocity?
http://news.cnet.com/The-brains-behind- ... 36190.html

I am sure, that XP programs will run very soon on Raspberry Pi :-),
nice to hear from you Dietmar

Re: Advise on Cross-Compiling Windows Part 2

Posted: Mon Oct 17, 2011 8:18 pm
by Scribe
[quote]Quote from Dietmar on October 17, 2011, 21:12
Hi Scribe,
please, can you tell me in some for me understandable sentences, what you are trying to do? Is it something like the Rosetta approach from Apple to make their Power PPC programs run on x86 chipset without any modyfication at nearly the same velocity?
http://news.cnet.com/The-brains-behind- ... 36190.html

I am sure, that XP programs will run very soon on Raspberry Pi :-),
nice to hear from you Dietmar
[/quote]

Not quite along that tangent! Something much more basic.

I am showing how to create a program, designed to run on ARM Linux but using the comfort and power of IDEs and compiling from a Windows PC.

This is because creating a program on the RaspberryPi itself is difficult due to memory and speed limitations.

Cheers

Re: Advise on Cross-Compiling Windows Part 2

Posted: Tue Oct 18, 2011 2:32 pm
by ErvKosch
My best guess is tcc or gcc. Both are good C compilers and Eclipse can be configured to use both. Also there are several cross system GUI libraries out there.

You may want to look at Python since there is talk of the default Linux distro for the unit will boot into a Python shell.

Re: Advise on Cross-Compiling Windows Part 2

Posted: Tue Oct 18, 2011 6:04 pm
by hippy
@ Scribe : I\'m getting the feeling your guide may be a little too advanced for a beginner with these tools like me. That\'s perhaps natural as I know how hard it can be to describe something you\'ve done before to someone who never has, hits problems you may not have yourself.

I\'m still stuck back on the first post, generating Boost libraries. Bootstrap.bat reported it had worked but having modified config-project.jam I get a lot of \"No such file or directory\" errors, warnings or report, and don\'t seem to have any .a or .so files generated. TBH I\'m not sure if it is working or not.

I also couldn\'t figure exactly what you meant by the next step for Wt; \"To create a Code::Blocks project with CMake, open up CMake\".

Not sure what the best way to resolve or work through these problems is but it probably makes for a good dry run before R-Pi hits the shops and we have more people turning up needing help.

Re: Advise on Cross-Compiling Windows Part 2

Posted: Tue Oct 18, 2011 7:04 pm
by Scribe
[quote]Quote from hippy on October 18, 2011, 19:04
@ Scribe : I\'m getting the feeling your guide may be a little too advanced for a beginner with these tools like me. That\'s perhaps natural as I know how hard it can be to describe something you\'ve done before to someone who never has, hits problems you may not have yourself.

I\'m still stuck back on the first post, generating Boost libraries. Bootstrap.bat reported it had worked but having modified config-project.jam I get a lot of \"No such file or directory\" errors, warnings or report, and don\'t seem to have any .a or .so files generated. TBH I\'m not sure if it is working or not.

I also couldn\'t figure exactly what you meant by the next step for Wt; \"To create a Code::Blocks project with CMake, open up CMake\".

Not sure what the best way to resolve or work through these problems is but it probably makes for a good dry run before R-Pi hits the shops and we have more people turning up needing help.[/quote]

Hi hippy,

Can you post me a short segment of these errors? Ideally the first error or so, you can Ctrl+C to break out of the program if it\'s running off your prompt screen.

CMake for windows (perhaps other OS) has a GUI front-end and I mean to open this up http://www.cmake.org/files/v2.8/cmake-2 ... 32-x86.exe.

Post me those messages and I\'ll see what we can do!

Re: Advise on Cross-Compiling Windows Part 2

Posted: Tue Oct 18, 2011 7:16 pm
by hippy
D\'Oh ... think I\'ve found the problem - missing semi-colon at the end of

using gcc : arm : \".......\"

Re: Advise on Cross-Compiling Windows Part 2

Posted: Tue Oct 18, 2011 7:32 pm
by Scribe
Hoho was bout to say seems like it\'s not parsing the file correctly!

Re: Advise on Cross-Compiling Windows Part 2

Posted: Tue Oct 18, 2011 8:30 pm
by hippy
Sod\'s law that you stare at something for hours and as soon as you post the blindingly obvious is spotted !

Now got Boost built, and found cmake-gui.exe but am hitting problems there. Probably just me and I need to re-read your pages but if you see anything obvious ...

I\'ve got everything installed under F:\\R-Pi

[img]http://www.raspberrypi.org/wp-content/u ... -cmake.PNG[/img]

Re: Advise on Cross-Compiling Windows Part 2

Posted: Wed Oct 19, 2011 11:33 am
by Scribe
Sorry didn\'t see the screenshot in the email.

This is because in the codesourcery bin directory (where the compiler is) make is called cs-make, to be safe, just make a copy and rename that copy to make.

Re: Advise on Cross-Compiling Windows Part 2

Posted: Wed Oct 19, 2011 5:33 pm
by hippy
A step back to creating Boost ... I haven\'t been able to get bjam to accept the -fvisibility=hidden options etc.

With cs-make.exe copied to make.exe I seem to be slowly moving in the right direction with CMake but guess I\'m still not really sure what I\'m meant to be doing.

Thanks for all your help and patience ...

[img]http://www.raspberrypi.org/wp-content/u ... -cmake.JPG[/img]

Re: Advise on Cross-Compiling Windows Part 2

Posted: Wed Oct 19, 2011 7:14 pm
by Scribe
Regarding boost, I\'ve updated the blog post to better explain how to use those flags, it\'s misleading.

For your CMake issue, try pointing your CMAKE_FIND_ROOT_PATH to the CodeSourcery bin directory.

Pain in the butt eh?

Cheers

Re: Advise on Cross-Compiling Windows Part 2

Posted: Wed Oct 19, 2011 9:16 pm
by hippy
[quote]Quote from Scribe on October 19, 2011, 20:14
Pain in the butt eh?
[/quote]

I think I\'ve been spoilt by zero-configuration IDE\'s and one-click compilation :-)

Updating project-config,jam didn\'t seem to change anything with Boost and nor altering CMAKE_FIND_ROOT_PATH; same error as before.

We\'ll get there.

Re: Advise on Cross-Compiling Windows Part 2

Posted: Wed Oct 19, 2011 11:19 pm
by Scribe
No you have\'t been, there\'s little reason why we shouldn\'t be consistently at that level of abstraction, we humans slow ourselves down sometimes by being stuck in our ways!

Perhaps produce a small desktop capture video of what you\'re doing, I\'m sure everything will become apparent then.

Re: Advise on Cross-Compiling Windows Part 2

Posted: Thu Oct 20, 2011 9:49 am
by hippy
I suppose it could be considered abstraction but I\'d just call it better integration and packaging. I\'d much rather be able to just use the tools then understand how they work if interested, rather than having to understand the tools before I can use them. I often find such faffing about simply to create a \"Hello World\" program kills enthusiasm for doing that. The end goal is is great when you get there but I\'m sure many throw in the towel before then; I know I have. But anyway, onwards with this journey ...

I\'m not sure a video of me clicking a button and getting an error will really provide more information than saying I do that but I\'ll look at finding some capture software.

Would it be possible to post your project-config.jam and whatever CMake produces or Code::Blocks takes as an input / project file so I can do a comparison and/or better see where I should be heading ?

Also, has anyone else tried setting up this toolchain - Is it just me having problems ?

Re: Advise on Cross-Compiling Windows Part 2

Posted: Wed Oct 26, 2011 11:04 pm
by Scribe
Sorry for taking so long to reply, super busy week!

I\'m not suggesting that you post a video of where you hit the error but of you following the steps of the post, which would be both insightful to myself and a basis for other users.

On another note I\'ve updated the first post with lesson\'s I\'ve learned since in relation to the inclusion of Boost in CMake projects.

Re: Advise on Cross-Compiling Windows Part 2

Posted: Thu Oct 27, 2011 9:36 pm
by hippy
No problem with being tied up doing other things - and I worked out that having no ARM kit I can\'t really do a lot until I get hardware so no great urgency.

I\'ve got gcc compiling simple \"hello world\" programs and I\'m not adverse to using the command line or one of the simpler \"notepad with command execution\" IDE\'s so Wt and Code::Blocks aren\'t essentials at present. I\'ll probably come back to those when I find I need them. But thanks for the help so far anyway.