Discussion:
Compiling SLURM on Solaris 11.2
Jan van der Lugt
2014-09-23 21:53:31 UTC
Permalink
Hi all,

I'm trying to compile SLURM on Solaris 11.2, but I'm having some trouble
disabling certain Linux-specific features, such as everything related to
cgroups. What is the best way to achieve this?

Thanks in advance for your help.

- Jan
Jan van der Lugt
2014-09-30 22:35:37 UTC
Permalink
Hi all,

Does anyone have an idea about this problem? Both version 2.5.7 (which we
use) and version 14.03.8 give me the following error:
xcgroup.c: In function ‘xcgroup_ns_mount’:
xcgroup.c:225:15: error: ‘MS_NOEXEC’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:15: note: each undeclared identifier is reported only once
for each function it appears in
xcgroup.c:225:25: error: ‘MS_NODEV’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:5: warning: passing argument 3 of ‘mount’ makes integer from
pointer without a cast [enabled by default]
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
In file included from xcgroup.c:57:0:
/usr/include/sys/mount.h:56:5: note: expected ‘int’ but argument is of type
‘char *’
int mount(const char *, const char *, int, ...);
^
xcgroup.c: In function ‘xcgroup_lock’:
xcgroup.c:417:21: error: ‘LOCK_EX’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_EX) < 0) {
^
xcgroup.c: In function ‘xcgroup_unlock’:
xcgroup.c:432:21: error: ‘LOCK_UN’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_UN) < 0) {

Thanks in advance for any help.

- Jan
Post by Jan van der Lugt
Hi all,
I'm trying to compile SLURM on Solaris 11.2, but I'm having some trouble
disabling certain Linux-specific features, such as everything related to
cgroups. What is the best way to achieve this?
Thanks in advance for your help.
- Jan
Blomqvist Janne
2014-10-01 05:59:37 UTC
Permalink
Hi,

xcgroup.c (src/slurmd/common/xcgroup.c) handles the Linux-specific cgroups (https://en.wikipedia.org/wiki/Cgroups) stuff. Judging from your error message it appears that the solaris mount() function is different from the Linux one. But it doesn't really matter anyway, since cgroups don't exist on Solaris so mounting a cgroup filesystem is pointless there. I guess the real bug is that there is some missing autotools-foo to not compile/link xcgroups.c on non-Linux platforms (perhaps substituting some dummy no-op xcgroups.c implementation or such?).

--
Janne Blomqvist
________________________________
From: Jan van der Lugt [janlugt-***@public.gmane.org]
Sent: Wednesday, October 01, 2014 1:35
To: slurm-dev
Subject: [slurm-dev] Re: Compiling SLURM on Solaris 11.2

Hi all,

Does anyone have an idea about this problem? Both version 2.5.7 (which we use) and version 14.03.8 give me the following error:
xcgroup.c: In function ‘xcgroup_ns_mount’:
xcgroup.c:225:15: error: ‘MS_NOEXEC’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:15: note: each undeclared identifier is reported only once for each function it appears in
xcgroup.c:225:25: error: ‘MS_NODEV’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:5: warning: passing argument 3 of ‘mount’ makes integer from pointer without a cast [enabled by default]
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
In file included from xcgroup.c:57:0:
/usr/include/sys/mount.h:56:5: note: expected ‘int’ but argument is of type ‘char *’
int mount(const char *, const char *, int, ...);
^
xcgroup.c: In function ‘xcgroup_lock’:
xcgroup.c:417:21: error: ‘LOCK_EX’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_EX) < 0) {
^
xcgroup.c: In function ‘xcgroup_unlock’:
xcgroup.c:432:21: error: ‘LOCK_UN’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_UN) < 0) {

Thanks in advance for any help.

- Jan

On Tue, Sep 23, 2014 at 2:52 PM, Jan van der Lugt <janlugt-***@public.gmane.org<mailto:janlugt-***@public.gmane.org>> wrote:
Hi all,

I'm trying to compile SLURM on Solaris 11.2, but I'm having some trouble disabling certain Linux-specific features, such as everything related to cgroups. What is the best way to achieve this?

Thanks in advance for your help.

- Jan
Jan van der Lugt
2014-10-02 16:51:47 UTC
Permalink
Hi,

Yes, that seems to be the problem. Can someone point me in the right
direction to change the compile scripts? I'm willing to put some effort
into this, but I don't really know where to start.

- Jan
Post by Blomqvist Janne
Hi,
xcgroup.c (src/slurmd/common/xcgroup.c) handles the Linux-specific cgroups
(https://en.wikipedia.org/wiki/Cgroups) stuff. Judging from your error
message it appears that the solaris mount() function is different from the
Linux one. But it doesn't really matter anyway, since cgroups don't exist
on Solaris so mounting a cgroup filesystem is pointless there. I guess the
real bug is that there is some missing autotools-foo to not compile/link
xcgroups.c on non-Linux platforms (perhaps substituting some dummy no-op
xcgroups.c implementation or such?).
--
Janne Blomqvist
------------------------------
*Sent:* Wednesday, October 01, 2014 1:35
*To:* slurm-dev
*Subject:* [slurm-dev] Re: Compiling SLURM on Solaris 11.2
Hi all,
Does anyone have an idea about this problem? Both version 2.5.7 (which
xcgroup.c:225:15: error: ‘MS_NOEXEC’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:15: note: each undeclared identifier is reported only once
for each function it appears in
xcgroup.c:225:25: error: ‘MS_NODEV’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:5: warning: passing argument 3 of ‘mount’ makes integer from
pointer without a cast [enabled by default]
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
/usr/include/sys/mount.h:56:5: note: expected ‘int’ but argument is of
type ‘char *’
int mount(const char *, const char *, int, ...);
^
xcgroup.c:417:21: error: ‘LOCK_EX’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_EX) < 0) {
^
xcgroup.c:432:21: error: ‘LOCK_UN’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_UN) < 0) {
Thanks in advance for any help.
- Jan
Post by Jan van der Lugt
Hi all,
I'm trying to compile SLURM on Solaris 11.2, but I'm having some
trouble disabling certain Linux-specific features, such as everything
related to cgroups. What is the best way to achieve this?
Thanks in advance for your help.
- Jan
Blomqvist Janne
2014-10-03 21:37:44 UTC
Permalink
Hi,

I believe the section below from the automake manual provides hints what ought to be done:

https://www.gnu.org/software/automake/manual/html_node/Conditional-Sources.html

So you'd need to create a xcgroup_dummy.c, and then per the instructions in the link above edit Makefile.am and configure.ac so that xcgroup.c is compiled/linked in only on Linux, otherwise xcgroup_dummy.c is used.

--
Janne Blomqvist
________________________________
From: Jan van der Lugt [janlugt-***@public.gmane.org]
Sent: Thursday, October 02, 2014 19:51
To: slurm-dev
Subject: [slurm-dev] Re: Compiling SLURM on Solaris 11.2

Hi,

Yes, that seems to be the problem. Can someone point me in the right direction to change the compile scripts? I'm willing to put some effort into this, but I don't really know where to start.

- Jan

On Tue, Sep 30, 2014 at 10:59 PM, Blomqvist Janne <janne.blomqvist-***@public.gmane.org<mailto:janne.blomqvist-***@public.gmane.org>> wrote:
Hi,

xcgroup.c (src/slurmd/common/xcgroup.c) handles the Linux-specific cgroups (https://en.wikipedia.org/wiki/Cgroups) stuff. Judging from your error message it appears that the solaris mount() function is different from the Linux one. But it doesn't really matter anyway, since cgroups don't exist on Solaris so mounting a cgroup filesystem is pointless there. I guess the real bug is that there is some missing autotools-foo to not compile/link xcgroups.c on non-Linux platforms (perhaps substituting some dummy no-op xcgroups.c implementation or such?).

--
Janne Blomqvist
________________________________
From: Jan van der Lugt [janlugt-***@public.gmane.org<mailto:janlugt-***@public.gmane.org>]
Sent: Wednesday, October 01, 2014 1:35
To: slurm-dev
Subject: [slurm-dev] Re: Compiling SLURM on Solaris 11.2

Hi all,

Does anyone have an idea about this problem? Both version 2.5.7 (which we use) and version 14.03.8 give me the following error:
xcgroup.c: In function ‘xcgroup_ns_mount’:
xcgroup.c:225:15: error: ‘MS_NOEXEC’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:15: note: each undeclared identifier is reported only once for each function it appears in
xcgroup.c:225:25: error: ‘MS_NODEV’ undeclared (first use in this function)
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
xcgroup.c:225:5: warning: passing argument 3 of ‘mount’ makes integer from pointer without a cast [enabled by default]
MS_NOSUID|MS_NOEXEC|MS_NODEV, options))
^
In file included from xcgroup.c:57:0:
/usr/include/sys/mount.h:56:5: note: expected ‘int’ but argument is of type ‘char *’
int mount(const char *, const char *, int, ...);
^
xcgroup.c: In function ‘xcgroup_lock’:
xcgroup.c:417:21: error: ‘LOCK_EX’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_EX) < 0) {
^
xcgroup.c: In function ‘xcgroup_unlock’:
xcgroup.c:432:21: error: ‘LOCK_UN’ undeclared (first use in this function)
if (flock(cg->fd, LOCK_UN) < 0) {

Thanks in advance for any help.

- Jan

On Tue, Sep 23, 2014 at 2:52 PM, Jan van der Lugt <janlugt-***@public.gmane.org<mailto:janlugt-***@public.gmane.org>> wrote:
Hi all,

I'm trying to compile SLURM on Solaris 11.2, but I'm having some trouble disabling certain Linux-specific features, such as everything related to cgroups. What is the best way to achieve this?

Thanks in advance for your help.

- Jan

Loading...