Re: Our "fallback" atomics implementation doesn't actually work

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Our "fallback" atomics implementation doesn't actually work
Дата
Msg-id 22591.1475691757@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Our "fallback" atomics implementation doesn't actually work  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2016-10-05 14:01:05 -0400, Tom Lane wrote:
>> configure USE_UNNAMED_POSIX_SEMAPHORES=1 --disable-cassert --disable-spinlocks --disable-atomics

> Pretty independent from the complaint at hand, but if I just do that I get
> undefined reference to symbol 'sem_post@@GLIBC_2.2.5'

> I needed to add -pthread -lrt to LDFLAGS to make it work.

Yeah, on my machine man sem_init specifies "Link with -lrt or -pthread".
But I see -lrt getting added into the backend link anyway, presumably
as a result of one of these configure calls:

AC_SEARCH_LIBS(shm_open, rt)
AC_SEARCH_LIBS(shm_unlink, rt)
AC_SEARCH_LIBS(sched_yield, rt)

If we were to try to support USE_UNNAMED_POSIX_SEMAPHORES as default
(which is where I'm thinking about going) we'd have to tweak configure
to check sem_init similarly.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Our "fallback" atomics implementation doesn't actually work
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Our "fallback" atomics implementation doesn't actually work