Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Oct 2014 18:16:30 -0400
From:      Henry Hu <henry.hu.sh@gmail.com>
To:        George Mitchell <george+freebsd@m5p.com>
Cc:        freebsd ports <freebsd-ports@freebsd.org>
Subject:   Re: Python 2.7 and semaphores
Message-ID:  <CAEJt7hYv2F88xOvFWmvNAi_qQX0CwqZko9kBgyA6Rs%2Brb9Y0Cg@mail.gmail.com>
In-Reply-To: <544BEE0A.2070402@m5p.com>
References:  <544BEE0A.2070402@m5p.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 25, 2014 at 2:38 PM, George Mitchell <george+freebsd@m5p.com>
wrote:

> In the process of building and trying textproc/meld, I discovered that
> the lang/python27 configure process concludes, erroneously, that FreeBSD
> does not support working Posix semaphores.  In particular, this program
> from the configure script was alleged to fail, according to config.log:
>
> #include <unistd.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <semaphore.h>
> #include <sys/stat.h>
>
> int main(void) {
>   sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
>   if (a == SEM_FAILED) {
>     perror("sem_open");
>     return 1;
>   }
>   sem_close(a);
>   sem_unlink("/autoconf");
>   return 0;
> }
>
> But when I compiled and ran the program by hand, it worked perfectly.
>
> Then, poking around in lang/python27/Makefile, I found these two lines:
>
> SEM_CONFIGURE_ENV=      ac_cv_posix_semaphores_enabled=yes
> SEM_CONFIGURE_ENV_OFF=  ac_cv_posix_semaphores_enabled=no
>
> I could not explain why these settings should have any effect on the
> configure and build process, but muttering my most superstitious
> imprecations under my breath I changed "...=no" to "...=yes" in the
> second line and re-installed Python.  Lo and behold, configure now
> admitted that Posix semaphores worked, and I could run meld.  (Why
> meld needs working semaphores is beyond me, but I'll worry about that
> another day.)
>
> Can anyone explain to me how those lines affect the configure process?
> And does either line belong in the Makefile at this point?    -- George
>

There is a config option called "SEM" which enables Posix sem support.
By default it is enabled.


> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
>



-- 
Cheers,
Henry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEJt7hYv2F88xOvFWmvNAi_qQX0CwqZko9kBgyA6Rs%2Brb9Y0Cg>