texlive[59649] Build/source/texk/upmendex: pthread needed for bibtexu

commits+karl at tug.org commits+karl at tug.org
Sun Jun 20 03:06:32 CEST 2021


Revision: 59649
          http://tug.org/svn/texlive?view=revision&revision=59649
Author:   karl
Date:     2021-06-20 03:06:32 +0200 (Sun, 20 Jun 2021)
Log Message:
-----------
pthread needed for bibtexu

Modified Paths:
--------------
    trunk/Build/source/texk/bibtex-x/ChangeLog
    trunk/Build/source/texk/bibtex-x/Makefile.am
    trunk/Build/source/texk/bibtex-x/Makefile.in
    trunk/Build/source/texk/bibtex-x/aclocal.m4
    trunk/Build/source/texk/bibtex-x/configure
    trunk/Build/source/texk/bibtex-x/configure.ac
    trunk/Build/source/texk/upmendex/ChangeLog
    trunk/Build/source/texk/upmendex/configure.ac

Property Changed:
----------------
    trunk/Build/source/texk/bibtex-x/configure.ac

Modified: trunk/Build/source/texk/bibtex-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/bibtex-x/ChangeLog	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/bibtex-x/ChangeLog	2021-06-20 01:06:32 UTC (rev 59649)
@@ -1,3 +1,10 @@
+2021-06-19  Karl Berry  <karl at freefriends.org>
+
+	* configure.ac [enable_bibtexu]: also check for -lpthread.
+	* Makefile.am (bibtexu_LDADD): include $(PTHREAD_LIB).
+	Report and fix from Dmitry Zheleznyakov:
+	https://tug.org/pipermail/tex-k/2021-June/003591.html
+
 2021-02-06  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
 	* utils.c, configure.ac:

Modified: trunk/Build/source/texk/bibtex-x/Makefile.am
===================================================================
--- trunk/Build/source/texk/bibtex-x/Makefile.am	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/bibtex-x/Makefile.am	2021-06-20 01:06:32 UTC (rev 59649)
@@ -1,7 +1,7 @@
 ## $Id$
 ## Makefile.am for the TeX Live subdirectory texk/bibtex-x/
 ##
-## Copyright 2017-2019 Karl Berry <tex-live at tug.org>
+## Copyright 2017-2021 Karl Berry <tex-live at tug.org>
 ## Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 ## You may freely use, modify and/or distribute this file.
 ##
@@ -44,7 +44,7 @@
 nodist_EXTRA_bibtexu_SOURCES = dummy.cxx
 bibtexu_CPPFLAGS = $(AM_CPPFLAGS) $(ICU_INCLUDES) -DUTF_8
 $(bibtexu_OBJECTS): $(KPATHSEA_DEPEND) $(ICU_DEPEND)
-bibtexu_LDADD = $(KPATHSEA_LIBS) $(ICU_LIBS) $(ICU_LIBS_EXTRA)
+bibtexu_LDADD = $(KPATHSEA_LIBS) $(ICU_LIBS) $(PTHREAD_LIB) $(ICU_LIBS_EXTRA)
 
 dist_man1_MANS = bibtex8.1 bibtexu.1
 

Modified: trunk/Build/source/texk/bibtex-x/Makefile.in
===================================================================
--- trunk/Build/source/texk/bibtex-x/Makefile.in	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/bibtex-x/Makefile.in	2021-06-20 01:06:32 UTC (rev 59649)
@@ -101,6 +101,7 @@
 	$(top_srcdir)/../../m4/kpse-cxx-hack.m4 \
 	$(top_srcdir)/../../m4/kpse-icu-flags.m4 \
 	$(top_srcdir)/../../m4/kpse-kpathsea-flags.m4 \
+	$(top_srcdir)/../../m4/kpse-search-libs.m4 \
 	$(top_srcdir)/../../m4/kpse-warnings.m4 \
 	$(top_srcdir)/../../m4/libtool.m4 \
 	$(top_srcdir)/../../m4/ltoptions.m4 \
@@ -141,7 +142,8 @@
 	bibtexu-bibtex.$(OBJEXT) bibtexu-utils.$(OBJEXT)
 am_bibtexu_OBJECTS = $(am__objects_2)
 bibtexu_OBJECTS = $(am_bibtexu_OBJECTS)
