Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation of use-env failed with slurm 22.05 #9

Closed
ysagon opened this issue Jul 1, 2022 · 2 comments
Closed

compilation of use-env failed with slurm 22.05 #9

ysagon opened this issue Jul 1, 2022 · 2 comments

Comments

@ysagon
Copy link

ysagon commented Jul 1, 2022

Hello,

it seems it is not possible anymore to compile use-env.so with slurm 22.05.

(baobab)-[root@gpu010 slurm-spank-plugins] (master)$ make
cc -Wall -ggdb -o renice.o -fPIC -c renice.c
renice.c: In function ‘slurm_spank_task_post_fork’:
renice.c:121:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘pid_t’ [-Wformat=]
     slurm_verbose ("re-nicing task%d pid %ld to %d\n", taskid, pid, prio);
     ^
cc -shared -o renice.so renice.o
cc -Wall -ggdb -o system-safe.o -fPIC -c system-safe.c
cc -shared -o system-safe.so system-safe.o
cc -Wall -ggdb -o iotrace.o -fPIC -c iotrace.c
cc -shared -o iotrace.so iotrace.o
cc -Wall -ggdb -o tmpdir.o -fPIC -c tmpdir.c
tmpdir.c: In function ‘slurm_spank_local_user_init’:
tmpdir.c:60:9: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
         slurm_error ("TMPDIR = \"%s\" too large. Aborting");
         ^
cc -shared -o tmpdir.so tmpdir.o
cc -Wall -ggdb -o auto-affinity.o -fPIC -c auto-affinity.c
In file included from auto-affinity.c:39:0:
lib/list.h:56:23: error: conflicting types for ‘List’
 typedef struct list * List;
                       ^
In file included from auto-affinity.c:36:0:
/usr/include/slurm/slurm.h:1329:24: note: previous declaration of ‘List’ was here
 typedef struct xlist * List;
                        ^
make: *** [auto-affinity.o] Error 1
rm iotrace.o tmpdir.o renice.o system-safe.o

Gcc is from CentOS7.9

(baobab)-[root@gpu010 slurm-spank-plugins] (master)$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@grondo
Copy link
Owner

grondo commented Jul 1, 2022

One of those errors is an actual code bug, and another should be fixed by casting pid_t to long int.

This, however:

lib/list.h:56:23: error: conflicting types for ‘List’

is because of slurm.h polluting its namespace with the export of their internal List implementation.

I think this was fixed in https://github.com/chaos/slurm-spank-plugins, can you try that repo (which is the new upstream)

@ysagon
Copy link
Author

ysagon commented Jul 4, 2022

Hi, many thanks to let me know chaos is the new upstream. The version there compiles without issue. Best

@ysagon ysagon closed this as completed Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants