The MariaDB client library has symbols that conflict with Pike.
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7560
Reported by @grubba
$ ./start --once --gdb --debug
[...]
: Pike version: Pike v8.0 release 106
: Product version: Roxen WebServer 6.0.63-test
: Operating system: SunOS 5.10 (i86pc)
16:54:59 : Starting MySQL ...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
rehash_list_backwards (h=0xa6ba00, n=0xf) at /tmp/dist/6.0/pike.sol10_x86_64/pike/src/hashtable.c:52
52 rehash_list_backwards(h,n->next);
(gdb) bt
#0 rehash_list_backwards (h=0xa6ba00, n=0xf)
at /tmp/dist/6.0/pike.sol10_x86_64/pike/src/hashtable.c:52
#1 0x00000000004be6b0 in hash_insert (h=0xe1c930, s=0xda2fa0)
at /tmp/dist/6.0/pike.sol10_x86_64/pike/src/hashtable.c:52
#2 0xfffffd7ffe0b382e in mysql_optionsv ()
from /tmp/dist/6.0/roxen/server-6.0.63/pike/lib/modules/___Mysql.so
[...]
$ nm lib/modules/__Mysql.so | grep hash [1969] | 364090| 11|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2._hash_init.func [888] | 363950| 12|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_delete.func [1863] | 363925| 13|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_element.func [1888] | 364080| 10|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_free.func [2116] | 363962| 12|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_insert.func [2047] | 364071| 9|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_key.func [903] | 364061| 10|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_mask.func [841] | 363983| 10|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_next.func [1277] | 364047| 14|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_rec_mask.func [1169] | 363993| 12|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_search.func [1639] | 363938| 12|OBJT |GLOB |0 |15 |.XBUfPHmKvY_VUx2.hash_update.func [1823] | 355456| 16|OBJT |GLOB |0 |15 |.XBUfPHmNvY_VUU3.ma_get_hash_key.func [1188] | 356299| 13|OBJT |GLOB |0 |15 |.XBUfPHmNvY_VUU3.ma_hash_free.func [1580] | 365432| 14|OBJT |GLOB |0 |15 |.XBUfPHmXvY_VUz4.hash_password.func [1535] | 280976| 170|FUNC |GLOB |0 |12 |_hash_init [1666] | 283184| 886|FUNC |GLOB |0 |12 |hash_delete [1837] | 284512| 34|FUNC |GLOB |0 |12 |hash_element [832] | 281152| 124|FUNC |GLOB |0 |12 |hash_free [879] | 282224| 947|FUNC |GLOB |0 |12 |hash_insert [512] | 281280| 45|FUNC |LOCL |0 |12 |hash_key [513] | 281328| 27|FUNC |LOCL |0 |12 |hash_mask [1069] | 281936| 145|FUNC |GLOB |0 |12 |hash_next [2068] | 304640| 141|FUNC |GLOB |0 |12 |hash_password [514] | 281360| 80|FUNC |LOCL |0 |12 |hash_rec_mask [2001] | 281712| 218|FUNC |GLOB |0 |12 |hash_search [1396] | 284080| 429|FUNC |GLOB |0 |12 |hash_update [1423] | 210240| 25|FUNC |GLOB |0 |12 |ma_get_hash_key [1486] | 210272| 16|FUNC |GLOB |0 |12 |ma_hash_free
$ nm hashtable.o | grep hash_ [17] | 192| 34|FUNC |GLOB |0 |1 |create_hash_table [21] | 416| 350|FUNC |GLOB |0 |1 |hash_insert [16] | 0| 69|FUNC |GLOB |0 |1 |hash_lookup [19] | 240| 176|FUNC |GLOB |0 |1 |hash_rehash [22] | 768| 311|FUNC |GLOB |0 |1 |hash_unlink [8] | 80| 102|FUNC |LOCL |0 |1 |rehash_list_backwards
As the stuff in hashtable.c seems only to be used by cpp(), it seems reasonable to just add a prefix to Pike's symbols.