-bibtexu_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+bibtexu_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 AM_V_P = $(am__v_P_ at AM_V@)
 am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -544,6 +546,7 @@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PKG_CONFIG = @PKG_CONFIG@
+PTHREAD_LIB = @PTHREAD_LIB@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -629,7 +632,7 @@
 # Force Automake to use CXXLD for linking
 nodist_EXTRA_bibtexu_SOURCES = dummy.cxx
 bibtexu_CPPFLAGS = $(AM_CPPFLAGS) $(ICU_INCLUDES) -DUTF_8
-bibtexu_LDADD = $(KPATHSEA_LIBS) $(ICU_LIBS) $(ICU_LIBS_EXTRA)
+bibtexu_LDADD = $(KPATHSEA_LIBS) $(ICU_LIBS) $(PTHREAD_LIB) $(ICU_LIBS_EXTRA)
 dist_man1_MANS = bibtex8.1 bibtexu.1
 csfdir = $(datarootdir)/texmf-dist/bibtex/csf/base
 dist_csf_DATA = \

Modified: trunk/Build/source/texk/bibtex-x/aclocal.m4
===================================================================
--- trunk/Build/source/texk/bibtex-x/aclocal.m4	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/bibtex-x/aclocal.m4	2021-06-20 01:06:32 UTC (rev 59649)
@@ -1170,6 +1170,7 @@
 m4_include([../../m4/kpse-cxx-hack.m4])
 m4_include([../../m4/kpse-icu-flags.m4])
 m4_include([../../m4/kpse-kpathsea-flags.m4])
+m4_include([../../m4/kpse-search-libs.m4])
 m4_include([../../m4/kpse-warnings.m4])
 m4_include([../../m4/libtool.m4])
 m4_include([../../m4/ltoptions.m4])

Modified: trunk/Build/source/texk/bibtex-x/configure
===================================================================
--- trunk/Build/source/texk/bibtex-x/configure	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/bibtex-x/configure	2021-06-20 01:06:32 UTC (rev 59649)
@@ -645,6 +645,7 @@
 ICU_LIBS
 ICU_INCLUDES
 ICU_CONFIG
+PTHREAD_LIB
 KPATHSEA_RULE
 KPATHSEA_DEPEND
 KPATHSEA_LIBS
@@ -17646,6 +17647,9 @@
 fi
 
 
+if test "x$enable_bibtexu" != xno; then
+  # As of ICU 65.1, ICU requires -lpthread on x86_64-linux and, most
+  # likely, on other platforms. See upmendex/configure.ac for more info.
 kpse_save_CPPFLAGS=$CPPFLAGS
 kpse_save_LIBS=$LIBS
 
@@ -19372,6 +19376,73 @@
   KPATHSEA_INCLUDES="$KPATHSEA_INCLUDES -DNO_DEBUG"
 fi
 
+kpse_search_save_LIBS=$LIBS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
+$as_echo_n "checking for library containing pthread_create... " >&6; }
+if ${ac_cv_search_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' pthread; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_pthread_create=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_pthread_create+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_pthread_create+:} false; then :
+
+else
+  ac_cv_search_pthread_create=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5
+$as_echo "$ac_cv_search_pthread_create" >&6; }
+ac_res=$ac_cv_search_pthread_create
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+LIBS=$kpse_search_save_LIBS
+case $ac_cv_search_pthread_create in #(
+  "none required") :
+     ;; #(
+  no) :
+    as_fn_error $? "Sorry, did not find pthread_create()" "$LINENO" 5 ;; #(
+  *) :
+    PTHREAD_LIB=$ac_cv_search_pthread_create ;;
+esac
+
 echo 'tldbg:KPSE_ICU_FLAGS called: more-icu-libs=icuio icui18n, icu-config-args=--ldflags-icuio.' >&5
 ##tldbg _KPSE_LIB_FLAGS: Setup icu (-licuxxx) flags.
 echo 'tldbg:_KPSE_LIB_FLAGS called: libdir=icu, libname=icuxxx, options=, tlincl=-DU_STATIC_IMPLEMENTATION -IBLD/libs/icu/include, tllib=BLD/libs/icu/icu-build/lib/libicuio.a BLD/libs/icu/icu-build/lib/libicui18n.a BLD/libs/icu/icu-build/lib/libicuuc.a BLD/libs/icu/icu-build/lib/libicudata.a, tlextra=, rebuildsrcdeps=, rebuildblddeps=${top_builddir}/../../libs/icu/include/unicode/uversion.h.' >&5
@@ -19591,6 +19662,7 @@
   ;;
 esac
 
+fi
 
  if test "x$enable_bibtex8" != xno; then
   BIBTEX8_TRUE=

Modified: trunk/Build/source/texk/bibtex-x/configure.ac
===================================================================
--- trunk/Build/source/texk/bibtex-x/configure.ac	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/bibtex-x/configure.ac	2021-06-20 01:06:32 UTC (rev 59649)
@@ -1,6 +1,8 @@
+dnl $Id$
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl   Copyright (C) 2009-2013 Peter Breitenlohner <tex-live at tug.org>
+dnl   Copyright 2015-2021 Karl Berry <tex-live at tug.org>
+dnl   Copyright 2009-2015 Peter Breitenlohner <tex-live at tug.org>
 dnl
 dnl   This file is free software; the copyright holder
 dnl   gives unlimited permission to copy and/or distribute it,
@@ -28,8 +30,13 @@
 
 AC_SEARCH_LIBS([pow], [m])
 
+if test "x$enable_bibtexu" != xno; then
+  dnl As of ICU 65.1, ICU requires -lpthread on x86_64-linux and, most
+  dnl likely, on other platforms. See upmendex/configure.ac for more info.
 KPSE_KPATHSEA_FLAGS
+KPSE_SEARCH_LIBS([PTHREAD_LIB], [pthread_create], [pthread])
 KPSE_ICU_FLAGS([icuio icui18n], [--ldflags-icuio])
+fi
 
 AM_CONDITIONAL([BIBTEX8], [test "x$enable_bibtex8" != xno])
 AM_CONDITIONAL([BIBTEXU], [test "x$enable_bibtexu" != xno])


Property changes on: trunk/Build/source/texk/bibtex-x/configure.ac
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Modified: trunk/Build/source/texk/upmendex/ChangeLog
===================================================================
--- trunk/Build/source/texk/upmendex/ChangeLog	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/upmendex/ChangeLog	2021-06-20 01:06:32 UTC (rev 59649)
@@ -1,9 +1,14 @@
+2021-06-19  Karl Berry  <karl at freefriends.org>
+
+	* configure.ac: pthread doc update; also needed in bibtexu (q.v.).
+
 2021-06-19  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>
 
-	* configure.ac: Avoid error of C++ compiler detection
-	in some envirionment.
+	* configure.ac: variadic checks before AC_PROG_CXX, to avoid error
+	of C++ compiler detection in some environments.
 	Report from Vadim Kantorov,
 	https://github.com/t-tk/upmendex-package/issues/1
+	
 	* main.c: Add ICU version to banner.
 
 2021-06-13  TANAKA Takuji  <ttk at t-lab.opal.ne.jp>

Modified: trunk/Build/source/texk/upmendex/configure.ac
===================================================================
--- trunk/Build/source/texk/upmendex/configure.ac	2021-06-19 23:49:01 UTC (rev 59648)
+++ trunk/Build/source/texk/upmendex/configure.ac	2021-06-20 01:06:32 UTC (rev 59649)
@@ -1,7 +1,7 @@
 dnl $Id$
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl   Copyright 2015-2020 Karl Berry <tex-live at tug.org>
+dnl   Copyright 2015-2021 Karl Berry <tex-live at tug.org>
 dnl   Copyright 2010-2015 Peter Breitenlohner <tex-live at tug.org>
 dnl
 dnl   This file is free software; the copyright holder
@@ -40,9 +40,9 @@
 dnl As of ICU 65.1, ICU requires -lpthread on x86_64-linux and, most
 dnl likely, on other platforms. Otherwise there is a crash in
 dnl std::call_once, as shown in ChangeLog. OpenBSD already has to link
-dnl with -lpthread on all platforms (see m4/kpse-icu-flags.m4), but so
-dnl far it seems only upmendex requires it elsewhere. The double
-dnl inclusion of -lpthread on obsd should be harmless.
+dnl with -lpthread on all platforms (see m4/kpse-icu-flags.m4), but the
+dnl double inclusion of -lpthread on obsd should be harmless. bibtexu
+dnl also needs pthread to avoid failures.
 dnl 
 dnl The autoconf-archive ax_pthread macro (used in asymptote) goes to
 dnl much greater lengths to find the best thread library and support all



More information about the tex-live-commits mailing list.