I've managed to get it compiled with clang and perl.
There are a lot of patches that need to be in place for it to actually run though. There's a difference in the way gcc and clang process function arguments(basically they are reversed, left to right vs right to left).
For example the line is fine with GCC, but creates a segfault when compiled with clang:
Code:
if (RunQuery(query, MakeAnyLenString(&query, "SELECT count(slot) from aa_effects where aaid=%i", skill_id), errbuf, &result)) {
Code needs to be rewritten as follows
Code:
uint32 len_query = MakeAnyLenString(&query, "SELECT count(slot) from aa_effects where aaid=%i", skill_id);
if (RunQuery(query, len_query, errbuf, &result)) {
According to the c++ spec, the compiler is allowed to determine the order of parameter resolution.
As far as what I did to get Perl working correctly, I don't remember at this point, but I remember fighting with it, so I'm pretty sure I have that worked out. It's just been a while since I got it all working last. Might be just a simple change to the cmake files.
I can share my work if there is any interest.