Error running configure on Mac

Поиск
Список
Период
Сортировка
От samay sharma
Тема Error running configure on Mac
Дата
Msg-id CAJxrbywrgbxz2yb=augW4x+UHUFWdcdURN7zNybUchMUmU1ZRg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Error running configure on Mac  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

I was trying to build Postgres from source on my Mac (MacOS Monterey 12.1) and ran into an error when running configure.

./configure


...

checking for gcc option to accept ISO C99... unsupported

configure: error: C compiler "gcc" does not support C99


When I do gcc --version I see:

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/4.2.1

Apple clang version 13.0.0 (clang-1300.0.27.3)

Target: x86_64-apple-darwin21.2.0

Thread model: posix

InstalledDir: /Library/Developer/CommandLineTools/usr/bin


So, it looks like it is using clang to compile and not gcc.


configure runs successfully if I do: ./configure CC=gcc-11 or soft link gcc to gcc-11 and then run configure. However, I didn't find these tips in Platform specific notes in docs: https://www.postgresql.org/docs/9.6/installation-platform-notes.html#INSTALLATION-NOTES-MACOS.


So, I wanted to ask if this behavior is expected and if so, should we update docs to make a note of this?


Regards,

Samay

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: typos
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Error running configure on Mac