plasma-umass / coz

Coz: Causal Profiling
Other
4.08k stars 159 forks source link

Compilation fails on Debian 10 #162

Open evandanish opened 4 years ago

evandanish commented 4 years ago

Also fails for various other Debian and Ubuntu versions. There's an example failure in the latest (as of writing this) CI log: https://travis-ci.org/github/plasma-umass/coz/jobs/729376675

Appears to be a problem with missing gittid symbols. These are not provided in the version of glibc that I'm using (GNU C Library (Debian GLIBC 2.28-10) stable release version 2.28). The man page states: Note: There is no glibc wrapper for this system call; see NOTES

As a hack, adding the following fixes the issue and it builds successfully:

/* Added this to the following files:
 *    libcoz/profiler.cpp
 *    libcoz/ccutil/timer.h
 *    libcoz/ccutil/.timer.h.swp
 *    libcoz/ccutil/log.h
 *    libcoz/perf.cpp
 */
#ifndef gettid
#define gettid() syscall(SYS_gettid)
#endif

Commit f7b60a68d36f026c4054bdf4c52463b63832fa1b appears to remove syscall wrappers for gettid.

Is debian with glibc supported?

I can try to come up with a PR that supports fedora/debian/ubuntu if needed.

evandanish commented 4 years ago

Apologies, didn't read all of the issues. This is a duplicate of #154 and #155

emeryberger commented 4 years ago

I'd nonetheless welcome a PR!