Open dewey opened 5 months ago
It's probably an issue with the rdtsc
(x86 assembly instruction -Read Timestamp Counter) not working on Apple Silicon (M1/2/3 etc). I don't maintain the repo anymore but it looks like just removing these lines might work (FYI for Edgio folks). Other uses are gated by #ifdef __arm__
.
Thanks, I tried to blindly fix it without knowing much about it. That seems to do the trick, there's some other instances though where I wasn't able to figure it out so I'll leave that for someone else more familiar with it.
[ 48%] Building CXX object src/core/CMakeFiles/hurlcore.dir/support/time_util.cc.o
/Users/philippdefner/repos/github.com/dewey/hurl/src/core/support/time_util.cc:59:41: error: invalid output constraint '=a' in asm
__asm__ __volatile__ ("rdtsc" : "=a" (l_lo), "=d" (l_hi));
^
1 error generated.
I'll poke the Edgio folks, but what if they changed this line to:
diff --git a/src/core/support/time_util.cc b/src/core/support/time_util.cc
index fd93a34..a1a6070 100644
--- a/src/core/support/time_util.cc
+++ b/src/core/support/time_util.cc
@@ -46,7 +46,7 @@ __thread char g_last_date_str[128];
static __inline__ uint64_t get_rdtsc64()
{
uint64_t tm;
-#if defined(__arm__) && defined(__linux__)
+#if defined(__arm__)
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
tm = ts.tv_sec;
To force everything __arm__
based to not use x86 asm.
Hey, I followed the instructions from the README, but it seems that something isn't working correctly.