Building libdfconnect yourself/linking against precompiled stuff from other distros: Don't, unless you really know what you are doing. All it takes for it to fail is a simple change in alignment of C++ types or something similar. If I didn't have to hack in using LD_PRELOAD (if it was an official DF API), there would be no such problem, but the way things are right now, libdfconnect has to be binary compatible with DF. LD can detect some of the problems, but not all.
Mixing libs built with different compilers, libc/libstdc++ versions or CFLAGS is just asking for trouble... and that's probably why you can't link to the precompiled libdfhack.so
Anyway, when you build both DT and dfhack, it should work even with 64bit. Actually, I do this all the time - I'm using 64bit Archlinux and the Ubuntu machine is only for building libdfconnect [/spoiler]
This is what I'd really like to do, but so far that still hangs on startup. It looks like it connects properly to the running df instance, but hangs on the line of code that sets the title bar. This happens to be, as far as I can tell, the first time DT actually tries to read something from the connected instance.
I've started over from scratch, and did this:
* Checked out the latest dwarftherapist.git and dwarfhack.git into my src folder.
* Copied the dfconnect lib from dfhack into my dwarf fortress folder and preloaded it (that works fine -- I see the preloading message).
* Built dfhack
* Added the dfhack output to dwarftherapists's LDFLAGS and startup script, and built that.
Unless I missed some key step that you can correct me on, this should run. I'll work on getting a usable backtrace from this, but I dunno how successful I'll be. gdb doesn't seem to like my system -- either PaX prevents it from attaching properly or building everything as PIE prevents it from loading symbols. Soon as my tax refund gets here I'm getting a second Linux system just for development work
--K
I've never run dfhack on a PaX-enabled system and to be honest, I don't think this is a good idea in general. DFHack depends on things being in predictable places. I do counter the ASLR stuff in Vista and 7, but that's fairly simple...
So, some questions
Does DT or dfhack work without the SHM?
Try the dfhack utils. Start with dfsuspend - that's the simplest one and doesn't touch DF's memory at all.
Did you give the compiled DT the right Memory.xml?
Can you also try with all that PaX stuff disabled?
Also, dfhack on Linux has some requirements that are normally met:
A writable /tmp/ for the SHM to work - I guess it works, because you get crashes
It's used to store file locks.
A readable /proc/PID/mem and ability to use ptrace for the 'normal' memory access.
Some security thing could block those and the results wouldn't be pretty.