14:02:47 tevador: can’t get the asm code to compile for iOS 14:02:50 always syntax issues 14:03:14 https://paste.debian.net/hidden/3eb5553f/ 14:03:19 though I might be doing something wrong 14:19:28 selsta: it looks like you are compiling for ARMv7, but your cmake is configured for x86_64 14:35:11 tevador: I used this: https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html#cross-compiling-for-ios-tvos-or-watchos 14:35:19 can’t figure it out, I will just set the ifdef to macOS only 14:38:52 try to add -DCMAKE_SYSTEM_PROCESSOR=aarch64 14:44:24 looks better now: https://paste.debian.net/hidden/a811b06b/ 14:57:37 yeah, __clear_cache doesn't work on Apple, you should add something like #ifndef APPLE 15:11:02 it compiled now at least 15:15:13 although if Macbooks also start using ARM, they will need some function to flush the cache or JIT won't work 15:15:52 problem is I can’t install it on my phone without xcode 15:16:01 and xcode has issues with the asm syntax again 15:16:06 lol I give up 15:20:30 best chance to test the arm stuff is once someone has an arm mac 15:24:48 why can't you just compile the asm code separately and then link the .o files into the xcode build? 15:27:36 I bet xcode will fail to link it 15:28:03 because it won't have Apple (c) (tm) in the header or something 15:28:35 there's gotta be a binutil that can construct the necessary header, sheesh 15:30:05 still would be interesting to see why xcode fails in the first place. is it trying to build fat binaries, and assemble to some other platform than the asm file was meant for? 15:30:06 I’m sure it is possible, there are monero ios wallets 15:30:55 though frankly, I don't think it's much loss if we drop support for Apple 15:31:23 https://paste.debian.net/hidden/f4ee3b2c/ 15:31:26 even M$ is more open-source friendly these days 15:31:48 same error inside xcode 15:33:18 no.... 15:33:47 I meant, copy the .o files from the asm code built by gcc into the xcode build tree so that it doesn't try to compile/assemble them again 15:34:12 the other possibility is that xcode clang needs a different suffix than ".S" to recognize a file as asm source 15:35:01 or the actual invocation of clang is forcing it to treat that source file as C instead of asm 15:35:22 where did RandomX.xcodeproj come from? 15:35:34 cmake generated it itself? 15:36:27 yes, cmake can generate xcode projects 15:36:45 well, I would invoke that last failed command manually 15:36:57 and drop most of the C-related flags 15:39:27 in particular, "-x c" 15:44:33 hyc: yep, removing -x c seems to work 15:46:04 https://cmake.org/pipermail/cmake/2018-October/068331.html 15:46:26 this talks about explicitly setting the file type, maybe this has to be set to ASM 15:47:05 yes, but as I recall that broke something else 15:47:21 teavdor would know more about it 15:47:32 tevador 15:49:15 ok, nice 15:49:22 I can explicitly set it to assembly inside xcode 15:49:34 now I should be able to run it on my phone 15:51:23 see the git history for CMakeLists.txt and the comment "cheat because cmake and ccache hate each other" 15:52:02 note that there's already a special case for the asm on MSVC, you can probably do something similar for xcode 16:30:10 will look into this later 16:30:32 I also had to manually remove -latomic form the linker flags 16:30:38 for it to compile 16:50:35 > Performance: 1323.39 ms per hash 16:50:36 lol 16:51:05 anything I should test? seems like I can’t use --jit else it will crash 16:51:12 and for --mine mode I don’t have enough RAM 16:53:07 this is on your phone? 16:53:10 yes 16:53:22 I thought we set the proper mmap flags to let it use JIT 16:53:40 afaik JIT is not allowed on iOS 16:53:51 at all? what are they doing with webasm? 16:53:52 iOS forbids JIT by design 16:53:56 unless your phone is jailbroken 16:54:16 you need private entitlements to run JIT and only Apple can use those 16:54:48 selsta: have you figured out how to detect iOS? 16:54:49 sounds like ios is all more trouble than it's worth 16:54:53 we could disable JIT there 16:55:41 what's going to happen when the ARM macbooks are out, and they tell you you can run all your apple software on phone or laptop directly 16:56:01 when only using `--verify`, adding MAP_JIT to mmap does not make a difference 16:56:30 when using with --jit, adding MAP_JIT results in cache allocation failed, without MAP_JIT is crashes with bad access 16:56:48 is this macos or ios? 16:56:50 iOS 16:57:00 what does it do on macos? 16:57:06 adding MAP_JIT? 16:57:11 yes 16:57:34 it allows you to enable hardened runtime with the `com.apple.security.cs.allow-jit` entitlement 16:57:52 without it you have to use `com.apple.security.cs.disable-executable-page-protection` entitlement which is "less secure" 16:58:33 W^X is useless anyways unless you also have some protection against ROP 16:58:44 i.e. injected return addresses on the stack 17:01:09 don't they also do ASLR? 17:02:14 difficult to do anything useful with ROP unless you can find a useful call in the running binary itself 17:02:27 https://developer.apple.com/documentation/security/hardened_runtime 17:10:41 not having __clear_cache() on iOS is probably why it'll crash with JIT anyway 17:11:39 ah right I disabled that 17:14:41 well, there must be a way to clear the cache because safari uses JIT 17:15:54 well, I wrote this for xmrig: https://github.com/xmrig/xmrig/blob/master/src/crypto/randomx/jit_compiler_a64.cpp#L110 17:16:02 but I'm not sure if it works on iOS at all 17:22:12 pointless to pursue it 17:22:25 iOS processes only have 2GB address space, so can never be effective miners 17:23:07 Thread 1: EXC_BAD_ACCESS (code=2, address=0x10607c000) 17:23:18 largest mmap'able region is less than 1GB 17:23:57 that is with sys_icache_invalidate 17:24:44 but yea agree kinda pointless, we will have to wait for arm macs 17:25:23 iOS address space is a recurring problem for LMDB users 17:27:44 funny that the latest iphones still only have 4GB RAM 17:28:27 my phone is 4 or 5 years old lol 17:28:41 don’t even know if it has more than 1 gb ram 17:29:23 ok it has 2gb ram 17:30:49 iPad pro 11 has 6GB woohoo 17:31:00 anybody doing ipad benchmarks? 17:39:47 well at least I was able to run randomx-benchmark on my phone :D just super slow 17:41:49 only in light mode hh 17:42:34 I wonder how iOS wallets do randomx verification 17:42:53 they certainly are faster than 1 hash/s 17:43:09 wallets don't do verification 17:43:10 ? 17:43:16 ah right :D 17:43:38 not sure why I thought that they do block verification 18:02:02 wow, nanopool is #1 now 18:02:33 more cloudnets? 18:03:04 https://xmr.nanopool.org/account/49TdkJrRnMVHGrbJjaknPjRCkvRvCPumRDouTatjo1dTfpsZpKyngxD54MshrWFgfGLwWL5rB33JMHZjs61LnTtcE8WryBM 18:03:06 new one 18:03:12 the other two are still there 18:03:28 I wonder who is paying for all this 18:04:20 if it’s someone abusing free credits then they would have fixed it by now 23:47:19 0.325GH total, 20% of the network