Skip to content

Unable to compile wal2json on Mac M1 #281

Description

@mr-nano

I'm trying to compile wal2json on Mac M1 (commit - 75629c2 ) with pg_conf as:

BINDIR = /Users/USER/anaconda3/bin
DOCDIR = /Users/USER/anaconda3/share/doc
HTMLDIR = /Users/USER/anaconda3/share/doc
INCLUDEDIR = /Users/USER/anaconda3/include
PKGINCLUDEDIR = /Users/USER/anaconda3/include
INCLUDEDIR-SERVER = /Users/USER/anaconda3/include/server
LIBDIR = /Users/USER/anaconda3/lib
PKGLIBDIR = /Users/USER/anaconda3/lib
LOCALEDIR = /Users/USER/anaconda3/share/locale
MANDIR = /Users/USER/anaconda3/share/man
SHAREDIR = /Users/USER/anaconda3/share
SYSCONFDIR = /Users/USER/anaconda3/etc
PGXS = /Users/USER/anaconda3/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--prefix=/Users/USER/anaconda3' '--with-readline' '--with-libraries=/Users/USER/anaconda3/lib' '--with-includes=/Users/USER/anaconda3/include' '--with-openssl' '--with-gssapi' 'PG_SYSROOT=undefined' 'build_alias=arm64-apple-darwin20.0.0' 'host_alias=arm64-apple-darwin20.0.0' 'CC=arm64-apple-darwin20.0.0-clang' 'CFLAGS=-ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/USER/anaconda3/include -fdebug-prefix-map=/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_e997o28lzi/croot/postgresql-split_1687380402610/work=/usr/local/src/conda/postgresql-split-12.15 -fdebug-prefix-map=/Users/USER/anaconda3=/usr/local/src/conda-prefix' 'LDFLAGS=-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/USER/anaconda3/lib -L/Users/USER/anaconda3/lib' 'CPPFLAGS=-D_FORTIFY_SOURCE=2 -isystem /Users/USER/anaconda3/include -mmacosx-version-min=11.1' 'CXX=' 'CLANG=arm64-apple-darwin20.0.0-clang' 'PKG_CONFIG_PATH=/Users/USER/anaconda3/lib/pkgconfig'
CC = arm64-apple-darwin20.0.0-clang
CPPFLAGS = -D_FORTIFY_SOURCE=2 -isystem /Users/USER/anaconda3/include -mmacosx-version-min=11.1 -I/Users/USER/anaconda3/include
CFLAGS = -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 -Wno-compound-token-split-by-macro -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/USER/anaconda3/include -fdebug-prefix-map=/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_e997o28lzi/croot/postgresql-split_1687380402610/work=/usr/local/src/conda/postgresql-split-12.15 -fdebug-prefix-map=/Users/USER/anaconda3=/usr/local/src/conda-prefix
CFLAGS_SL =
LDFLAGS = -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/USER/anaconda3/lib -L/Users/USER/anaconda3/lib -L/Users/USER/anaconda3/lib -Wl,-dead_strip_dylibs
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm
VERSION = PostgreSQL 12.15

And the clang -v results in

clang -v
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

The error becomes:

arm64-apple-darwin20.0.0-clang -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 -Wno-compound-token-split-by-macro -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/USER/anaconda3/include -fdebug-prefix-map=/var/folders/nz/j6p8yfhx1mv_0grj5xl4650h0000gp/T/abs_e997o28lzi/croot/postgresql-split_1687380402610/work=/usr/local/src/conda/postgresql-split-12.15 -fdebug-prefix-map=/Users/USER/anaconda3=/usr/local/src/conda-prefix  -I. -I./ -I/Users/USER/anaconda3/include/server -I/Users/USER/anaconda3/include/internal  -D_FORTIFY_SOURCE=2 -isystem /Users/USER/anaconda3/include -mmacosx-version-min=11.1  -I/Users/USER/anaconda3/include  -c -o wal2json.o wal2json.c
make: arm64-apple-darwin20.0.0-clang: No such file or directory
make: *** [wal2json.o] Error 1

Can someone help how to fix this issue?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions