pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
math/R: link issue
Hi!
After the gettext-lib update, math/R has stopped building.
The error looks like this (from mef's build):
gcc -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/pkg/include -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/X11R7/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz -I/usr/include/krb5 -I../../src/nmath -DHAVE_CONFIG_H -fopenmp -fpic -O2 -fPIC -D_FORTIFY_SOURCE=2 -pthread -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/X11R7/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz -I/usr/include/krb5 -c Rmain.c -o Rmain.o
gcc -Wl,--export-dynamic -fopenmp -Wl,-R/usr/pkg/lib/R/lib -L"../../lib" -Wl,-zrelro -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -pthread -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -o R.bin Rmain.o -lR
ld: warning: libgomp.so.1, needed by ../../lib/libR.so, may conflict with libgomp.so.2
ld: ../../lib/libR.so: undefined reference to `textdomain'
ld: ../../lib/libR.so: undefined reference to `dgettext'
ld: ../../lib/libR.so: undefined reference to `dngettext'
ld: ../../lib/libR.so: undefined reference to `gettext'
ld: ../../lib/libR.so: undefined reference to `ngettext'
ld: ../../lib/libR.so: undefined reference to `bindtextdomain'
So it looks like libR.so is not linked against libintl.so, which
should provide these symbols.
So I added code to do that, and it still failed. Then I added code to
link R.bin against libintl.so directly too, but that doesn't help
either. Now I'm confused.
gcc -I../../src/extra -I. -I../../src/include -I../../src/include -I/usr/pkg/include -g -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz -I/usr/include/krb5 -I../../src/nmath -DHAVE_CONFIG_H -fopenmp -fpic -O2 -g -fPIC -D_FORTIFY_SOURCE=2 -fstack-clash-protection -pthread -I/usr/include -I/usr/pkg/include -I/usr/pkg/include/glib-2.0 -I/usr/pkg/include/gio-unix-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include/freetype2 -I/usr/pkg/include/harfbuzz -I/usr/include/krb5 -c Rmain.c -o Rmain.o
gcc -Wl,--export-dynamic -fopenmp -Wl,-R/usr/pkg/lib/R/lib -L"../../lib" -Wl,-zrelro -Wl,-znow -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -pthread -o R.bin Rmain.o -lR -lintl
ld: warning: libgomp.so.1, needed by ../../lib/libR.so, may conflict with libgomp.so.2
ld: ../../lib/libR.so: undefined reference to `textdomain'
ld: ../../lib/libR.so: undefined reference to `dgettext'
ld: ../../lib/libR.so: undefined reference to `dngettext'
ld: ../../lib/libR.so: undefined reference to `gettext'
ld: ../../lib/libR.so: undefined reference to `ngettext'
ld: ../../lib/libR.so: undefined reference to `bindtextdomain'
# ldd work/R-4.2.0/src/main/libR.so
work/R-4.2.0/src/main/libR.so:
-lblas.3 => /usr/pkg/lib/libblas.so.3
-lgfortran.5 => /usr/pkg/gcc10//lib/./libgfortran.so.5
-lquadmath.0 => /usr/pkg/gcc10//lib/./libquadmath.so.0
-lm.0 => /usr/lib/libm.so.0
-lc.12 => /usr/lib/libc.so.12
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lpthread.1 => /usr/lib/libpthread.so.1
-lintl.8 => /usr/pkg/lib/libintl.so.8
-lreadline.8 => /usr/pkg/lib/libreadline.so.8
-lterminfo.2 => /usr/lib/libterminfo.so.2
-lpcre2-8.0 => /usr/pkg/lib/libpcre2-8.so.0
-llzma.2 => /usr/lib/liblzma.so.2
-lbz2.1 => /usr/lib/libbz2.so.1
-lz.1 => /usr/lib/libz.so.1
-lrt.1 => /usr/lib/librt.so.1
-liconv.2 => /usr/pkg/lib/libiconv.so.2
-lgomp.1 => /usr/pkg/gcc10//lib/./libgomp.so.1
Does anyone have an idea what could be the underlying issue here?
On the other hand, 4.2.3 and 4.3.1 are out (pkgsrc is at 4.2.0), so if
someone feels like updating math/R that'd be nice too :)
Thomas
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/math/R/Makefile,v
retrieving revision 1.240
diff -u -r1.240 Makefile
--- Makefile 6 Jun 2023 12:41:50 -0000 1.240
+++ Makefile 6 Jul 2023 22:29:09 -0000
@@ -5,7 +5,7 @@
# to avoid unnecessarily breaking macOS users.
#
DISTNAME= R-4.2.0
-PKGREVISION= 6
+PKGREVISION= 7
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_R_CRAN:=base/R-4/}
@@ -23,7 +23,7 @@
USE_LIBTOOL= yes
USE_TOOLS+= aclocal autoconf autoreconf automake gmake gzip:run
USE_TOOLS+= makeinfo perl:run pkg-config sed unzip:run
-TEXINFO_REQD= 5.1
+TEXINFO_REQD+= 5.1
INFO_FILES= yes
PTHREAD_AUTO_VARS= yes
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/math/R/distinfo,v
retrieving revision 1.97
diff -u -r1.97 distinfo
--- distinfo 22 Mar 2023 13:53:29 -0000 1.97
+++ distinfo 6 Jul 2023 22:29:09 -0000
@@ -6,4 +6,5 @@
SHA1 (patch-configure.ac) = d6661984716a131bbfa1a2aa56385c535881d43d
SHA1 (patch-m4_R.m4) = c55ae5a10bb995e147aceb12fd7393d8a6a64876
SHA1 (patch-src_library_stats_src_Makefile.in) = 4eb93292858392792c37a706399e2cef91821bbe
+SHA1 (patch-src_main_Makefile.in) = b7a2f937dc3bbf1f130e53361fe3714c3483a3fb
SHA1 (patch-src_main_character.c) = 842ae5d291f36f2beead4d32c1d41b18cbff878d
Index: patches/patch-src_main_Makefile.in
===================================================================
RCS file: patches/patch-src_main_Makefile.in
diff -N patches/patch-src_main_Makefile.in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_main_Makefile.in 6 Jul 2023 22:29:09 -0000
@@ -0,0 +1,23 @@
+$NetBSD$
+
+libR uses symbols from libintl.so, so link against it
+
+--- src/main/Makefile.in.orig 2022-03-24 23:02:06.000000000 +0000
++++ src/main/Makefile.in
+@@ -103,14 +103,14 @@ R_binary = R.bin
+ R_bin_OBJECTS = Rmain.o @WANT_R_SHLIB_FALSE@$(OBJECTS)
+ @WANT_R_SHLIB_FALSE@R_bin_LDADD = $(MAIN_OBJS) $(EXTRA_STATIC_LIBS) $(EXTRA_LIBS)
+ ## Linked against -lRblas because -lR is and otherwise ld complains.
+-@WANT_R_SHLIB_TRUE@R_bin_LDADD = -lR @BLAS_SHLIB_TRUE@-lRblas
++@WANT_R_SHLIB_TRUE@R_bin_LDADD = -lR -lintl @BLAS_SHLIB_TRUE@-lRblas
+ ## This should depend on MAIN_OBJS not MAIN_LIBS, but we can't use that.
+ ## There is also a dependence on libRblas when that is internal and static.
+ @WANT_R_SHLIB_FALSE@R_bin_DEPENDENCIES = $(MAIN_LIBS) $(EXTRA_STATIC_LIBS)@USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp
+
+ libR_la = libR$(R_DYLIB_EXT)
+ libR_la_OBJECTS = $(OBJECTS)
+-libR_la_LIBADD = $(MAIN_OBJS) $(EXTRA_STATIC_LIBS) $(EXTRA_LIBS) @WANT_R_SHLIB_TRUE@ @USE_EXPORTFILES_TRUE@ -Wl,-bE:$(top_builddir)/etc/R.exp
++libR_la_LIBADD = $(MAIN_OBJS) $(EXTRA_STATIC_LIBS) $(EXTRA_LIBS) -lintl @WANT_R_SHLIB_TRUE@ @USE_EXPORTFILES_TRUE@ -Wl,-bE:$(top_builddir)/etc/R.exp
+ libR_la_DEPENDENCIES = $(STATIC_LIBS) $(R_TZONE) @WANT_R_SHLIB_TRUE@ @USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp
+
+ ## The next is needed for macOS only at present
Home |
Main Index |
Thread Index |
Old Index