Error : clang (8.0) *unknown arch 0xe0* for Ubuntu 18.04

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error : clang (8.0) *unknown arch 0xe0* for Ubuntu 18.04

Nathan Ridge via cfe-dev
Hi ,

Here is the below error, Can you please analyze and provide the solution or suggestion for below problem.

Error : clang (8.0) *unknown arch 0xe0* for Ubuntu 18.04

clang -v
clang version 8.0
Target: amdgcn-unknown-amdhsa
Thread model: posix
InstalledDir: /usr/bin
Found CUDA installation: /usr/local/cuda-10.0, version 10.0

lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:    bionic

$ cat t.c
#include <stdio.h>

int main(int argc, char *argv[])
{
printf("hello world\n");
}

$ clang t.c -o test
In file included from t.c:1:
/usr/include/stdio.h:33:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
         ^~~~~~~~~~
1 error generated.

$ clang t.c -o test  -isystem /usr/lib/llvm-5.0/lib/clang/5.0.1/include/

$ ./test
-bash: ./test: cannot execute binary file: Exec format error

$ file test
test: ELF 64-bit LSB shared object, *unknown arch 0xe0* version 1, dynamically linked, not stripped

 
Thank you.


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Error : clang (8.0) *unknown arch 0xe0* for Ubuntu 18.04

Nathan Ridge via cfe-dev
I don't really have enough information to know for sure, but it looks like your clang was installed for cuda. It is reporting the default target as amdgcn, which is a GPU. So it looks like you're compiling your test program for the GPU then trying to run it on the CPU.

If you want to build CPU code, I would suggest installing a new clang distribution to get a compiler that has the host as its default target.

-Chris

On Jun 20, 2019, at 4:55 AM, Srinivas Kakarla1 via cfe-dev <[hidden email]> wrote:

Hi ,

Here is the below error, Can you please analyze and provide the solution or suggestion for below problem.

Error : clang (8.0) *unknown arch 0xe0* for Ubuntu 18.04

clang -v
clang version 8.0
Target: amdgcn-unknown-amdhsa
Thread model: posix
InstalledDir: /usr/bin
Found CUDA installation: /usr/local/cuda-10.0, version 10.0

lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:    bionic

$ cat t.c
#include <stdio.h>

int main(int argc, char *argv[])
{
printf("hello world\n");
}

$ clang t.c -o test
In file included from t.c:1:
/usr/include/stdio.h:33:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
         ^~~~~~~~~~
1 error generated.

$ clang t.c -o test  -isystem /usr/lib/llvm-5.0/lib/clang/5.0.1/include/

$ ./test
-bash: ./test: cannot execute binary file: Exec format error

$ file test
test: ELF 64-bit LSB shared object, *unknown arch 0xe0* version 1, dynamically linked, not stripped

 
Thank you.


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev