Skip to content

Error when compiling to ARM7 #673

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

Closed
j-bo opened this issue Oct 27, 2015 · 4 comments
Closed

Error when compiling to ARM7 #673

j-bo opened this issue Oct 27, 2015 · 4 comments

Comments

@j-bo
Copy link
Contributor

j-bo commented Oct 27, 2015

When compiling to android arm7 on a linux host I get the following error :

blas_server.c: In function 'blas_thread_init':
blas_server.c:575:16: error: storage size of 'rlim' isn't known
  struct rlimit rlim;
                ^
blas_server.c:578:9: warning: implicit declaration of function 'getrlimit' [-Wimplicit-function-declaration]
         if(0 == getrlimit(RLIMIT_NPROC, &rlim)) {
         ^
blas_server.c:578:27: error: 'RLIMIT_NPROC' undeclared (first use in this function)
         if(0 == getrlimit(RLIMIT_NPROC, &rlim)) {
                           ^
blas_server.c:578:27: note: each undeclared identifier is reported only once for each function it appears in
blas_server.c:575:16: warning: unused variable 'rlim' [-Wunused-variable]
  struct rlimit rlim;
                ^
make[1]: *** [blas_server.o] Erreur 1

Here's how I start the build :

make HOSTCC=gcc CC=arm-linux-androideabi-gcc NO_LAPACK=1 TARGET=ARMV7

I managed to correct the error modifying the file driver/others/blas_server.c from this :

#if defined(OS_LINUX) || defined(OS_NETBSD) || defined(OS_DARWIN)
#include <dlfcn.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/resource.h>
#endif

To this :

#if defined(OS_LINUX) || defined(OS_NETBSD) || defined(OS_DARWIN)
#include <dlfcn.h>
#include <signal.h>
#include <sys/time.h>
#endif
#include <sys/resource.h>

It works but it obviously broke everything on other platforms ! Is there something as a OS_ARM define ?

@martin-frbg
Copy link
Collaborator

There is OS_ANDROID (at least since a11555c) , though I wonder why this issue would not have come up in preparation or testing of that commit ? (But I have no experience with that platform)

@ryobg
Copy link

ryobg commented Dec 18, 2015

Just got similar issue when compiling on FreeBSD. I had to pull out <signal.h> and <sys/resource.h>

@xianyi
Copy link
Collaborator

xianyi commented Dec 18, 2015

@ryobg , sorry. I didn't test it on FreeBSD.

@ryobg
Copy link

ryobg commented Dec 18, 2015

@xianyi, this is the only build error which I encountered. I suppose the FreeBSD macro can just be added next to the rest. Great work & thank you!

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