Skip to content

Commit c1440bd

Browse files
authored
Fixed rpath linker option when using a custom sqlite (TryGhost#1654)
It seems that an old refactoring (~8 years) made a mistake on the way conditions are expressed in gyp. the "conditions" key cannot be set 2 times and the conditions should be all set in the "conditions" array. The impact of this bug is that when sqlite3 is compiled against a custom sqlite3 source tree, the sqlite3 runtime keeps linking with the system sqlite3 instead of linking to the custom compiled sqlite3 library. In my case that lead to a SIGSEGV upon loading an extension.
1 parent 93affa4 commit c1440bd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

binding.gyp

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
"libraries": [
2626
"-l<(sqlite_libname)"
2727
],
28-
"conditions": [ [ "OS=='linux'", {"libraries+":["-Wl,-rpath=<@(sqlite)/lib"]} ] ],
29-
"conditions": [ [ "OS!='win'", {"libraries+":["-L<@(sqlite)/lib"]} ] ],
28+
"conditions": [
29+
[ "OS=='linux'", {"libraries+":["-Wl,-rpath=<@(sqlite)/lib"]} ],
30+
[ "OS!='win'", {"libraries+":["-L<@(sqlite)/lib"]} ]
31+
],
3032
'msvs_settings': {
3133
'VCLinkerTool': {
3234
'AdditionalLibraryDirectories': [

0 commit comments

Comments
 (0)