all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs-24.0.92 problem on MirBSD 10
@ 2011-12-03  2:01 Nelson H. F. Beebe
  2011-12-03  5:44 ` bug#10201: " Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Nelson H. F. Beebe @ 2011-12-03  2:01 UTC (permalink / raw)
  To: emacs-devel; +Cc: beebe

I've got emacs-24.0.92 built and installed on several local
systems, but a few are still giving me trouble.  

On MirBSD 10, I've had to help things by supplying additional libraries,
several of which I updated today from their latest source releases:

	make LIBPNG='-lpng -lz -lm -ltiff -llzma -lpng15 '

This resulted in link failure becaue gmalloc.c assumes that
pthread_atfork() is available when HAVE_PTHREAD is defined, 
but it is not in the MirBSD /usr/lib/libpthread.a library:

% nm /usr/lib/libpthread.a | grep ' T ' | awk '/pthread_/ {print $3}' | sort -u | pr -f -c3 -w100

pthread_attr_destroy             pthread_detach                   pthread_resume_all_np
pthread_attr_getdetachstate      pthread_equal                    pthread_resume_np
pthread_attr_getinheritsched     pthread_exit                     pthread_rwlock_destroy
pthread_attr_getschedparam       pthread_getconcurrency           pthread_rwlock_init
pthread_attr_getschedpolicy      pthread_getprio                  pthread_rwlock_rdlock
pthread_attr_getscope            pthread_getschedparam            pthread_rwlock_tryrdlock
pthread_attr_getstack            pthread_getspecific              pthread_rwlock_trywrlock
pthread_attr_getstackaddr        pthread_join                     pthread_rwlock_unlock
pthread_attr_getstacksize        pthread_key_create               pthread_rwlock_wrlock
pthread_attr_init                pthread_key_delete               pthread_rwlockattr_destroy
pthread_attr_setcreatesuspend_np pthread_kill                     pthread_rwlockattr_getpshared
pthread_attr_setdetachstate      pthread_main_np                  pthread_rwlockattr_init
pthread_attr_setinheritsched     pthread_multi_np                 pthread_rwlockattr_setpshared
pthread_attr_setschedparam       pthread_mutex_destroy            pthread_self
pthread_attr_setschedpolicy      pthread_mutex_getprioceiling     pthread_set_name_np
pthread_attr_setscope            pthread_mutex_init               pthread_setcancelstate
pthread_attr_setstack            pthread_mutex_lock               pthread_setcanceltype
pthread_attr_setstackaddr        pthread_mutex_setprioceiling     pthread_setconcurrency
pthread_attr_setstacksize        pthread_mutex_trylock            pthread_setprio
pthread_cancel                   pthread_mutex_unlock             pthread_setschedparam
pthread_cleanup_pop              pthread_mutexattr_destroy        pthread_setspecific
pthread_cleanup_push             pthread_mutexattr_getkind_np     pthread_sigmask
pthread_cond_broadcast           pthread_mutexattr_getprioceiling pthread_single_np
pthread_cond_destroy             pthread_mutexattr_getprotocol    pthread_stackseg_np
pthread_cond_init                pthread_mutexattr_gettype        pthread_suspend_all_np
pthread_cond_signal              pthread_mutexattr_init           pthread_suspend_np
pthread_cond_timedwait           pthread_mutexattr_setkind_np     pthread_switch_add_np
pthread_cond_wait                pthread_mutexattr_setprioceiling pthread_switch_delete_np
pthread_condattr_destroy         pthread_mutexattr_setprotocol    pthread_testcancel
pthread_condattr_init            pthread_mutexattr_settype        pthread_yield

I then made these patches:

% diff src/config.h.~1~ src/config.h
593c593
< #define HAVE_PTHREAD 1
---
> /* #define HAVE_PTHREAD 1 */
596c596
< #define HAVE_PTHREAD_H 1
---
> /* #define HAVE_PTHREAD_H 1 */
599c599
< #define HAVE_PTHREAD_SIGMASK 1
---
> /* #define HAVE_PTHREAD_SIGMASK 1 */

Compilation was then successful, and I'm installing the new version
now.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe@math.utah.edu  -
- 155 S 1400 E RM 233                       beebe@acm.org  beebe@computer.org -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------



^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10201: emacs-24.0.92 problem on MirBSD 10
  2011-12-03  2:01 emacs-24.0.92 problem on MirBSD 10 Nelson H. F. Beebe
@ 2011-12-03  5:44 ` Paul Eggert
  2011-12-16 23:49   ` Glenn Morris
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Eggert @ 2011-12-03  5:44 UTC (permalink / raw)
  To: 10201; +Cc: Nelson H. F. Beebe

[Following up on bug-gnu-emacs, so that this gets a Bug#.]

In <http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00065.html>
on 12/02/11 18:01, Nelson H. F. Beebe wrote:

> 599c599
> < #define HAVE_PTHREAD_SIGMASK 1
> ---
> /* #define HAVE_PTHREAD_SIGMASK 1 */

Thanks for the bug report.  Why was this HAVE_PTHREAD_SIGMASK
patch needed?  Your email doesn't say.  MirBSD has
pthread_sigmask, according to
<https://www.mirbsd.org/htman/i386/man3/pthread_sigmask.htm>,
so pthread_sigmask should work.


> This resulted in link failure becaue gmalloc.c assumes that
> pthread_atfork() is available when HAVE_PTHREAD is defined, 
> but it is not in the MirBSD /usr/lib/libpthread.a library:

Thanks.  Does the following patch fix things for you?  If you
don't have the autotools installed you can simulate it by
substituting "pthread_atfork" for every instance of "pthread_self"
in the file "configure".

=== modified file 'ChangeLog'
--- ChangeLog	2011-12-03 04:06:45 +0000
+++ ChangeLog	2011-12-03 05:37:32 +0000
@@ -1,5 +1,10 @@
 2011-12-03  Paul Eggert  <eggert@cs.ucla.edu>
 
+	* configure.in (HAVE_PTHREAD): Check for pthread_atfork
+	if linking to gmalloc.c.  This should prevents a build failure on
+	MirBSD 10 reported by Nelson H. F. Beebe in
+	<http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00065.html>.
+
 	* .bzrignore: Add config.cache.
 
 2011-11-27  Jan Djärv  <jan.h.d@swipnet.se>

=== modified file 'configure.in'
--- configure.in	2011-11-30 16:23:05 +0000
+++ configure.in	2011-12-03 05:18:33 +0000
@@ -1717,7 +1717,15 @@
 LIB_PTHREAD=
 AC_CHECK_HEADERS(pthread.h)
 if test "$ac_cv_header_pthread_h"; then
-  AC_CHECK_LIB(pthread, pthread_self, HAVE_PTHREAD=yes)
+  dnl gmalloc.c uses pthread_atfork, which is not available on older-style
+  dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely
+  dnl testing for pthread_self if Emacs uses gmalloc.c.
+  if test "$GMALLOC_OBJ" = gmalloc.o; then
+    emacs_pthread_function=pthread_atfork
+  else
+    emacs_pthread_function=pthread_self
+  fi
+  AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes)
 fi
 if test "$HAVE_PTHREAD" = yes; then
   case "${canonical}" in






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10201: emacs-24.0.92 problem on MirBSD 10
  2011-12-03  5:44 ` bug#10201: " Paul Eggert
@ 2011-12-16 23:49   ` Glenn Morris
  2011-12-17  0:53     ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2011-12-16 23:49 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 10201, Nelson H. F. Beebe

Paul Eggert wrote:

> Does the following patch fix things for you?

The OP tends not to reply to requests for more information.
If you think your patch fixes the issue, I suggest installing it and
closing this report.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10201: emacs-24.0.92 problem on MirBSD 10
  2011-12-16 23:49   ` Glenn Morris
@ 2011-12-17  0:53     ` Paul Eggert
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Eggert @ 2011-12-17  0:53 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Nelson H. F. Beebe, 10201-done

On 12/16/11 15:49, Glenn Morris wrote:
> If you think your patch fixes the issue, I suggest installing it and
> closing this report.

Thanks, I did that, as bzr 106688.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-17  0:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-03  2:01 emacs-24.0.92 problem on MirBSD 10 Nelson H. F. Beebe
2011-12-03  5:44 ` bug#10201: " Paul Eggert
2011-12-16 23:49   ` Glenn Morris
2011-12-17  0:53     ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.