[slurm-users] Help buidling slurm on OS X High Sierra

George Hartzell hartzell at alerce.com
Sat Jun 23 17:27:07 MDT 2018


Hi All,

I'm trying to build Slurm on a Mac running OS X Sierra (via Spack)

Slurm seems to use some compiler trickery that's specific to gcc to
define the `strong_alias` macro.  If `USE_ALIAS=0` then a simple
replacement is used instead.

On the Mac it ends up using this definition:

```C
#    define strong_alias(name, aliasname) \
     extern void aliasname(int name)
```

so this call from src/common/hostlist.c:

```C
strong_alias(hostlist_copy,		slurm_hostlist_copy);
```

generates something like

```C
extern void slurm_hostlist_copy(int hostlist_copy)
```

But this other macro from rc/common/slurm_xlator.h:

```C
#define	hostlist_copy		slurm_hostlist_copy
```

and this definition from src/common/hostlist.h:

```C
hostlist_t hostlist_copy(const hostlist_t hl);
```

give `hostlist_copy` a different signature.

I see that other folks have mentioned the same/similar problem on the
mailing list but I haven't seen any reply.

There are enough mentions of darwin in the src tree that it seems like
it should work (or has worked).

Am I chasing something hopeless?

g.


[1]: https://www.mail-archive.com/slurm-dev@schedmd.com/msg05675.html
[2]: http://slurm-dev.schedmd.narkive.com/Mc95M1a3/error-compiling-slurm-2-3-1-on-mac-os-x-error-conflicting-types-for-slurm-hostlist-create



More information about the slurm-users mailing list