-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
error: Unsupported architecture #1170
Comments
@karajanyp Did you find a fix for this? I'm also struggling with this error and can't seem to figure it out. |
i have no iOS devices to test this. if anybody can fix this, please send pull req. |
You don't need any iOS device to fix that. The makefile and the script are wrong. here's the fix, see the IS_APPLE comment, i dont think it makes any sense to do things different just because you are an apple, the whole logic can be simplified quite a bit: diff --git a/Makefile b/Makefile
index 8b618817..c03776f2 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ V ?= 0
OS := $(shell uname)
ifeq ($(OS),Darwin)
-LIBARCHS = x86_64
+LIBARCHS ?= x86_64
PREFIX ?= /usr/local
endif
diff --git a/make.sh b/make.sh
index 21c55d73..17d4dcf0 100755
--- a/make.sh
+++ b/make.sh
@@ -57,9 +57,8 @@ build_iOS() {
else
IOS_ARCHS="$1"
fi
- export CC="$IOS_CC"
- export LIBARCHS="$IOS_ARCHS"
- CFLAGS="$IOS_CFLAGS" LDFLAGS="$IOS_LDFLAGS" ${MAKE}
+ # That IS_APPLE logic is wrong but it can break other things in the Makefile
+ CFLAGS="$IOS_CFLAGS" LDFLAGS="$IOS_LDFLAGS" ${MAKE} LIBARCHS="${IOS_ARCHS}" CC="${IOS_CC}" V=1 OS=Darwin IS_APPLE=0
}
install() { |
Can you send pull req, @radare? |
if i do a PR i would like to get rid of the IS_APPLE check which implies a bunch of changes in the Makefile and i'll need more time to understand why those are there and if they break something for someone else. Can you look at this? Otherwise that will just be an ugly quickfix that disables code that looks wrong but ignore its purpose.
… On 22 Jan 2019, at 10:37, Nguyen Anh Quynh ***@***.***> wrote:
Can you send pull req, @radare <https://github.com/radare>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#1170 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AA3-llS73oB9uHSwPy9obHvZ_IRggE70ks5vFtvsgaJpZM4UfY_D>.
|
I got the same issue. |
this should be fixed now with #1354 |
One thing worth mentioning: this fix didn't make to any release yet. It's only in master branch. |
A new release will be out next week. |
It's a long week... |
When I try to build capstone on Mac OS X 10.12.3 (16D30) with the command "./make.sh ios", I get the following errors:
admin:capstone$ ./make.sh ios
CC cs.o
In file included from cs.c:11:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/stdio.h:64:
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/cdefs.h:761:2: error:
Unsupported architecture
#error Unsupported architecture
^
In file included from cs.c:11:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/stdio.h:67:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/_types.h:27:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:33:
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/machine/_types.h:34:2: error:
architecture not supported
#error architecture not supported
^
In file included from cs.c:11:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/stdio.h:67:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/_types.h:27:
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:55:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_blkcnt_t; /* total blocks /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:56:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_blksize_t; / preferred block size /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:57:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_dev_t; / dev_t /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:60:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_gid_t; / [???] process and group IDs /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:61:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_id_t; / [XSI] pid_t, uid_t, or gid_t*/
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:62:9: error:
unknown type name '__uint64_t'
typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:68:9: error:
unknown type name '__darwin_natural_t'
typedef __darwin_natural_t __darwin_mach_port_name_t; / Used by mach /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:70:9: error:
unknown type name '__uint16_t'
typedef __uint16_t __darwin_mode_t; / [???] Some file attributes /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:71:9: error:
unknown type name '__int64_t'
typedef __int64_t __darwin_off_t; / [???] Used for file sizes /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:72:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_pid_t; / [???] process and group IDs /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:73:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_sigset_t; / [???] signal set /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:74:9: error:
unknown type name '__int32_t'
typedef __int32_t __darwin_suseconds_t; / [???] microseconds /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:75:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_uid_t; / [???] user IDs /
^
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types.h:76:9: error:
unknown type name '__uint32_t'
typedef __uint32_t __darwin_useconds_t; / [???] microseconds */
^
In file included from cs.c:11:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/stdio.h:71:
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types/_va_list.h:31:9: error:
unknown type name '__darwin_va_list'; did you mean '__builtin_va_list'?
typedef __darwin_va_list va_list;
^
note: '__builtin_va_list' declared here
In file included from cs.c:11:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/stdio.h:442:
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/_types/_ssize_t.h:30:9: error:
unknown type name '__darwin_ssize_t'
typedef __darwin_ssize_t ssize_t;
^
In file included from cs.c:12:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/stdlib.h:65:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/wait.h:109:
In file included from /Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/sys/signal.h:82:
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/usr/include/machine/signal.h:34:2: error:
architecture not supported
#error architecture not supported
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [cs.o] Error 1
Can anyone help me with this problem?
The text was updated successfully, but these errors were encountered: