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

Cross compile to CORTEXA9 does not complete #936

Closed
davmaz opened this issue Jul 27, 2016 · 10 comments
Closed

Cross compile to CORTEXA9 does not complete #936

davmaz opened this issue Jul 27, 2016 · 10 comments

Comments

@davmaz
Copy link
Contributor

davmaz commented Jul 27, 2016

After make clean, I ran
sudo make BINARY=32 CC=/usr/local/bin/gcc FC=/usr/local/bin/gfortran HOSTCC=gcc TARGET=CORTEXA9

This goes a LONG way forward, but dies on
ar -ru ../libopenblas_cortexa9p-r0.2.19.dev.a samax_k.o samin_k.o smax_k.o smin_k.o isamax_k.o isamin_k.o ismax_k.o ismin_k.o sasum_k.o saxpy_k.o scopy_k.o sdot_k.o sdsdot_k.o dsdot_k.o snrm2_k.o srot_k.o
...
...
zomatcopy_k_rt.o zomatcopy_k_cnc.o zomatcopy_k_rnc.o zomatcopy_k_ctc.o zomatcopy_k_rtc.o zimatcopy_k_cn.o zimatcopy_k_rn.o zimatcopy_k_ct.o zimatcopy_k_rt.o zimatcopy_k_cnc.o zimatcopy_k_rnc.o zimatcopy_k_ctc.o zimatcopy_k_rtc.o zgeadd_k.o zneg_tcopy.o zlaswp_ncopy.o lsame.o scabs1.o dcabs1.o cpuid.o
ar: sgemm_kernel.o: No such file or directory
make[1]: *** [libs] Error 1
make[1]: Leaving directory `/home/dmazzoni/Downloads/OpenBLAS/OpenBLAS-develop/kernel'
make: *** [libs] Error 1

@brada4
Copy link
Contributor

brada4 commented Jul 28, 2016

There shpuld be some error before.
Can you attach full build output?
$ make clean
$ make [your params] 2>&1 >>make.log

@martin-frbg
Copy link
Collaborator

In non-cross compiling, this fault with sgemm_kernel.o appears to come up when the build system is confused about the type and capabilities of the cpu (wrong combination of arguments supplied to make, or running in an emulator that provides an unusual subset of host cpu features to the virtual machine).
What is your build environment here ?

@davmaz
Copy link
Contributor Author

davmaz commented Aug 3, 2016

Hello all -
Thanks for your suggestions and help. I've got OpenBLAS to cross compile using:

make CC=arm-linux-gnueabihf-gcc FC=arm-linux-gnueabihf-gfortran HOSTCC=gcc TARGET=CORTEXA9

Dave


From: Martin Kroeker [notifications@github.com]
Sent: Friday, July 29, 2016 04:03
To: xianyi/OpenBLAS
Cc: davem@ltsnet.net; Author
Subject: Re: [xianyi/OpenBLAS] Cross compile to CORTEXA9 does not complete (#936)

In non-cross compiling, this fault with sgemm_kernel.o appears to come up when the build system is confused about the type and capabilities of the cpu (wrong combination of arguments supplied to make, or running in an emulator that provides an unusual subset of host cpu features to the virtual machine).
What is your build environment here ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/936#issuecomment-236119409, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAgSBoVy191qI3oH9R1wiPaZnVFsoSJzks5qabPLgaJpZM4JWr_h.

@brada4
Copy link
Contributor

brada4 commented Aug 4, 2016

An d who closes this ticket?

@martin-frbg
Copy link
Collaborator

martin-frbg commented Aug 4, 2016

Would it make sense to create a wiki entry out of this (I see there is "how to build for android", but no cross-compiling tip that fits davmaz' case) ?

@davmaz
Copy link
Contributor Author

davmaz commented Aug 4, 2016

Yes, that would be nice. I can outline what I did for everything to work (thanks to you).


From: Martin Kroeker [notifications@github.com]
Sent: Thursday, August 04, 2016 08:54
To: xianyi/OpenBLAS
Cc: davem@ltsnet.net; Author
Subject: Re: [xianyi/OpenBLAS] Cross compile to CORTEXA9 does not complete (#936)

Would it make sense to create a wiki entry out of this (I see there is "how to build for android, but no cross-compiling tip that fits davmaz' case) ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/936#issuecomment-237543867, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAgSBuAzVp4nGJ9hJhWGOOkp6BKJl7Thks5qceEKgaJpZM4JWr_h.

@martin-frbg
Copy link
Collaborator

I believe the wiki is currently open for anyone here to write.
(btw brada4's not so subtle hint refers to the fact that a ticket can only be closed by its creator or by the project owner - xianyi appears to be pretty busy with other things at the moment and there is a slow but steady buildup of resolved but not closed tickets that threatens to hide the really important open problems.)

@davmaz
Copy link
Contributor Author

davmaz commented Aug 4, 2016

These steps worked:
Find all installed packages for the ARM compiler: sudo aptitude search arm-linux-gnueabi
Purge ALL gnueabi versions: sudo apt-get purge --auto-remove gfortran-arm-linux-gnueabi, etc for any "installed"
Install only gnueabihf versions: sudo aptitude install gfortran-arm-linux-gnueabihf (this also installs gnueabihf gcc)
From the OpenBLAS directory: make CC=arm-linux-gnueabihf-gcc FC=arm-linux-gnueabihf-gfortran HOSTCC=gcc TARGET=CORTEXA9
Install the ARM libs: sudo make PREFIX=/usr/local install

@davmaz davmaz closed this as completed Aug 4, 2016
@davmaz
Copy link
Contributor Author

davmaz commented Aug 4, 2016

I put the steps that worked for me in a final comment and closed the issue.
Thanks!


From: Martin Kroeker [notifications@github.com]
Sent: Thursday, August 04, 2016 11:53
To: xianyi/OpenBLAS
Cc: davem@ltsnet.net; Author
Subject: Re: [xianyi/OpenBLAS] Cross compile to CORTEXA9 does not complete (#936)

I believe the wiki is currently open for anyone here to write.
(btw brada4's not so subtle hint refers to the fact that a ticket can only be closed by its creator or by the project owner - xianyi appears to be pretty busy with other things at the moment and there is a slow but steady buildup of resolved but not closed tickets that threatens to hide the really important open problems.)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/936#issuecomment-237596847, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAgSBvjFJoL5ju9TmKRnJkscWMdLN3Utks5qcgrjgaJpZM4JWr_h.

@xianyi
Copy link
Collaborator

xianyi commented Aug 4, 2016

Add an example for cross compiling ARM.
https://github.com/xianyi/OpenBLAS/wiki/User-Manual#compile

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

No branches or pull requests

4 participants