New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irssi-1.1.0 make check link errors on Solaris 11.3 #815

Closed
skrueger8 opened this Issue Jan 16, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@skrueger8

skrueger8 commented Jan 16, 2018

Hi,

make check doesn't work anymore on Solaris 11.3 (1.0.6 was fine).

$ xzcat irssi-1.1.0.tar.xz | pax -r
$ cd irssi-1.1.0
$ PATH=$(getconf PATH) ./configure PKG_CONFIG_PATH=/usr/lib/64/pkgconfig MAKE=gmake NM=/usr/gnu/bin/nm CPPFLAGS='-D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -D_XPG6' CC=cc CFLAGS='-m64 -Ui386 -U__i386 -g -O -fvisibility=hidden -KPIC -DPIC -std=c11' LDFLAGS='-m64 -zaslr=enable -znxstack=enable -znxheap=enable -M /usr/lib/ld/map.noexbss -M /usr/lib/ld/map.noexdata -M /usr/lib/ld/map.pagealign -Bdirect -zignore -zstrip-class=comment -ztype=pie' --prefix=/usr --disable-silent-rules --with-perl=no
$ gmake
...
$ gmake check
...
gmake[6]: Entering directory `/tmp/irssi-1.1.0/tests/fe-common/core'
...
libtool: link: cc -m64 -Ui386 -U__i386 -g -O -fvisibility=hidden -KPIC -DPIC -std=c11 -m64 -zaslr=enable -znxstack=enable -znxheap=enable -M /usr/lib/ld/map.noexbss -M /usr/lib/ld/map.noexdata -M /usr/lib/ld/map.pagealign -Bdirect -zignore -zstrip-class=comment -ztype=pie -o test-formats test_formats-test-formats.o  ../../../src/fe-common/core/libfe_common_core.a ../../../src/core/libcore.a ../../../src/lib-config/libirssi_config.a -L/usr/lib/amd64 -lgmodule-2.0 -lpthread -lglib-2.0 -lssl -lcrypto
Undefined                       first referenced
 symbol                             in file
__xnet_connect                      ../../../src/core/libcore.a(network.o)  (symbol belongs to implicit dependency /usr/lib/amd64/libsocket.so.1)
...
ld: fatal: symbol referencing errors
gmake[6]: *** [test-formats] Error 2

This one can be fixed by adding -lsocket -lnsl to irssi-1.1.0/tests/fe-common/core/Makefile.

There's another one though:

gmake[6]: Entering directory `/tmp/irssi-1.1.0/tests/irc/core'
libtool: link: cc -m64 -Ui386 -U__i386 -g -O -fvisibility=hidden -KPIC -DPIC -std=c11 -m64 -zaslr=enable -znxstack=enable -znxheap=enable -M /usr/lib/ld/map.noexbss -M /usr/lib/ld/map.noexdata -M /usr/lib/ld/map.pagealign -Bdirect -zignore -zstrip-class=comment -ztype=pie -o test-irc test_irc-test-irc.o  ../../../src/irc/core/libirc_core.a ../../../src/core/libcore.a ../../../src/lib-config/libirssi_config.a -L/usr/lib/amd64 -lgmodule-2.0 -lpthread -lglib-2.0 -lssl -lcrypto
Undefined                       first referenced
 symbol                             in file
__xnet_connect                      ../../../src/core/libcore.a(network.o)  (symbol belongs to implicit dependency /usr/lib/amd64/libsocket.so.1)
...
ld: fatal: symbol referencing errors
gmake[6]: *** [test-irc] Error 2

This one can be fixed too by adding -lsocket -lnsl to irssi-1.1.0/tests/irc/core/Makefile (test_irc_LDADD).

All tests pass after that.

@skrueger8 skrueger8 changed the title from irssi-1.1.0 make check is broken on Solaris 11.3 to irssi-1.1.0 make check link errors on Solaris 11.3 Jan 16, 2018

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Jan 16, 2018

it worked before because we didn't have any tests :-)

configure already tries to collect the required libs for the main irssi binary (including search for nsl), so we need to figure out how to make the tests use that

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Jan 16, 2018

can you try this patch and then re-run ./configure

diff --git a/tests/fe-common/core/Makefile.am b/tests/fe-common/core/Makefile.am
index 070b605..f048e95 100644
--- a/tests/fe-common/core/Makefile.am
+++ b/tests/fe-common/core/Makefile.am
@@ -21,8 +21,7 @@ test_formats_LDADD = \
 	../../../src/fe-common/core/libfe_common_core.a \
 	../../../src/core/libcore.a \
 	../../../src/lib-config/libirssi_config.a \
-	@GLIB_LIBS@ \
-	@OPENSSL_LIBS@
+	@PROG_LIBS@
 
 test_formats_SOURCES = \
 	test-formats.c
diff --git a/tests/fe-common/core/Makefile.in b/tests/fe-common/core/Makefile.in
index c90decd..4018d1d 100644
--- a/tests/fe-common/core/Makefile.in
+++ b/tests/fe-common/core/Makefile.in
@@ -645,8 +645,7 @@ test_formats_LDADD = \
 	../../../src/fe-common/core/libfe_common_core.a \
 	../../../src/core/libcore.a \
 	../../../src/lib-config/libirssi_config.a \
-	@GLIB_LIBS@ \
-	@OPENSSL_LIBS@
+	@PROG_LIBS@
 
 test_formats_SOURCES = \
 	test-formats.c
diff --git a/tests/irc/core/Makefile.am b/tests/irc/core/Makefile.am
index ccc6aa9..86f1d54 100644
--- a/tests/irc/core/Makefile.am
+++ b/tests/irc/core/Makefile.am
@@ -22,8 +22,7 @@ test_irc_LDADD = \
 	../../../src/irc/core/libirc_core.a \
 	../../../src/core/libcore.a \
 	../../../src/lib-config/libirssi_config.a \
-	@GLIB_LIBS@ \
-	@OPENSSL_LIBS@
+	@PROG_LIBS@
 
 test_irc_SOURCES = \
 	test-irc.c
diff --git a/tests/irc/core/Makefile.in b/tests/irc/core/Makefile.in
index 5fb10b7..23f27c2 100644
--- a/tests/irc/core/Makefile.in
+++ b/tests/irc/core/Makefile.in
@@ -646,8 +646,7 @@ test_irc_LDADD = \
 	../../../src/irc/core/libirc_core.a \
 	../../../src/core/libcore.a \
 	../../../src/lib-config/libirssi_config.a \
-	@GLIB_LIBS@ \
-	@OPENSSL_LIBS@
+	@PROG_LIBS@
 
 test_irc_SOURCES = \
 	test-irc.c
-- 
2.15.1

@skrueger8

This comment has been minimized.

skrueger8 commented Jan 16, 2018

Patch works fine, make check is building without linking errors now.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment