Subject: bug#74600: closed (Re: bug#74600: [PATCH scratch/igc] fix mps library check)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 24 Dec 2024 02:57:02 +0000

Your bug report

#74600: [PATCH scratch/igc] fix mps library check

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
74600: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74600
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#74600: [PATCH scratch/igc] fix mps library check
From: Stefan Kangas <[email-masked]>
To: Gerd Möllmann <[email-masked]>, Yikai Zhao <[email-masked]>
Cc: [email-masked]
Date: Tue, 24 Dec 2024 02:55:32 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Gerd Möllmann <[email-masked]> writes:

> Yikai Zhao <[email-masked]> writes:
>
>> --with-mps detection failed when building with --without-x:
>
> Thanks! I've pushed your patch, since I can see other commits from you
> in master. It works fine for me on macOS, too, BTW.

I'm therefore closing this bug report.

Subject: [PATCH scratch/igc] fix mps library check
From: Yikai Zhao <[email-masked]>
To: [email-masked]
Date: Fri, 29 Nov 2024 15:56:36 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

--with-mps detection failed when building with --without-x:

config.log:

configure:28292: checking for mps_arena_create in -lmps
configure:28317: gcc -o conftest -g3 -O2     conftest.c -lmps  -lsqlite3   >&5
/usr/local/bin/ld: /usr/local/lib/libmps.a(mps.o): in function
`PThreadextModuleInit':
/work/mps-release-1.118.0/code/pthrdext.c:139:(.text+0x499b):
undefined reference to `sem_init'
/usr/local/bin/ld: /usr/local/lib/libmps.a(mps.o): in function `LockInit':
/work/mps-release-1.118.0/code/lockix.c:88:(.text+0x404c3): undefined
reference to `pthread_mutexattr_init'
/usr/local/bin/ld:
/work/mps-release-1.118.0/code/lockix.c:90:(.text+0x404d8): undefined
reference to `pthread_mutexattr_settype'
/usr/local/bin/ld:
/work/mps-release-1.118.0/code/lockix.c:94:(.text+0x404fc): undefined
reference to `pthread_mutexattr_destroy'
/usr/local/bin/ld:
/work/mps-release-1.118.0/code/lockix.c:94:(.text+0x405bd): undefined
reference to `pthread_mutexattr_destroy'
...
From 6c9058814d299f33c6d4db81d3351e1343354fb6 Mon Sep 17 00:00:00 2001
From: Yikai Zhao <[email-masked]>
Date: Fri, 29 Nov 2024 15:40:21 +0800
Subject: [PATCH] Fix mps library check

; * configure.ac (with_mps): add LIB_PTHREAD
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index fc64535dd69..885075a2f1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5624,16 +5624,16 @@ AC_DEFUN
 IGCOBJ=
 if test "${with_mps}" != "no"; then
   AC_CHECK_HEADER([mps.h],
-    [AC_CHECK_LIB([mps], [mps_arena_create], [HAVE_MPS=yes])])
+    [AC_CHECK_LIB([mps], [mps_arena_create], [HAVE_MPS=yes], [], [$LIB_PTHREAD])])
 
   if test "${HAVE_MPS}" = "yes"; then
     IGCOBJ="igc.o"
     AC_DEFINE([HAVE_MPS], [1],
       [Define to 1 if you have the mps library (-lmps).])
     if test "${with_mps}" = "debug"; then
-      LIBMPS=-lmps-debug
+      LIBMPS="-lmps-debug $LIB_PTHREAD"
     else
-      LIBMPS=-lmps
+      LIBMPS="-lmps $LIB_PTHREAD"
     fi
   else
     AC_MSG_ERROR([The MPS library libmps is missing]):
-- 
2.34.1