Opened 22 months ago
Closed 12 months ago
#66670 closed defect (fixed)
android-platform-tools @33.0.3: adb binary uses SSE4.1 opcodes
Reported by: | aeiouaeiouaeiouaeiouaeiouaeiou | Owned by: | judaew (Vadym-Valdis Yudaiev) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | mountainlion | Cc: | |
Port: | android-platform-tools |
Description
(lldb) run Process 47001 launched: '/opt/local/bin/adb' (x86_64) Process 47001 stopped * thread #1: tid = 0x1bcbf, 0x000000010024bbe2 adb`___lldb_unnamed_function2447$$adb + 562, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) frame #0: 0x000000010024bbe2 adb`___lldb_unnamed_function2447$$adb + 562 adb`___lldb_unnamed_function2447$$adb + 562: -> 0x10024bbe2: roundss $0xa, %xmm0, %xmm0 0x10024bbe8: cvttss2si %xmm0, %rdx 0x10024bbed: orq %rcx, %rax 0x10024bbf0: movq %rdx, %rcx
This makes it incompatible with pre-2010 Intel Macs.
Attachments (1)
Change History (9)
comment:1 Changed 22 months ago by aeiouaeiouaeiouaeiouaeiouaeiou
Keywords: | mountainlion added |
---|
comment:2 Changed 22 months ago by jmroot (Joshua Root)
Owner: | set to judaew |
---|---|
Status: | new → assigned |
comment:3 Changed 21 months ago by aeiouaeiouaeiouaeiouaeiouaeiou
comment:4 Changed 13 months ago by aprovera
It appears that Go ticket has been closed and fixed, perhaps this adb issue can then be solved as well?
Alternatively, you could detect whether a system is incompatible and serve an older version of android-platform-tools. The last version that works on my Core 2 Duo machine is 31.0.3_0 (https://github.com/macports/macports-ports/commit/60ddeb47a5b4dbf4d0c77f9078276dadc3c0c461)
Changed 13 months ago by aprovera
Attachment: | android-platform-tools.diff added |
---|
Proposed workaround for machines with no SSE4 support
comment:5 Changed 13 months ago by aprovera
The attached .diff file adds logic to the Portfile to detect SSE4 support, and serves 31.0.3 if it's not supported by the user's CPU. Could be used as a workaround until a way to build the current version for those machines is found.
comment:6 follow-up: 7 Changed 13 months ago by aprovera
I realised my proposed patch may inadvertently serve the old version of the platform-tools on ARM Macs, but I don't have any to test it myself. Can someone chime in?
Also to consider, the (albeit very small) number of i386 Macs. Through trial and error, I've determined the last i386 version of adb is 23.0.1. I'm not sure whether the right way of supporting everyone would be through detection logic as in my proposed patch, or through port subvariants, or what.
comment:7 Changed 13 months ago by aeiouaeiouaeiouaeiouaeiouaeiou
Replying to aprovera:
I realised my proposed patch may inadvertently serve the old version of the platform-tools on ARM Macs, but I don't have any to test it myself. Can someone chime in?
I switched to a laptop with Sandy Bridge CPU a long time ago.
It might make sense to wrap the sysctl test in a configure.build_arch
check so that it will be executed exclusively on x86_64 systems.
comment:8 Changed 12 months ago by aprovera <64255236+aprovera@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
A Google employee confirmed that they use SSE4 by default: https://issuetracker.google.com/issues/269018466
However, I have found that ports in the FreeBSD and Gentoo repositories use forks that support building via CMake:
https://codeberg.org/FreeBSD/freebsd-ports/src/branch/main/devel/android-tools/Makefile
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-util/android-tools/android-tools-33.0.3-r1.ebuild
Gentoo removed the dependency on GoogleTest, but in both repos you need Go to build, which is broken on systems older than High Sierra.