-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Raspbian image? #21
Comments
Do you mean the sysroot that is pulled in from https://github.com/sdhibit/docker-rpi-raspbian ? I've added an Does that do what you need @aeppert ? |
That certainly helps. Has there been a change in the sysroot though for installing gcc, etc for raspbian? I noticed rpdo, which seems to call the appropriate gcc if I do "rpxc rpdo gcc", however otherwise the sysroot seems to be wrong? |
When you say "raspbian image", are you referring to the cross-compile toolchain? |
Correct. I want to be able to use the raspbian cross-compiler toolchain On Wed, Nov 23, 2016 at 5:18 PM, Stephen Thirlwall <notifications@github.com
|
I made a bunch of changes a while back to make rpxc work properly with full-blown autotools/configure/make projects. I've just realised that's made doing simple things less simple. If you're just trying to cross-compile some of your own code, here's an example.
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
This uses the x64-native cross compiler. The install-raspbian command is more intended for installing somelib-dev type packages as build-time dependencies. You could also create a Makefile like below and then just run
|
Ah perfect. So I was on the right path, but wanted to make sure I wasn't over complicating things myself.
… On Nov 23, 2016, at 5:53 PM, Stephen Thirlwall ***@***.***> wrote:
I made a bunch of changes a while back to make rpxc work properly with full-blown autotools/configure/make projects. I've just realised that's made doing simple things less simple.
If you're just trying to cross-compile some of your own code, here's an example.
Save this as hw.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
Compile this with: rpxc arm-linux-gnueabihf-gcc -o hw hw.c
Copy hw to your raspberry pi and run it.
This uses the x64-native cross compiler. The install-raspbian command is more intended for installing somelib-dev type packages as build-time dependencies.
You could also create a Makefile like below and then just run rpxc make
CC=${CROSS_COMPILE}gcc
hw: hw.c
$(CC) -o hw hw.c
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
One more note - have you generated Raspbian Debian packages via this docker image and the inclusive raspbian image?
… On Nov 23, 2016, at 5:53 PM, Stephen Thirlwall ***@***.***> wrote:
I made a bunch of changes a while back to make rpxc work properly with full-blown autotools/configure/make projects. I've just realised that's made doing simple things less simple.
If you're just trying to cross-compile some of your own code, here's an example.
Save this as hw.c
#include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
Compile this with: rpxc arm-linux-gnueabihf-gcc -o hw hw.c
Copy hw to your raspberry pi and run it.
This uses the x64-native cross compiler. The install-raspbian command is more intended for installing somelib-dev type packages as build-time dependencies.
You could also create a Makefile like below and then just run rpxc make
CC=${CROSS_COMPILE}gcc
hw: hw.c
$(CC) -o hw hw.c
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I haven't. |
Cross-compiler is working appropriately. However, I am failing, painfully, to get the newly built image with the requisite Raspbian libraries for what I am trying to build (I modified the rpxc script to point to my new Docker image too). How do I point the cross-compiler to the sysroot inside the docker image? Failing that, I will just have to build them freestanding, which brings me 180degrees back to the way I use to build cross-compilers anyway. |
Could you make a gist or something of what you're trying to do? |
Just getting back to this after months on another project. Do you have an example exercising the Raspbian packages installed? I absolutely need to link against those and have a host of them installed, including libpcap, as a definitive example I need to link against. My final binary will be hosted on Raspbian and I will end up putting together a .deb for it all. |
Both the axel and qtbase examples link against raspbian packages. https://github.com/sdt/docker-raspberry-pi-cross-compiler/blob/master/example/axel/Dockerfile Do you have a repo or gist or something I could look at? |
The default Raspbian image that is present has grown rather old, especially with regard to repositories underlying it. There needs to be an automated mechanism for updating the image.
The text was updated successfully, but these errors were encountered: