Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgresql fails on macOS after removing gcc/g++ symlinks #122

Open
deciduously opened this issue Dec 3, 2024 · 0 comments
Open

Postgresql fails on macOS after removing gcc/g++ symlinks #122

deciduously opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@deciduously
Copy link
Member

The default SDK used to provide gcc and g++ symlinks that pointed to clang and clang++ respectively. The only package that required these is postgresql, where we explicitly set CC and CXX to point to gcc and g++, instead of allowing the configure script to discover clang and clang++. With these links removed, postgres fails to compile:

lang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unuse
d-command-line-argument -Wno-compound-token-split-by-macro -Wno-cast-function-type-strict  -O2 -mtune=generic -pipe -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -fasynchronous-unwind-tables -fexceptions -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fstack-protector-str
ong  -fvisibility=hidden -bundle -o euc_tw_and_big5.dylib big5.o euc_tw_and_big5.o  -L../../../../../../src/port -L../../../../../../src/common  -Wl,-S -L/usr/local/lib -L/usr/local/lib  -Wl,-dead_strip_dylibs -fvisibility=hidden -bundle_loader ../../../../../../src/backend
/postgres
make[3]: *** [/Users/benlovy/.tangram/artifacts/dir_01djj3fqpnwjhwjhpqsnwe6pc6nf24qfdn0w1v5p6p5s3jcak7mhv0/src/Makefile.shlib:278: cyrillic_and_mic.dylib] Error 1
make[3]: Leaving directory '/Users/benlovy/.tangram/tmp/069rtvtd5dw751t5s3anfhxw7c/Users/tangram/work/src/backend/utils/mb/conversion_procs/cyrillic_and_mic'
make[2]: *** [Makefile:25: all-cyrillic_and_mic-recurse] Error 2
Undefined symbols for architecture arm64:
  "_LocalToUtf", referenced from:
      _big5_to_utf8 in utf8_and_big5.o
  "_UtfToLocal", referenced from:
      _utf8_to_big5 in utf8_and_big5.o
  "_check_encoding_conversion_args", referenced from:
      _big5_to_utf8 in utf8_and_big5.o
      _utf8_to_big5 in utf8_and_big5.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/benlovy/.tangram/artifacts/dir_01djj3fqpnwjhwjhpqsnwe6pc6nf24qfdn0w1v5p6p5s3jcak7mhv0/src/Makefile.shlib:278: utf8_and_big5.dylib] Error 1
make[3]: Leaving directory '/Users/benlovy/.tangram/tmp/069rtvtd5dw751t5s3anfhxw7c/Users/tangram/work/src/backend/utils/mb/conversion_procs/utf8_and_big5'
make[2]: *** [Makefile:25: all-utf8_and_big5-recurse] Error 2
Undefined symbols for architecture arm64:
  "_check_encoding_conversion_args", referenced from:
      _euc_jp_to_sjis in euc_jp_and_sjis.o
      _sjis_to_euc_jp in euc_jp_and_sjis.o
      _euc_jp_to_mic in euc_jp_and_sjis.o
      _mic_to_euc_jp in euc_jp_and_sjis.o
      _sjis_to_mic in euc_jp_and_sjis.o
      _mic_to_sjis in euc_jp_and_sjis.o
  "_pg_encoding_verifymbchar", referenced from:
      _euc_jp_to_sjis in euc_jp_and_sjis.o
      _sjis_to_euc_jp in euc_jp_and_sjis.o
      _euc_jp_to_mic in euc_jp_and_sjis.o
      _mic_to_euc_jp in euc_jp_and_sjis.o
      _mic_to_sjis in euc_jp_and_sjis.o
  "_report_invalid_encoding", referenced from:
      _euc_jp_to_sjis in euc_jp_and_sjis.o
      _sjis_to_euc_jp in euc_jp_and_sjis.o
      _euc_jp_to_mic in euc_jp_and_sjis.o
      _mic_to_euc_jp in euc_jp_and_sjis.o
      _sjis_to_mic in euc_jp_and_sjis.o
      _mic_to_sjis in euc_jp_and_sjis.o
  "_report_untranslatable_char", referenced from:
      _mic_to_euc_jp in euc_jp_and_sjis.o
      _mic_to_sjis in euc_jp_and_sjis.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/benlovy/.tangram/artifacts/dir_01djj3fqpnwjhwjhpqsnwe6pc6nf24qfdn0w1v5p6p5s3jcak7mhv0/src/Makefile.shlib:278: euc_jp_and_sjis.dylib] Error 1
make[3]: Leaving directory '/Users/benlovy/.tangram/tmp/069rtvtd5dw751t5s3anfhxw7c/Users/tangram/work/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis'
make[2]: *** [Makefile:25: all-euc_jp_and_sjis-recurse] Error 2

Either diagnose and fix this issue in postgres, or as a last resort, re-introduce the hacky symlinks and use those.

@deciduously deciduously added the bug Something isn't working label Dec 3, 2024
@deciduously deciduously self-assigned this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant