Open markp2 opened 5 years ago
Sadly, these instructions did not work for me with macOS Mojave v 10.14.6, python 3.7.4, PostgreSQL 12, today's clone of git://github.com/Kozea/Multicorn.git, and Xcode 11.3.1.
Incidentally, step 3, above, appears to already be the default in the Makefile.
I just re-built Multicorn successfully on Mac OSX Catalina 10.15.5
1.Use brew to install postgresql 12. Then add to you path:
PATH=$PATH:/usr/local/Cellar/postgresql/12.3_4/bin
2.Clone the repo:
git clone git://github.com/Kozea/Multicorn.git
cd Multicorn
3.Run make but override the 2.7 used by default with your newer version 3.6 to make the install:
sudo ARCHFLAGS="-arch x86_64" make -d PYTHON_OVERRIDE=python3.6 install
Versions: macos 10.15.2, Python 3.7, postgresql 11.5
I try to install multicorn in macos 10.15.2 . I add /usr/local/Cellar/postgresql/11.5_1/bin to path ,and python version is 3.7 so I use
cd Multicorn
sudo ARCHFLAGS="-arch x86_64" make -d PYTHON_OVERRIDE=python3.7 install
I meet the problem
Python version is 3.7 Usage: /usr/local/anaconda3/bin/python3.7-config [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir] clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -bundle -multiply_defined suppress -o multicorn.so src/errors.o src/python.o src/query.o src/multicorn.o -L/usr/local/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs -bundle_loader /usr/local/Cellar/postgresql/11.5_1/bin/postgres -lpython3.7m -ldl -framework CoreFoundation -L/usr/local/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation ld: -stack_size option can only be used when linking a main executable clang-10: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [multicorn.so] Error 1
it shows
ld: -stack_size option can only be used when linking a main executable clang-10: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [multicorn.so] Error 1
thanks all.
Versions: macos 10.15.2, Python 3.7, postgresql 11.5 I try to install multicorn in macos 10.15.2 . I add /usr/local/Cellar/postgresql/11.5_1/bin to path ,and python version is 3.7 so I use
cd Multicorn
sudo ARCHFLAGS="-arch x86_64" make -d PYTHON_OVERRIDE=python3.7 install
I meet the problemPython version is 3.7 Usage: /usr/local/anaconda3/bin/python3.7-config [--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir] clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -bundle -multiply_defined suppress -o multicorn.so src/errors.o src/python.o src/query.o src/multicorn.o -L/usr/local/lib -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs -bundle_loader /usr/local/Cellar/postgresql/11.5_1/bin/postgres -lpython3.7m -ldl -framework CoreFoundation -L/usr/local/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation ld: -stack_size option can only be used when linking a main executable clang-10: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [multicorn.so] Error 1
it showsld: -stack_size option can only be used when linking a main executable clang-10: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [multicorn.so] Error 1
thanks all.
I solve it .Because in Mac OSX Terminal python3-config --ldflags it will give me
-L/usr/local/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation -Wl,-stack_size,1000000 -framework CoreFoundation
so I changed the entry to the PY_LDFLAGS option in makefile to -L/usr/local/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework CoreFoundation i.e. everything before the -Wl flag.
# PY_LDFLAGS = $(shell ${PYTHON_CONFIG} --ldflags)
PY_LDFLAGS = -L/usr/local/anaconda3/lib/python3.7/config-3.7m-darwin -lpython3.7m -ldl -framework
but I met another problem I don't know how to solve.
Having spent the best part of a day attempting to build a version on Mac OSX, thought I would write up the process gleaned here and from others to here to help anyone!
Versions: MacOS high Sierra 10.13.6, Python 3.6, postgresql 10.5, Multicorn 1.3.4, Xcode 10.0.
1.Use brew to install postgresql. I previously was using EDB+language pack and it failed with a large number of link errors, likely due to not having the developer version. Then add to your path:
2.Clone the repo:
3.Modify the Makefile by changing lowercase darwin to uppercase Darwin:
4.Since Xcode 10 ships with a newer version of the SDK, you will need to create an alias like:
5.Run make but override the 2.7 Python used by default with your newer version e.g. 3.6 to make the install: