[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave's m4/acx_pthread.m4 & OSX
From: |
Ben Abbott |
Subject: |
Re: Octave's m4/acx_pthread.m4 & OSX |
Date: |
Mon, 06 Sep 2010 09:13:45 -0400 |
On Sep 6, 2010, at 7:27 AM, Jarno Rajahalme wrote:
> Octave maintainers,
>
> Now that the gnulib dirfd issue is solved, the m4/acx_pthread.m4 istributed
> with Octave represents the only issue preventing compilation of the
> development branch without local changes to the octave files.
>
> I don't know what is the policy regarding the m4 file modifications, but when
> compiling with GCC 4.5 in OSX (10.6), the following change is needed in
> acx_pthread.m4:
>
> *** m4/acx_pthread.m4~ Fri Sep 3 17:47:09 2010
> --- m4/acx_pthread.m4 Fri Sep 3 20:19:45 2010
> ***************
> *** 149,154 ****
> --- 149,158 ----
>
> acx_pthread_flags="-pthreads pthread -mt -pthread
> $acx_pthread_flags"
> ;;
> +
> + *-darwin*)
> + acx_pthread_flags="-pthread"
> + ;;
> esac
>
> if test x"$acx_pthread_ok" = xno; then
>
>
> Without this change the _REENTRANT preprocessor symbol does not get defined,
> and consequently some of the math functions (e.g. lgamma_r in
> /usr/include/architecture/i386/math.h) are dropped out, which makes Octave
> compile fail.
>
> Other parts of the same file already contain some darwin dependencies.
>
> Ben Abbott wrote earlier:
>
> "The change to acx_pthread.m4 is from Thomas Triechl and resolves the
> _REENTRANT error on MacOS X."
>
> Is it possible to get this change into the octave distribution of
> acx_pthread.m4, so that this bug would not reappear with every new version of
> Octave?
>
> With regards,
>
> Jarno Rajahalme
I went back to the original thread with Thomas' patch.
https://www-old.cae.wisc.edu/pipermail/bug-octave/2010-January/010274.html
jwe had suggested that the the ACX_PTHREAD macro be fixed to detect the need
for the -pthread option for MacOS 10.6.
My understanding is that Thomas' patch the -pthread option isn't required for
pre-10.6 versions of MacOS, and agree that changing the ACX_PTHREAD macro is a
proper solution.
In any event, there are some additional changes I'm using to build on MacOS
10.6. One has to do with OpenGL ...
sed -i 's/^extern int _gl_warn_on_use$/_GL_EXTERN_C int _gl_warn_on_use/g'
./build-aux/warn-on-use.h
I'm also applying the diff below.
----------------------
diff -r 271c5262975b src/sighandlers.cc
--- a/src/sighandlers.cc Tue Mar 16 12:29:49 2010 +0100
+++ b/src/sighandlers.cc Tue Mar 16 18:29:24 2010 -0400
@@ -195,6 +195,7 @@
act.sa_flags |= SA_RESTART;
#endif
+#undef sigemptyset
gnulib::sigemptyset (&act.sa_mask);
gnulib::sigemptyset (&oact.sa_mask);
@@ -229,6 +230,7 @@
sigset_t set, oset;
+#undef sigaddset
BLOCK_CHILD (set, oset);
if (octave_child_list::wait ())
----------------------
Jarno, do you not need the patch to sighandlers.cc or the change to
warn-on-use.h?
Ben
- Octave's m4/acx_pthread.m4 & OSX, Jarno Rajahalme, 2010/09/06
- Re: Octave's m4/acx_pthread.m4 & OSX,
Ben Abbott <=
- Re: Octave's m4/acx_pthread.m4 & OSX, Ben Abbott, 2010/09/06
- Re: Octave's m4/acx_pthread.m4 & OSX, Jarno Rajahalme, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, Ben Abbott, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, John W. Eaton, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, Thomas Treichl, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, bpabbott, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, Thomas Treichl, 2010/09/07
- Re: Octave's m4/acx_pthread.m4 & OSX, bpabbott, 2010/09/07