Skip to content

Commit f37dadb

Browse files
authored
Merge pull request #70 from alansley/Fix#68-UnityEditorCrashInLinux
Adjusted Makefile to prevent SQLite calls hitting the system libs which prevents Unity editor crashes in Linux.
2 parents 2851fb5 + d3c14a5 commit f37dadb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Plugins/Makefile

+6-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ lib/windows/%/gilzoide-sqlite-net.dll: lib/windows/%/sqlite3.o~ | lib/windows/%
3939

4040
# Linux
4141
lib/linux/%/libgilzoide-sqlite-net.so: CFLAGS += -fPIC
42-
lib/linux/%/libgilzoide-sqlite-net.so: LINKFLAGS += -shared -lm
42+
43+
# Note: The "-Wl,-Bsymbolic" flags prevent the dynamic linker from interposing the plugin’s calls to its
44+
# own exported symbols with identically-named symbols in other loaded libraries (like /usr/lib/libsqlite3.so.0)
45+
# which can cause a Unity Editor crash otherwise.
46+
lib/linux/%/libgilzoide-sqlite-net.so: LINKFLAGS += -shared -lm -Wl,-Bsymbolic
47+
4348
lib/linux/%/libgilzoide-sqlite-net.so: lib/linux/%/sqlite3.o~ | lib/linux/%
4449
$(CC) -o $@ $^ $(LINKFLAGS)
4550

Binary file not shown.

0 commit comments

Comments
 (0)