Skip to content

Commit 6d29159

Browse files
authored
Merge pull request #549 from MEDomicsLab/ssFixes
fixed macOS issues in superset env and superset service kill
2 parents cd7b125 + 5eaa731 commit 6d29159

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

pythonCode/modules/superset/SupersetEnvManager.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,21 @@ def _get_build_env(self):
4141
"""
4242

4343
env = os.environ.copy()
44-
if sys.platform != "win32":
44+
if sys.platform == "darwin":
45+
# Force the compiler to use the system SDK and headers
46+
cc = shutil.which("clang") or shutil.which("gcc")
47+
cxx = shutil.which("clang++") or shutil.which("g++")
48+
if cc:
49+
env["CC"] = cc
50+
if cxx:
51+
env["CXX"] = cxx
52+
53+
# Critical for 'cryptography' and 'python-geohash' compilation
54+
env["LDFLAGS"] = "-L/usr/local/opt/openssl/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"
55+
env["CPPFLAGS"] = "-I/usr/local/opt/openssl/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
56+
# Prevents error: 'implicit declaration of function' during geohash build
57+
env["CFLAGS"] = "-Wno-error=implicit-function-declaration"
58+
elif sys.platform != "win32":
4559
cc = shutil.which("gcc") or shutil.which("cc")
4660
cxx = shutil.which("g++") or shutil.which("c++")
4761
if cc:

renderer/components/mainPages/superset/SupersetFrame.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ const SupersetDashboard = () => {
299299
})
300300
} else if (system === "darwin") {
301301
// macOS
302-
exec(`pkill -f superset`, (err, stdout, stderr) => {
302+
exec(`/usr/bin/pkill -f superset`, (err, stdout, stderr) => {
303303
if (err) {
304304
console.error(err)
305305
toast.error("Error killing Superset", {autoClose: 5000})

0 commit comments

Comments
 (0)