-1

I downloaded postgreSQL V11 source code through github, but failed to compile and install it on macOS. This worked one month ago.

Here are the error messages:

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 zic.o  -L../../src/port -L../../src/common   -Wl,-dead_strip_dylibs   -lpgcommon -lpgport -lz -lreadline -lm  -o zic 
ld: warning: ld: warning: ignoring file ../../src/common/libpgcommon.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/common/libpgcommon.aignoring file ../../src/port/libpgport.a, file was built for archive which is not the architecture being linked (x86_64): ../../src/port/libpgport.a**
I searched on line but failed to find any useful information. Any idea for this? Thanks.
arved
  • 4,401
  • 4
  • 30
  • 53
Ren Chen
  • 155
  • 5

1 Answers1

1

Finally I found the reason why postgreSQL v11 cannot be installed through source package on Mac.

I thought this issue should be simple, however, it is not.

It seems like the compiler is using the GNU ar(1)/ranlib(1) instead of the ones supplied by the Xcode toolchain.

So you need to run which -a ar and which -a ranlib to see the what you have in $PATH.

Then you can solve the problem based on the detailed answer in Static library built for archive which is not the architecture being linked (x86_64)

Ren Chen
  • 155
  • 5