Opened 10 days ago

Closed 27 hours ago

#62645 closed defect (fixed)

py*-pykerberos @1.2.1: error: implicit declaration of function 'mempcpy' is invalid in C99

Reported by: cooljeanius (Eric Gallager) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina Cc:
Port: py-pykerberos


All pykerberos ports fail to upgrade for me with an error from -Werror=implicit-function-declaration:

usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/opt/local/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/kerberosgss.c -o build/temp.macosx-11.2-x86_64-3.9/src/kerberosgss.o -I/opt/local/include -DGSSAPI_EXT
src/kerberosgss.c:876:14: error: implicit declaration of function 'mempcpy' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    outloc = mempcpy(outloc, iov[1].buffer.value, iov[1].buffer.length);
src/kerberosgss.c:876:12: warning: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
    outloc = mempcpy(outloc, iov[1].buffer.value, iov[1].buffer.length);
           ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-pykerberos/py39-pykerberos/work/pykerberos-1.2.1" && /opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 --no-user-cfg build -j16 
Exit code: 1
Error: Failed to build py39-pykerberos: command execution failed
DEBUG: Error code: CHILDSTATUS 49636 1

Change History (4)

comment:1 Changed 10 days ago by mf2k (Frank Schima)

Port: py27-pykerberos py36-pykerberos py37-pykerberos py38-pykerberos py39-pykerberos removed

comment:2 Changed 34 hours ago by ryandesign (Ryan Schmidt)

As far as I can find out, mempcpy is not a standard function and it does not exist on macOS. The developers of pykerberos would need to provide an implementation of it. For example there is an implementation of it in gnulib:

Nevertheless, the build succeeds with just a warning when using Xcode 11 or earlier. I don't understand why the build succeeds or where it's getting an implementation of mempcpy from.

I would like to report this problem to the developers of pykerberos so that they can fix it but I cannot figure out where their homepage or bug tracker are located. They are not mentioned in the README or on the pypi page.

What is mentioned in the README is this:

NOTE: this fork of ccs-kerberos is currently on life support mode as Apple has resumed work on upstream. Please try to use instead of this fork if possible.

So perhaps we should switch to that. Perhaps Apple has already fixed the problem in their version. Apple's version is:

At least I do not find any occurrences of mempcpy when I search that repo using the GitHub web site.

I don't find any ports depending on py*-pykerberos so at least switching should not impact any other ports.

comment:3 Changed 34 hours ago by ryandesign (Ryan Schmidt)

Owner: set to ryandesign
Status: newaccepted

Apple's pykerberos 1.3.1 builds fine for me so I'll update to that.

comment:4 Changed 27 hours ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: acceptedclosed

In 2779b12dd91ecf6fc43222a968b412a373b93397/macports-ports (master):

py-pykerberos: Update to 1.3.1

Closes: #62645

Note: See TracTickets for help on using tickets.