Comments (12)
I can confirm that 0.5.16 fails to build:
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_munge/munge/work/munge-0.5.16/src/etc'
Making all in libcommon
make[3]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_munge/munge/work/munge-0.5.16/src/libcommon'
CC libcommon_la-fd.lo
CC libcommon_la-daemonpipe.lo
CC libcommon_la-license.lo
CC libcommon_la-m_msg.lo
CC libcommon_la-log.lo
CC libcommon_la-str.lo
CC libcommon_la-version.lo
GEN munge.7
CCLD libcommon.la
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_munge/munge/work/munge-0.5.16/src/libcommon'
Making all in libmissing
make[3]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_net_munge/munge/work/munge-0.5.16/src/libmissing'
CCLD libmissing.la
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make[3]: *** [libmissing.la] Error 1
from munge.
I found the --disable-silent-rules configure flag, and got more info out of the build:
/Users/bacon/Pkgsrc/pkg/bin/mksh ../../libtool --tag=CC --mode=link clang -O2 -I/Users/bacon/Pkgsrc/pkg/include -L/Users/bacon/Pkgsrc/pkg/lib -o libmissing.la
libtool: link: ar cr .libs/libmissing.a
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
*** [libmissing.la] Error code 1
The problem is, a command like ar cr lib.a
works fine on BSD and Linux, but macOS ar
requires at least one file to be added. So the question on my mind is why is munge building an empty library, and can it just be disabled on platforms where it isn't needed?
Or maybe simplify things by renaming the functions to avoid collisions, e.g. __munge_strlcat, etc. and just use them on all platforms?
FTR, my solution to this exact issue is in libxtend, which has xt_strlcpy(), xt_strlcat(). and
#ifdef __linux__
#define strlcpy(dest,src,len) xt_strlcpy(dest,src,len)
#define strlcat(dest,src,len) xt_strlcat(dest,src,len)
#endif
You might want something more nuanced, but this has always worked fine for me.
from munge.
I had access to a Mac when I added support for LOCAL_PEERCRED
back in 0.5.9 (2010), but it's been over a decade since I've been able to test there.
"libmissing" is a libtool convenience library for functions that are sometimes missing from the systems I test on. Its contents are based on the results of configure
. 0.5.16 removed an old version of getopt
from there since it was causing compilation warnings on newer systems. I'm guessing that removal is why libmissing is now empty on MacOS.
I'll look into this when I have a chance, but it could be a little while before I have time.
from munge.
No rush. I've added the following hack to the pkgsrc package so that libmissing will never be empty. This seemed simpler than removing libmissing from the build altogether. We don't want to leave patches like this in a package for the long-term, but it's functional for now.
--- configure.orig 2024-05-18 22:10:14.716509177 +0000
+++ configure
@@ -16348,7 +16348,7 @@ else $as_nop
esac
fi
-ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+ac_fn_c_check_func "$LINENO" "__munge_strlcpy" "ac_cv_func_strlcpy"
if test "x$ac_cv_func_strlcpy" = xyes
then :
printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
--- src/libmissing/strlcpy.c.orig 2024-05-18 22:08:28.175772831 +0000
+++ src/libmissing/strlcpy.c
@@ -29,7 +29,7 @@ static char *rcsid = "$OpenBSD: strlcpy.
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
size_t
-strlcpy(char *dst, const char *src, size_t siz)
+__munge_strlcpy(char *dst, const char *src, size_t siz)
{
register char *d = dst;
register const char *s = src;
--- src/libmissing/strlcpy.h.orig 2024-05-18 22:09:11.468056157 +0000
+++ src/libmissing/strlcpy.h
@@ -3,7 +3,7 @@
#endif /* HAVE_CONFIG_H */
#if !HAVE_STRLCPY
-size_t strlcpy(char *dst, const char *src, size_t siz);
+size_t __munge_strlcpy(char *dst, const char *src, size_t siz);
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
--- src/munged/munged.c.orig 2024-05-18 22:06:54.452854855 +0000
+++ src/munged/munged.c
@@ -653,7 +653,7 @@ sock_create (conf_t conf)
}
memset (&addr, 0, sizeof (addr));
addr.sun_family = AF_UNIX;
- n = strlcpy (addr.sun_path, conf->socket_name, sizeof (addr.sun_path));
+ n = __munge_strlcpy (addr.sun_path, conf->socket_name, sizeof (addr.sun_path));
if (n >= sizeof (addr.sun_path)) {
log_err (EMUNGE_SNAFU, LOG_ERR,
"Exceeded maximum length of %lu bytes for socket pathname",
--- src/munged/path.c.orig 2024-05-18 21:58:24.907978477 +0000
+++ src/munged/path.c
@@ -81,7 +81,7 @@ path_canonicalize (const char *src, char
return (-1);
}
if ((dst != NULL) && (dstlen > 0)) {
- n = strlcpy (dst, buf, dstlen);
+ n = __munge_strlcpy (dst, buf, dstlen);
}
return (n);
}
@@ -97,7 +97,7 @@ path_dirname (const char *src, char *dst
errno = EINVAL;
return (-1);
}
- if (strlcpy (dst, src, dstlen) >= dstlen) {
+ if (__munge_strlcpy (dst, src, dstlen) >= dstlen) {
errno = ENAMETOOLONG;
return (-1);
}
from munge.
Adding a github action to ensure that munge builds on macOS could help ensure that no regression are happening. I'm interested in having munge to build slurm on the mac to be able to execute srun and other slurm commands
from munge.
I'd be interested in hearing about your SLURM build efforts, given that cgroups is now required for a basic build.
I used to maintain a FreeBSD port and pkgsrc package for SLURM, but abandoned it due to declining portability and increasing complexity.
from munge.
I'm wondering if client commands can be built on macos. I would like to have command such as srun and sattach running. I wonder if it is possible.
from munge.
I don't see why not. The FreeBSD port still exists, but the current version is not fully functional. You could look that the patches as hints to get it building on Mac.
https://cgit.freebsd.org/ports/tree/sysutils/slurm-wlm
from munge.
Sorry for the delay... Things are a bit hectic at the moment so I haven't had much time to work on this yet.
Since the macOS build failure is due to an empty libmissing.la
, I've replaced that with AC_CONFIG_LIBOBJ_DIR
. That should fix it since it removes that library altogether. I've only tested it on a few systems so far (and there's some more cleanup in the build system I'd like to do yet), so it's still a work-in-progress. But I've pushed the issue/141 branch in case someone wants to try it.
@remyleone: Yes, I need to get something set up to check macOS builds, and GitHub Actions has been on my list of things to look at. Good suggestion!
from munge.
It builds cleanly for me on my Mac M1, thanks.
from munge.
It also builds for me :)
from munge.
#142 I'm not sure I got permission to run this CI at the moment
from munge.
Related Issues (20)
- munged: Info: Unauthorized credential for client UID=0 GID=0 inside docker container HOT 6
- question about UID + GID sync between multiple cluster HOT 2
- munged does not ignore SIGHUP when run in foreground HOT 4
- Failed to query password file entry for "user" HOT 2
- Munge Failed - Slurm HOT 2
- slurm: credential data mismatch error, munge 0.5.13 and 0.5.14 interoperability question HOT 3
- Keyfile is insecure: group-writable permissions without sticky bit set on "/etc HOT 1
- RHEL 9 HOT 1
- Location of munge.key HOT 3
- Unauthorized credential for client UID=0 GID=0 HOT 8
- Munge permission denied HOT 6
- package fails to install on ubuntu 22.04 HOT 1
- SuSE sles15.4: small correction for munge.spec HOT 2
- Lot of munged task HOT 1
- Failed to start MUNGE authentication service HOT 5
- Failed to check keyfile "/etc/munge/munge.key": No such file or directory HOT 1
- Start munge in docker container with user remapping HOT 1
- received a hostname length error as part of magic castle deployment HOT 2
- munge not showing up under /run directory HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from munge.