[MacPorts] #51451: gnutls @3.4.12: build fails on 10.6, undefined symbol strndup.
MacPorts
noreply at macports.org
Fri May 20 10:41:22 PDT 2016
#51451: gnutls @3.4.12: build fails on 10.6, undefined symbol strndup.
----------------------+--------------------
Reporter: devans@… | Owner: mps@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: gnutls
----------------------+--------------------
Build fails as follows on 10.6:
{{{
/bin/sh ../libtool --tag=CC --mode=link /usr/bin/gcc-4.2 -W -Wabi
-Waddress -Wall -Wattributes -Wbad-function-cast -Wcast-align -Wchar-
subscripts -Wcomment -Wcomments -Wdeprecated -Wdeprecated-declarations
-Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wextra
-Wformat-extra-args -Wformat-security -Wformat-zero-length -Wimplicit
-Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-
pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations
-Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-prototypes
-Wmultichar -Wnested-externs -Wnonnull -Wold-style-definition -Woverflow
-Woverride-init -Wpacked -Wparentheses -Wpointer-arith -Wpointer-sign
-Wpointer-to-int-cast -Wpragmas -Wreturn-type -Wsequence-point -Wshadow
-Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wtrigraphs -Wuninitialized
-Wunknown-pragmas -Wunsafe-loop-optimizations -Wunused -Wunused-function
-Wunused-label -Wunused-macros -Wunused-parameter -Wunused-value -Wunused-
variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings
-Wnormalized=nfc -Wno-missing-field-initializers -Wno-missing-field-
initializers -Wno-format-y2k -Wno-unused-value -Wno-unused-parameter -Wno-
stack-protector -Wno-int-to-pointer-cast -fdiagnostics-show-option -pipe
-Os -arch x86_64 -module -no-undefined -avoid-version -L/opt/local/lib
-Wl,-headerpad_max_install_names -arch x86_64 -o libpkcs11mock1.la -rpath
/opt/local/lib/gnutls pkcs11/pkcs11-mock.lo -lintl
libtool: warning: '-no-install' is ignored for x86_64-apple-darwin10
libtool: warning: assuming '-no-fast-install' instead
libtool: link: ar cru .libs/libutils.a .libs/utils.o
libtool: link: ranlib .libs/libutils.a
libtool: link: ( cd ".libs" && rm -f "libutils.la" && ln -s
"../libutils.la" "libutils.la" )
libtool: link: /usr/bin/gcc-4.2 -o .libs/libpkcs11mock1.so -bundle
pkcs11/.libs/pkcs11-mock.o -L/opt/local/lib /opt/local/lib/libintl.dylib
-Os -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64
Undefined symbols:
"_strndup", referenced from:
_C_FindObjectsInit in pkcs11-mock.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [libpkcs11mock1.la] Error 1
make[3]: Leaving directory
`/opt/local/var/macports/build/_opt_mports_dports_devel_gnutls/gnutls/work/gnutls-3.4.12/tests'
}}}
This is a common error on 10.6 -- strndup was not introduced to OS X until
10.7. A typical fix is to provide a static replacement function that is
only used on 10.6 or earlier.
See
[https://trac.macports.org/browser/trunk/dports/multimedia/libmms/files/strndup.patch?rev=147056
this patch in libmms] for one way to accomplish this.
Needless to say this blocks the build on 10.6 of any port that depends on
gnutls.
--
Ticket URL: <https://trac.macports.org/ticket/51451>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list