libgcrypt 1.8.1 Build Fails, macOS 10.12.6

TErik Ashfolk aterik at
Sat Sep 2 18:52:12 CEST 2017


libgcrypt 1.8.1 build/compile fails in macOS 10.12.6 Sierra MBA.
libgcrypt 1.8.0 was built fine in same machine.

(sorry, i posted this message also in gnupg-devel, but gcrypt-devel is more appropriate for libgcrypt dev discussion, and i added more info in this message. Gnupg-devel can discuss what is appropriate there or ignore/delete that mesg/post. Thanks).

The "./configure" stage succeeds.
But in "make", warning appears for global.c & gcrypt-testapi.h: case value not in enumerated type 'enum gcry_ctl_cmds'... And ERROR appears for /usr/local/include/pthread.h:286:42: typedef redefinition with different types ('struct pthread_attr_st *' vs '_darwin_pthread_attr_t' ...

Neither "./configire --disable-threads" or "./configure --enable-threads=no" worked/recognized ! :( 

Pth (gnu pthread) native/local builds ok. nPth does not.
And it seems, after i re-build Pth, then other src (which needs it) succeeds in build, otherwise not, (So maybe something often replacing Pth libs?!)

Loaded Pth, nPth using MacPorts, but seems to have no affect. (i avoid using HomeBrew for their data-sharing anti privacy policies). This machine has homebrew, but nothing installed thru it, (i have uninstalled/removed all brew-formulas, as i use their equivalent from MacPorts).

If i load the build related Env Vars (LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, LDFLAGS, PKG_CONFIG_PATH, CPPFLAGS, CFLAGS) which have dir locations of MacPorts & other libs, build-tools (Xcode, Qt, Python, JavaJDK, Android-SDK, etc), etc, then build does not succeed often, so i kept build related Env Vars empty, but compile/build tools seems to be still able to locate their necessary libs/headers without specifying build Env Vars.  btw, only the PATH & a local OPENSSL's env vars are declared, for each bash session.

and, btw, MacPorts' lib/include directories/dirs are different than native local build's lib include dirs.  in env-vars, macports related dirs appears, after local dirs, (and i did not need to use build related env vars for building older gnupg & deps).

afair, i attempt to build in these sequence: libgpg-error, libassuan, nPth/Pth, libksba, libgcrypt, ntbtls, gpgme, gnupg.  (Please SHOW a tree-structure in, displaying, which deps on what, so that users can start build from last/lowest right-most dependency branch/src/lib item  to their left/top item,  & ultimately to the top/root item "gnupg").

gnupg-2.1.23 build succeeded ok, on same 10.12.6 Sierra, mba machine.

let me know if/which info needed.

thanks in advance.

More information about the Gcrypt-devel mailing list