Issue2910

Title gpgme 1.8 build failure: strdup undeclared on MacOSX Sierra
Priority bug Status chatting
Category gpgme Due Date
Version 1.8.0 ExtLink  (go)
Superseder Nosy List justus, neal, rjh
Assigned To justus Topics macos  (help)

Created on 2017-01-06.14:01:42 by neal, last changed 2017-02-13.09:33:13 by justus.

Messages
msg9783 (view) Author: werner Date: 2017-01-17.10:02:44
FWIW: In GnuPG we have for example this in the configure script
    *-*-hpux*)
        if test -z "$GCC" ; then
            CFLAGS="-Ae -D_HPUX_SOURCE $CFLAGS"
        fi
IF it makes things easier we may add a simlar case for macOS.  But we need to do
this for many packages, I think.
msg9767 (view) Author: justus Date: 2017-01-16.10:10:56
We configure the build with -D_DARWIN_C_SOURCE=900000L on our macOs box.  Not
sure if this is the proper thing to do, and/or if we should just always set that
when we build on Darwin in configure.
msg9719 (view) Author: werner Date: 2017-01-06.18:09:01
We don't see that on our Sierra box.
msg9701 (view) Author: neal Date: 2017-01-06.14:01:42
Copying this issue from the ML so it doesn't get lost.


Build environment: macOS Sierra, XCode 8.1.

quorra:gpgme-1.8.0 rjh$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in src
make[2]: Nothing to be done for `all'.
Making all in tests
Making all in gpg
make[3]: Nothing to be done for `all'.
Making all in gpgsm
make[3]: Nothing to be done for `all'.
Making all in opassuan
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in doc
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[3]: Nothing to be done for `all-am'.
Making all in lang
Making all in cl
make[3]: Nothing to be done for `all'.
Making all in cpp
Making all in src
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -std=c++11
-DHAVE_CONFIG_H -I. -I../../..  -I../../../src -I/usr/local/include
-I/usr/local/include -DBUILDING_GPGMEPP   -g -O2 -MT
keygenerationresult.lo -MD -MP -MF .deps/keygenerationresult.Tpo -c -o
keygenerationresult.lo keygenerationresult.cpp
libtool: compile:  g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../../..
-I../../../src -I/usr/local/include -I/usr/local/include
-DBUILDING_GPGMEPP -g -O2 -MT keygenerationresult.lo -MD -MP -MF
.deps/keygenerationresult.Tpo -c keygenerationresult.cpp  -fno-common
-DPIC -o .libs/keygenerationresult.o
keygenerationresult.cpp:43:23: error: use of undeclared identifier 'strdup'
            res.fpr = strdup(res.fpr);
                      ^
1 error generated.
History
Date User Action Args
2017-02-13 09:33:13justussetassignedto: justus
nosy: + justus
2017-01-17 10:02:44wernersetmessages: + msg9783
2017-01-16 10:10:56justussetmessages: + msg9767
2017-01-06 18:09:12wernersettopic: + macos
2017-01-06 18:09:02wernersetstatus: unread -> chatting
messages: + msg9719
2017-01-06 14:01:42nealcreate