[MacPorts] #60798: gwenhywfar5: Undefined symbols _strndup
MacPorts
noreply at macports.org
Mon Jul 13 04:43:09 UTC 2020
#60798: gwenhywfar5: Undefined symbols _strndup
-----------------------------------------+----------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.2
Resolution: | Keywords: haspatch
Port: gwenhywfar5, legacysupport |
-----------------------------------------+----------------------
Description changed by ryandesign:
Old description:
> [https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/29882/steps
> /install-port/logs/stdio gwenhywfar5 fails to build on 10.6]:
>
> {{{
> /bin/sh ../libtool --tag=CC --mode=link /opt/local/bin/clang-mp-9.0
> -pipe -Os -arch x86_64 -Wall -Wall -Wall -no-undefined -version-info
> 82:0:3 -L/opt/local/lib -Wl,-headerpad_max_install_names
> /opt/local/lib/libMacportsLegacySupport.dylib -arch x86_64 -o
> libgwenhywfar.la -rpath /opt/local/lib binreloc.lo gwenhywfar.lo
> base/libbase.la crypt3/libcrypt3.la crypttoken/libcrypttoken.la
> cryptmsg/libcryptmsg.la sio/libsio.la os/libos.la parser/libparser.la
> html/libgwenhtml.la gui/libgui.la sar/libsar.la
> test_framework/libtestframework.la -lintl -liconv -L/opt/local/lib
> -lgcrypt -lgpg-error -L/opt/local/lib -lgnutls
> libtool: link: /opt/local/bin/clang-mp-9.0 -dynamiclib -o
> .libs/libgwenhywfar.79.dylib .libs/binreloc.o .libs/gwenhywfar.o
> -Wl,-force_load,base/.libs/libbase.a
> -Wl,-force_load,crypt3/.libs/libcrypt3.a
> -Wl,-force_load,crypttoken/.libs/libcrypttoken.a
> -Wl,-force_load,cryptmsg/.libs/libcryptmsg.a
> -Wl,-force_load,sio/.libs/libsio.a -Wl,-force_load,os/.libs/libos.a
> -Wl,-force_load,parser/.libs/libparser.a
> -Wl,-force_load,html/.libs/libgwenhtml.a
> -Wl,-force_load,gui/.libs/libgui.a -Wl,-force_load,sar/.libs/libsar.a
> -Wl,-force_load,test_framework/.libs/libtestframework.a -L/opt/local/lib
> /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib
> /opt/local/lib/libgcrypt.dylib /opt/local/lib/libgpg-error.dylib
> /opt/local/lib/libgnutls.dylib -Os -arch x86_64
> -Wl,-headerpad_max_install_names -arch x86_64 -framework Security
> -framework CoreFoundation -install_name
> /opt/local/lib/libgwenhywfar.79.dylib -compatibility_version 83
> -current_version 83.0 -Wl,-single_module
> Undefined symbols for architecture x86_64:
> "_strndup", referenced from:
> _GWEN_Text_strndup in libparser.a(text.o)
> (maybe you meant: _GWEN_Text_strndup)
> ld: symbol(s) not found for architecture x86_64
> }}}
>
> I already added the legacysupport 1.1 portgroup which should have taken
> care of this but didn't. On the `/bin/sh ../libtool` line we can see that
> /opt/local/lib/libMacportsLegacySupport.dylib is specified. That should
> invoke libtool and it should pass that on to clang when it invokes it but
> on the `libtool: link:` line legacysupport is not mentioned.
>
> Is this fix to the legacysupport 1.1 portgroup the correct fix?
>
> {{{
> Index: legacysupport-1.1.tcl
> ===================================================================
> --- legacysupport-1.1.tcl (revision 173390)
> +++ legacysupport-1.1.tcl (working copy)
> @@ -66,8 +66,8 @@
> depends_lib-delete path:lib/libMacportsLegacySupport.dylib
> :legacy-support
> depends_lib-append path:lib/libMacportsLegacySupport.dylib
> :legacy-support
>
> - configure.ldflags-delete [option legacysupport.library_name]
> - configure.ldflags-append [option legacysupport.library_name]
> + configure.ldflags-delete -Wl,[option
> legacysupport.library_name]
> + configure.ldflags-append -Wl,[option
> legacysupport.library_name]
>
> if {![option compiler.limit_flags]} {
> configure.cppflags-delete [option
> legacysupport.header_search]
> }}}
>
> I think this works for this case, but I don't know if it messes up any
> other use cases.
New description:
[https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/29882/steps
/install-port/logs/stdio gwenhywfar5 fails to build on 10.6]:
{{{
/bin/sh ../libtool --tag=CC --mode=link /opt/local/bin/clang-mp-9.0
-pipe -Os -arch x86_64 -Wall -Wall -Wall -no-undefined -version-info
82:0:3 -L/opt/local/lib -Wl,-headerpad_max_install_names
/opt/local/lib/libMacportsLegacySupport.dylib -arch x86_64 -o
libgwenhywfar.la -rpath /opt/local/lib binreloc.lo gwenhywfar.lo
base/libbase.la crypt3/libcrypt3.la crypttoken/libcrypttoken.la
cryptmsg/libcryptmsg.la sio/libsio.la os/libos.la parser/libparser.la
html/libgwenhtml.la gui/libgui.la sar/libsar.la
test_framework/libtestframework.la -lintl -liconv -L/opt/local/lib
-lgcrypt -lgpg-error -L/opt/local/lib -lgnutls
libtool: link: /opt/local/bin/clang-mp-9.0 -dynamiclib -o
.libs/libgwenhywfar.79.dylib .libs/binreloc.o .libs/gwenhywfar.o
-Wl,-force_load,base/.libs/libbase.a
-Wl,-force_load,crypt3/.libs/libcrypt3.a
-Wl,-force_load,crypttoken/.libs/libcrypttoken.a
-Wl,-force_load,cryptmsg/.libs/libcryptmsg.a
-Wl,-force_load,sio/.libs/libsio.a -Wl,-force_load,os/.libs/libos.a
-Wl,-force_load,parser/.libs/libparser.a
-Wl,-force_load,html/.libs/libgwenhtml.a
-Wl,-force_load,gui/.libs/libgui.a -Wl,-force_load,sar/.libs/libsar.a
-Wl,-force_load,test_framework/.libs/libtestframework.a -L/opt/local/lib
/opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib
/opt/local/lib/libgcrypt.dylib /opt/local/lib/libgpg-error.dylib
/opt/local/lib/libgnutls.dylib -Os -arch x86_64
-Wl,-headerpad_max_install_names -arch x86_64 -framework Security
-framework CoreFoundation -install_name
/opt/local/lib/libgwenhywfar.79.dylib -compatibility_version 83
-current_version 83.0 -Wl,-single_module
Undefined symbols for architecture x86_64:
"_strndup", referenced from:
_GWEN_Text_strndup in libparser.a(text.o)
(maybe you meant: _GWEN_Text_strndup)
ld: symbol(s) not found for architecture x86_64
}}}
I already added the legacysupport 1.1 portgroup which should have taken
care of this but didn't. On the `/bin/sh ../libtool` line we can see that
/opt/local/lib/libMacportsLegacySupport.dylib is specified. That should
invoke libtool and it should pass that on to clang when it invokes it but
on the `libtool: link:` line legacysupport is not mentioned.
Is this fix to the legacysupport 1.1 portgroup the correct fix?
{{{
#!diff
Index: legacysupport-1.1.tcl
===================================================================
--- legacysupport-1.1.tcl (revision 173390)
+++ legacysupport-1.1.tcl (working copy)
@@ -66,8 +66,8 @@
depends_lib-delete path:lib/libMacportsLegacySupport.dylib
:legacy-support
depends_lib-append path:lib/libMacportsLegacySupport.dylib
:legacy-support
- configure.ldflags-delete [option legacysupport.library_name]
- configure.ldflags-append [option legacysupport.library_name]
+ configure.ldflags-delete -Wl,[option
legacysupport.library_name]
+ configure.ldflags-append -Wl,[option
legacysupport.library_name]
if {![option compiler.limit_flags]} {
configure.cppflags-delete [option
legacysupport.header_search]
}}}
I think this works for this case, but I don't know if it messes up any
other use cases.
--
--
Ticket URL: <https://trac.macports.org/ticket/60798#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list