Skip to content
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

Build dfc for arm-linux-androideabi-gcc #15

Open
sebma opened this issue Apr 6, 2017 · 6 comments
Open

Build dfc for arm-linux-androideabi-gcc #15

sebma opened this issue Apr 6, 2017 · 6 comments

Comments

@sebma
Copy link

sebma commented Apr 6, 2017

Hi,

Here is what I get when I try and build dfc for CC=arm-linux-androideabi-gcc :

[ 40%] Building C object CMakeFiles/dfc.dir/src/util.c.o
/home/sebastien/src/dfc/src/util.c: In function 'getttywidth':
/home/sebastien/src/dfc/src/util.c:488:17: error: storage size of 'win' isn't known
/home/sebastien/src/dfc/src/util.c:488:17: warning: unused variable 'win' [-Wunused-variable]
make[2]: *** [CMakeFiles/dfc.dir/src/util.c.o] Error 1
make[1]: *** [CMakeFiles/dfc.dir/all] Error 2
make: *** [all] Error 2

Can you help ?

@rolinh
Copy link
Owner

rolinh commented Apr 6, 2017

Hi,

On which platform are you trying to build this?
struct winsize, which is the type the the win variable, is usually defined in sys/ioctl.h but I know for a fact that it could be defined elsewhere (on Solaris for instance, it is defined in termios.h).
In order to help, I need to know a bit more about the platform/environment on which you are trying to build.

@sebma
Copy link
Author

sebma commented Apr 6, 2017

$ echo $MACHTYPE 
x86_64-pc-linux-gnu

@sebma
Copy link
Author

sebma commented Apr 6, 2017

I'm using Ubuntu 14.04 LTS

@rolinh
Copy link
Owner

rolinh commented Apr 9, 2017

Thanks. I'll create a VM with Ubuntu 14.04 LTS and try to reproduce the issue.

@rolinh
Copy link
Owner

rolinh commented Apr 9, 2017

@sebma In #14, you were trying to build for arm-linux-gnueabi-gcc. I was able to build using the instructions I provided you with. Now, what you really want to do is to build for arm-linux-androideabi-gcc, is that correct?

@rolinh
Copy link
Owner

rolinh commented Apr 9, 2017

So as previously guessed, to cross compile for Android, termios.h needs to be included. However, that is not the only issue: sys/statvfs.h is not defined either. So I can conditionally include sys/vfs.h instead when the platform is Android but I then run into other issues. I guess there is no quick fix for this one (although I did not try to go further) and a bit of work is required to be able to cross-compile dfc for Android. As I really want to release dfc 3.1.0 now, I won't attempt to fix it for this release.
Out of curiosity, what is your end goal with dfc cross-compiled for Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants