Обсуждение: Issue in compiling postgres on latest macOS 14.1.1

Поиск
Список
Период
Сортировка

Issue in compiling postgres on latest macOS 14.1.1

От
Shaik Mohammad Mujeeb
Дата:
Hi Team,

After updating to macOS 14.1.1, I am facing below error while compiling postgres. Can someone help me in solving this?

ld: multiple errors: archive member '/' not a mach-o file in '/src/port/libpgport.a'; archive member '/' not a mach-o file in '/src/common/libpgcommon.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [zic] Error 1
make[1]: *** [all-timezone-recurse] Error 2
make: *** [all-src-recurse] Error 2



Thanks & Regards,
Mujeeb

Re: Issue in compiling postgres on latest macOS 14.1.1

От
b55white
Дата:
On Nov 13, 2023 at 3:45 AM, Shaik Mohammad Mujeeb <smmujeeb2001@gmail.com> wrote:

Hi Team,

After updating to macOS 14.1.1, I am facing below error while compiling postgres. Can someone help me in solving this?

ld: multiple errors: archive member '/' not a mach-o file in '/src/port/libpgport.a'; archive member '/' not a mach-o file in '/src/common/libpgcommon.a'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [zic] Error 1
make[1]: *** [all-timezone-recurse] Error 2
make: *** [all-src-recurse] Error 2



Thanks & Regards,
Mujeeb


You didn't specify whether those files exist at the expected locations. 


Brad. 

Re: Issue in compiling postgres on latest macOS 14.1.1

От
Tom Lane
Дата:
Shaik Mohammad Mujeeb <smmujeeb2001@gmail.com> writes:
> After updating to macOS 14.1.1, I am facing below error while compiling
> postgres. Can someone help me in solving this?

> ld: multiple errors: archive member '/' not a mach-o file in
> '/src/port/libpgport.a'; archive member '/' not a mach-o file in
> '/src/common/libpgcommon.a'

Hmm.  I kind of wonder if you are doing something odd like trying
to build in a directory path whose name contains spaces.  We aren't
terribly clean about weird path names at build time.

Beyond that, you've given exactly zero context that would help
anyone else in understanding or duplicating the problem.
"It doesn't work on macOS 14.1.1" is not useful, because that
works fine for me and a number of other people.

            regards, tom lane



Re: Issue in compiling postgres on latest macOS 14.1.1

От
Shaik Mohammad Mujeeb
Дата:
Hi Tom Lane,

Sorry for not providing the context properly in the previous mail. I have recently updated to macOS 14.1.1 and tried to compile postgres. I have mentioned the steps I had followed and the output of those steps in the attached file. I am getting the same error during build time for all the branches [ REL_14_STABLE, REL_15_STABLE, master, etc,. ]. Please note that the same steps were working fine, when I was in macOS 13.

Please let me know if any other information is required.

Thanks & Regards,
Mujeeb.

On Mon, Nov 13, 2023 at 9:19 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Shaik Mohammad Mujeeb <smmujeeb2001@gmail.com> writes:
> After updating to macOS 14.1.1, I am facing below error while compiling
> postgres. Can someone help me in solving this?

> ld: multiple errors: archive member '/' not a mach-o file in
> '/src/port/libpgport.a'; archive member '/' not a mach-o file in
> '/src/common/libpgcommon.a'

Hmm.  I kind of wonder if you are doing something odd like trying
to build in a directory path whose name contains spaces.  We aren't
terribly clean about weird path names at build time.

Beyond that, you've given exactly zero context that would help
anyone else in understanding or duplicating the problem.
"It doesn't work on macOS 14.1.1" is not useful, because that
works fine for me and a number of other people.

                        regards, tom lane
Вложения

Re: Issue in compiling postgres on latest macOS 14.1.1

От
Tom Lane
Дата:
Shaik Mohammad Mujeeb <smmujeeb2001@gmail.com> writes:
> Sorry for not providing the context properly in the previous mail. I have
> recently updated to macOS 14.1.1 and tried to compile postgres. I have
> mentioned the steps I had followed and the output of those steps in the
> attached file. I am getting the same error during build time for all the
> branches [ REL_14_STABLE, REL_15_STABLE, master, etc,. ]. Please note that
> the same steps were working fine, when I was in macOS 13.

Hm.  There's not anything obviously wrong in this make trace, until
it blows up trying to use libpgcommon.a.  I think there must be
something wrong with your tool chain.  Ideas to check:

* Did you update Xcode/Command Line Tools along with your OS?
If you use Xcode, note that you typically have to open it and
let it install derived files before everything's up to date.

* If you use MacPorts or Homebrew, maybe that's out of date?
Try removing the associated directories from your PATH to see
if it works better.

* It doesn't look like you're using ccache, but if you are,
flushing its cache might not be a bad idea.

            regards, tom lane



Re: Issue in compiling postgres on latest macOS 14.1.1

От
Alban Hertroys
Дата:
> On 13 Nov 2023, at 18:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:

(…)

> * If you use MacPorts or Homebrew, maybe that's out of date?
> Try removing the associated directories from your PATH to see
> if it works better.

Perhaps even worse; you had old binaries from an Intel architecture that were migrated onto a new ARM-based
architecture?In that case the Homebrew uninstall scripts won’t even work anymore - at least not w/o Rosetta 2 - as
they’reIntel-based too. 

A migration assistant can also work too well, I found.

Alban Hertroys
--
There is always an exception to always.







Re: Issue in compiling postgres on latest macOS 14.1.1

От
Shaik Mohammad Mujeeb
Дата:
Hi Team,

As said by Tom Lane, I had some outdated binaries in my PATH. After removing those outdated binaries from the PATH, I didn't face any errors in postgres compilation.

Thank you so much for all your assistance.

Regards,
Mujeeb.

On Tue, Nov 14, 2023 at 1:29 AM Alban Hertroys <haramrae@gmail.com> wrote:

> On 13 Nov 2023, at 18:00, Tom Lane <tgl@sss.pgh.pa.us> wrote:

(…)

> * If you use MacPorts or Homebrew, maybe that's out of date?
> Try removing the associated directories from your PATH to see
> if it works better.

Perhaps even worse; you had old binaries from an Intel architecture that were migrated onto a new ARM-based architecture? In that case the Homebrew uninstall scripts won’t even work anymore - at least not w/o Rosetta 2 - as they’re Intel-based too.

A migration assistant can also work too well, I found.

Alban Hertroys
--
There is always an exception to always.