[Rpm-maint] [rpm-software-management/rpm] rpm with ndb fails to build on macOS due to missing "mremap()" (#334)
Neal Gompa (ニール・ゴンパ)
notifications at github.com
Sun Oct 15 18:03:27 UTC 2017
When I attempt to build rpm 4.14 for macOS with the ndb rpmdb backend enabled, it fails to compile due to the Linux-specific [`mremap(2)`](http://man7.org/linux/man-pages/man2/mremap.2.html) syscall missing.
```
depbase=`echo backend/ndb/rpmxdb.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.. -I.. -I../include/ -I../misc -DLOCALEDIR="\"/usr/local/share/locale\"" -DSYSCONFDIR="\"/usr/local/etc\"" -DLOCALSTATEDIR="\"/usr/local/var\"" -DLIBRPMALIAS_FILENAME="\"rpmpopt-4.14.0\"" -DLIBRPMALIAS_EXECPATH="\"/usr/local/bin\"" -I/usr/local/include -I/usr/local/include -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -fno-strict-aliasing -fstack-protector -Wempty-body -DLUA_COMPAT_ALL -DLUA_COMPAT_MODULE -MT backend/ndb/rpmxdb.lo -MD -MP -MF $depbase.Tpo -c -o backend/ndb/rpmxdb.lo backend/ndb/rpmxdb.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: gcc -DHAVE_CONFIG_H -I.. -I.. -I../include/ -I../misc -DLOCALEDIR=\"/usr/local/share/locale\" -DSYSCONFDIR=\"/usr/local/etc\" -DLOCALSTATEDIR=\"/usr/local/var\" -DLIBRPMALIAS_FILENAME=\"rpmpopt-4.14.0\" -DLIBRPMALIAS_EXECPATH=\"/usr/local/bin\" -I/usr/local/include -I/usr/local/include -fPIC -DPIC -D_REENTRANT -Wall -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -fno-strict-aliasing -fstack-protector -Wempty-body -DLUA_COMPAT_ALL -DLUA_COMPAT_MODULE -MT backend/ndb/rpmxdb.lo -MD -MP -MF backend/ndb/.deps/rpmxdb.Tpo -c backend/ndb/rpmxdb.c -fno-common -DPIC -o backend/ndb/.libs/rpmxdb.o
backend/ndb/rpmxdb.c:168:11: warning: implicit declaration of function 'mremap' is invalid in C99 [-Wimplicit-function-declaration]
mapped = mremap(slot->mapped - shift, oldsize, newsize, MREMAP_MAYMOVE);
^
backend/ndb/rpmxdb.c:168:58: error: use of undeclared identifier 'MREMAP_MAYMOVE'
mapped = mremap(slot->mapped - shift, oldsize, newsize, MREMAP_MAYMOVE);
^
backend/ndb/rpmxdb.c:764:65: error: use of undeclared identifier 'MREMAP_MAYMOVE'
newaddr = mremap(xdb->mapped, xdb->mappedlen, newmappedlen, MREMAP_MAYMOVE);
^
1 warning and 2 errors generated.
make[3]: *** [backend/ndb/rpmxdb.lo] Error 1
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/334
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20171015/d7c892b4/attachment.html>
More information about the Rpm-maint
mailing list