Mark Weil <[email protected]> writes:

> I downloaded the latest tarball "slurm-spank-plugins-0.23", then I cd 
> into slurm-spank-plugins-0.23/cpuset and ran 'make'.  Errors below.
> I am running slum version 2.3.4 and it is installed in 
> /projects/apps/slurm. The LD_LIBRARY_PATH includes: 
> /projects/apps/slurm/lib, libexec and include.
>
> [root cpuset]# make
> cc  -ggdb -Wall -I../lib  -o nodemap.o -fPIC -c nodemap.c
> cc  -ggdb -Wall -I../lib  -o util.o -fPIC -c util.c
> cc  -ggdb -Wall -I../lib  -o create.o -fPIC -c create.c
> cc  -ggdb -Wall -I../lib  -o log.o -fPIC -c log.c
> cc  -ggdb -Wall -I../lib  -o slurm.o -fPIC -c slurm.c
> bison -d -oconf-parser.c conf-parser.y
> conf-parser.y: conflicts: 5 shift/reduce
> cc  -ggdb -Wall -I../lib  -o conf.o -fPIC -c conf.c
> flex -oconf-lexer.c conf-parser.l
> cc  -ggdb -Wall -I../lib  -o conf-lexer.o -fPIC -c conf-lexer.c
> conf-lexer.c:1261: warning: \u2018input\u2019 defined but not used
> cc  -ggdb -Wall -I../lib  -o conf-parser.o -fPIC -c conf-parser.c
> cc  -ggdb -Wall -I../lib  -o cpuset.o -fPIC -c cpuset.c
> cc -shared -Wl,--version-script=version.map -o cpuset.so nodemap.o 
> util.o create.o log.o slurm.o conf.o conf-lexer.o conf-parser.o 
> ../lib/fd.o ../lib/list.o ../lib/split.o cpuset.o -lslurm -lbitmask 
> -lcpuset -ldl -lfl
> /usr/bin/ld: cannot find -lslurm

You may have to hand edit the Makefile to build against slurm
in non-standard location. Sorry, the Makefile for slurm-spank-plugins
is not too smart.

Try something like the following (Add $(LDFLAGS) to the link line)
then build with

 LDFLAGS=-L/projects/apps/slurm/lib make


diff --git a/cpuset/Makefile b/cpuset/Makefile
index 0586dd6..4dc1a7b 100644
--- a/cpuset/Makefile
+++ b/cpuset/Makefile
@@ -30,7 +30,7 @@ install:
        install -m0644 $(MAN1) $(DESTDIR)$(MANDIR)/man1
 
 $(NAME).so: $(OBJS) $(NAME).o
-       $(CC) $(SHOPTS) -o $(NAME).so $(OBJS) $(NAME).o $(LLIBS)
+       $(CC) $(SHOPTS) -o $(NAME).so $(OBJS) $(NAME).o $(LDFLAGS)
$(LLIBS)
 

BTW, the cpuset.so plugin was mostly meant to be used with
slurm-2.1/2.2. The cpuset support that comes with task/cgroup
plugin in slurm-2.3 may meet your needs (unless you need pam module)

mark

