forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit46ddbbb
committed
Improve (I hope) our autolocation of the Python shared library.
Older versions of Python produce garbage (or at least useless) values ofget_config_vars('LDLIBRARY'). Newer versions produce garbage (or at leastuseless) values of get_config_vars('SO'), which was defeating our configurelogic that attempted to identify where the Python shlib really is. The netresult, at least with a stock Python 3.5 installation on macOS, was thatwe were linking against a static library in the mistaken belief that it wasa shared library. This managed to work, if you count statically absorbinglibpython into plpython.so as working. But it no longer works as of commitd51924b, because now we get separate static copies of libpython inplpython.so and hstore_plpython.so, and those can't interoperate on thesame data. There are some other infelicities like assuming that nobodyever installs a private version of Python on a macOS machine.Hence, forget about looking in $python_configdir for the Python shlib;as far as I can tell no version of Python has ever put one there, andcertainly no currently-supported version does. Also, rather than relyingon get_config_vars('SO'), just try all the possibilities for shlibextensions. Also, rather than trusting Py_ENABLE_SHARED, believe we'vefound a shlib only if it has a recognized extension. Last, explicitlycope with the possibility that the shlib is really in /usr/lib and$python_libdir is a red herring --- this is the actual situation on oldermacOS, but we were only accidentally working with it.Discussion: <5300.1475592228@sss.pgh.pa.us>1 parent6c9c95e commit46ddbbb
3 files changed
+67
-97
lines changedLines changed: 40 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
66 | 74 |
| |
67 | 75 |
| |
68 | 76 |
| |
69 | 77 |
| |
70 | 78 |
| |
71 | 79 |
| |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 | 80 |
| |
76 |
| - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
77 | 84 |
| |
78 |
| - | |
79 | 85 |
| |
80 |
| - | |
81 | 86 |
| |
82 |
| - | |
83 |
| - | |
84 |
| - | |
| 87 | + | |
| 88 | + | |
85 | 89 |
| |
86 |
| - | |
87 |
| - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
88 | 111 |
| |
89 |
| - | |
90 | 112 |
| |
| 113 | + | |
91 | 114 |
| |
92 | 115 |
| |
93 | 116 |
| |
|
Lines changed: 27 additions & 46 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7622 | 7622 |
| |
7623 | 7623 |
| |
7624 | 7624 |
| |
7625 |
| - | |
7626 |
| - | |
7627 |
| - | |
7628 | 7625 |
| |
7629 |
| - | |
| 7626 | + | |
| 7627 | + | |
| 7628 | + | |
7630 | 7629 |
| |
7631 |
| - | |
7632 | 7630 |
| |
7633 |
| - | |
7634 | 7631 |
| |
7635 |
| - | |
7636 |
| - | |
7637 |
| - | |
| 7632 | + | |
| 7633 | + | |
7638 | 7634 |
| |
7639 |
| - | |
7640 |
| - | |
| 7635 | + | |
| 7636 | + | |
| 7637 | + | |
| 7638 | + | |
| 7639 | + | |
| 7640 | + | |
| 7641 | + | |
| 7642 | + | |
| 7643 | + | |
| 7644 | + | |
| 7645 | + | |
| 7646 | + | |
| 7647 | + | |
| 7648 | + | |
| 7649 | + | |
| 7650 | + | |
| 7651 | + | |
| 7652 | + | |
| 7653 | + | |
| 7654 | + | |
| 7655 | + | |
7641 | 7656 |
| |
7642 |
| - | |
7643 | 7657 |
| |
| 7658 | + | |
7644 | 7659 |
| |
7645 | 7660 |
| |
7646 | 7661 |
| |
| |||
7649 | 7664 |
| |
7650 | 7665 |
| |
7651 | 7666 |
| |
7652 |
| - | |
7653 |
| - | |
7654 |
| - | |
7655 |
| - | |
7656 |
| - | |
7657 |
| - | |
7658 |
| - | |
7659 |
| - | |
7660 |
| - | |
7661 |
| - | |
7662 |
| - | |
7663 |
| - | |
7664 |
| - | |
7665 |
| - | |
7666 |
| - | |
7667 |
| - | |
7668 |
| - | |
7669 |
| - | |
7670 |
| - | |
7671 |
| - | |
7672 |
| - | |
7673 |
| - | |
7674 |
| - | |
7675 |
| - | |
7676 |
| - | |
7677 |
| - | |
7678 |
| - | |
7679 |
| - | |
7680 |
| - | |
7681 |
| - | |
7682 |
| - | |
7683 |
| - | |
7684 |
| - | |
7685 |
| - | |
7686 | 7667 |
| |
7687 | 7668 |
| |
7688 | 7669 |
| |
|
Lines changed: 0 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
934 | 934 |
| |
935 | 935 |
| |
936 | 936 |
| |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 |
| - | |
947 |
| - | |
948 |
| - | |
949 |
| - | |
950 |
| - | |
951 |
| - | |
952 |
| - | |
953 |
| - | |
954 |
| - | |
955 |
| - | |
956 |
| - | |
957 |
| - | |
958 |
| - | |
959 |
| - | |
960 |
| - | |
961 |
| - | |
962 |
| - | |
963 |
| - | |
964 |
| - | |
965 |
| - | |
966 |
| - | |
967 |
| - | |
968 |
| - | |
969 |
| - | |
970 |
| - | |
971 | 937 |
| |
972 | 938 |
| |
973 | 939 |
| |
|
0 commit comments
Comments
(0)