| Summary: | undefined reference to `clock_gettime' | ||
|---|---|---|---|
| Product: | Slurm | Reporter: | Kilian Cavalotti <kilian> |
| Component: | slurmctld | Assignee: | Danny Auble <da> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | 4 - Minor Issue | ||
| Priority: | --- | ||
| Version: | 16.05.10 | ||
| Hardware: | Linux | ||
| OS: | Linux | ||
| Site: | Stanford | Alineos Sites: | --- |
| Atos/Eviden Sites: | --- | Confidential Site: | --- |
| Coreweave sites: | --- | Cray Sites: | --- |
| DS9 clusters: | --- | HPCnow Sites: | --- |
| HPE Sites: | --- | IBM Sites: | --- |
| NOAA SIte: | --- | OCF Sites: | --- |
| Recursion Pharma Sites: | --- | SFW Sites: | --- |
| SNIC sites: | --- | Linux Distro: | --- |
| Machine Name: | CLE Version: | ||
| Version Fixed: | 16.05.10-2 17.02.1-2 | Target Release: | --- |
| DevPrio: | --- | Emory-Cloud Sites: | --- |
|
Description
Kilian Cavalotti
2017-03-02 16:46:08 MST
Hey Killian,
Sorry about that. How old is your kernel? This call was introduced in 2.6.
In any case, please go with this patch here...
diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c
index 1ac6ffb..f8bd274 100644
--- a/src/slurmctld/agent.c
+++ b/src/slurmctld/agent.c
@@ -1279,8 +1279,7 @@ static void *_agent_init(void *arg)
while (!slurmctld_config.shutdown_time &&
!pending_mail &&
(pending_wait_time == (uint16_t) NO_VAL)) {
- clock_gettime(CLOCK_REALTIME, &ts);
- ts.tv_sec += 5;
+ ts.tv_sec = time(NULL) + 5;
pthread_cond_timedwait(&pending_cond,&pending_mutex,&ts);
}
if (slurmctld_config.shutdown_time) {
It should get you going again.
Hi Danny, We run CentOS 6.8, on kernel 2.6.32-573.22.1 The weird thing is that if I extract the tarball, run the same ./configure line than the .spec file does, and build, I don't see the error. Makes me feel the issue is likely more in a Makefile or the .spec file itself. Nope, I have to correct what I just wrote: I got the same error when compiling manually. Actually, all that's missing is a "-lrt" flag in the LD options in the slurmctld Makefile: --- src/slurmctld/Makefile.orig 2017-03-02 16:36:25.313295832 -0800 +++ src/slurmctld/Makefile 2017-03-02 16:36:01.239684559 -0800 @@ -277,7 +277,7 @@ DEFS = -DHAVE_CONFIG_H DEPDIR = .deps DLLTOOL = false -DL_LIBS = -ldl +DL_LIBS = -ldl -lrt DSYMUTIL = DUMPBIN = ECHO_C = Ah, thanks for the update. At least it makes sense. For what it is worth I just ran through the rpm build (before the change) and it worked perfectly (16.05 and 17.02) for me on Ubuntu 16.10 and Centos 7, so I guess that extra lib isn't needed going forward. In any case the call isn't that important, so we will just switch it as the patch I have shown commit . It is the way we do it everywhere else so it should work just fine. In any case I just tagged a (16.05.10 and 17.02.1)-2 version and posted it with this change. Please let me know if you have any more issues. (In reply to Danny Auble from comment #4) > For what it is worth I just ran through the rpm build (before the change) > and it worked perfectly (16.05 and 17.02) for me on Ubuntu 16.10 and Centos > 7, so I guess that extra lib isn't needed going forward. In any case the > call isn't that important, so we will just switch it as the patch I have > shown commit . It is the way we do it everywhere else so it should work > just fine. > > In any case I just tagged a (16.05.10 and 17.02.1)-2 version and posted it > with this change. Please let me know if you have any more issues. Great! Grabbed the patch, compiled and installed. All is good so far. Thanks! |