> collect2: ld returned 1 exit status
> make: *** [cpuset.so] Error 1
>
>
> On 05/01/2012 04:09 PM, Mark A. Grondona wrote:
>> Mark Weil<[email protected]>  writes:
>>
>>> I'm getting closer. Can you help with the error below?
>>>
>>> cpuset]# make
>>> cc  -ggdb -Wall -I../lib -o nodemap.o -fPIC -c nodemap.c
>>> cc  -ggdb -Wall -I../lib -o util.o -fPIC -c util.c
>>> cc  -ggdb -Wall -I../lib -o create.o -fPIC -c create.c
>>> cc  -ggdb -Wall -I../lib -o log.o -fPIC -c log.c
>>> cc  -ggdb -Wall -I../lib -o slurm.o -fPIC -c slurm.c
>>> bison -d -oconf-parser.c conf-parser.y
>>> conf-parser.y: conflicts: 5 shift/reduce
>>> cc  -ggdb -Wall -I../lib -o conf.o -fPIC -c conf.c
>>> flex -oconf-lexer.c conf-parser.l
>>> cc  -ggdb -Wall -I../lib -o conf-lexer.o -fPIC -c conf-lexer.c
>>> conf-lexer.c:1261: warning: ‘input’ defined but not used
>>> cc  -ggdb -Wall -I../lib -o conf-parser.o -fPIC -c conf-parser.c
>>> cc  -ggdb -Wall -I../lib -o ../lib/fd.o -fPIC -c ../lib/fd.c
>>> cc  -ggdb -Wall -I../lib -o ../lib/list.o -fPIC -c ../lib/list.c
>>> cc  -ggdb -Wall -I../lib -o ../lib/split.o -fPIC -c ../lib/split.c
>>> cc  -ggdb -Wall -I../lib -o cpuset.o -fPIC -c cpuset.c
>>> cpuset.c: In function ‘query_ncpus_per_node’:
>>> cpuset.c:191: error: ‘job_info_t’ has no member named ‘cpus_per_node’
>>> make: *** [cpuset.o] Error 1
>> slurm-spank-plugins-0.13 won't work with you version of SLURM, sorry.
>>
>> I need upload the latest tarball, or you can clone from the git
>> repo
>>
>>   git clone https://code.google.com/p/slurm-spank-plugins
>>
>> In any event, I'll try to upload the latest by tomorrow.
>>
>> mark
>>
>>> Thank you,
>>> --Mark
>>>
>>>
>>> On 05/01/2012 10:21 AM, Mark A. Grondona wrote:
>>>> Mark Weil<[email protected]>   writes:
>>>>> I'm trying to compile the slurm-spank-plugin. There is no configure
>>>>> script and a 'make' produced the errors below. I copied the
>>>>> <installdir>/include/slurm header files into the upper level directory
>>>>> and that didn't make a difference.
>>>>>
>>>>> slurm-spank-plugins-0.13]# make
>>>>> cc -Wall -ggdb -o renice.o -fPIC -c renice.c
>>>>> renice.c:32:25: error: slurm/spank.h: No such file or directory
>>>> slurm/spank.h is part of the slurm-devel package. Take a look
>>>> at the BuildRequires in slurm-spank-plugins.spec for a list of RPMs
>>>> that are required to build the plugins:
>>>>
>>>>    BuildRequires: slurm-devel bison flex
>>>>
>>>> If you want to build the spank/lua plugin, you will also need
>>>> lua-devel installed, and run with
>>>>
>>>>    make WITH_LUA=1
>>>>
>>>> mark
>>>>
>>>>> renice.c:37: error: expected ‘)’ before numeric constant
>>>>> renice.c:53: error: expected ‘)’ before ‘sp’
>>>>> renice.c:58: error: array type has incomplete element type
>>>>> renice.c:61: error: ‘spank_opt_cb_f’ undeclared here (not in a function)
>>>>> renice.c:61: error: expected ‘}’ before ‘_renice_opt_process’
>>>>> renice.c:63: error: ‘SPANK_OPTIONS_TABLE_END’ undeclared here (not in a
>>>>> function)
>>>>> renice.c:70: error: expected ‘)’ before ‘sp’
>>>>> renice.c:98: error: expected ‘)’ before ‘sp’
>>>>> renice.c: In function ‘_renice_opt_process’:
>>>>> renice.c:134: warning: implicit declaration of function ‘slurm_error’
>>>>> renice.c:143: error: ‘min_prio’ undeclared (first use in this function)
>>>>> renice.c:143: error: (Each undeclared identifier is reported only once
>>>>> renice.c:143: error: for each function it appears in.)
>>>>> renice.c: At top level:
>>>>> renice.c:164: error: expected ‘)’ before ‘sp’
>>>>> make: *** [renice.o] Error 1
>>>>>
>>>>> -- 
>>>>> Thank you,
>>>>> -------------------------------------------------------
>>>>> Mark T. Weil        +   CEE Team
>>>>> 505-284-5217        +   https://computing.sandia.gov/CEE

Reply via email to