MagicStats ignores my hacked plugin!
So here's the scenario: You hacked a plugin somehow (created from scratch, modified existing one, whatever), compiled it, linked it, and MagicStats should be able to find plugin (Resources path points to it) - Yet MagicStats -T does not list it. The most likely cause is that there is a dynamic link error with your plugin. Try running MagicStats2 -g -T (debug mode), and it will print something like this:
Install>$ MagicStats2 -C ~/.MagicStats/MSHacked.cfg -P -g
MagicStats v2.0pr9... By: Chris Lattner ([email protected])
Loading configuration file...
Loading configuration file from disk: /home/sabre/.MagicStats/MSHacked.cfg
Loading configuration file from disk: Fancy.cfg
Active Resource Paths:
/home/sabre/MagicStats/Install
/home/sabre/.MagicStats
Failed to load promising external plugin: AfIISAccessFormat from:
/home/sabre/MagicStats/Install/Plugins/AfIISAccessFormat/AfIISAccessFormat.so
Error = /home/sabre/MagicStats/Install/Plugins/AfIISAccessFormat/AfIISAccessFormat.so:
undefined symbol: _17AfIISAccessFormat.FieldNames
...
Whoa... we have an undefined symbol! But what is it? Try running this:
Install>$ echo _17AfIISAccessFormat.FieldNames | c++filt
AfIISAccessFormat::FieldNames
Install>$
Ooops... I forgot to define that. Okay, now that I fixed it, I try again and get:
Install>$ MagicStats2 -C ~/.MagicStats/MSHacked.cfg -P -g
MagicStats v2.0pr9... By: Chris Lattner ([email protected])
Loading configuration file...
Loading configuration file from disk: /home/sabre/.MagicStats/MSHacked.cfg
Loading configuration file from disk: Fancy.cfg
Active Resource Paths:
/home/sabre/MagicStats/Install
/home/sabre/.MagicStats
Loaded plugin: AfIISAccessFormat from:
/home/sabre/MagicStats/Install/Plugins/AfIISAccessFormat/AfIISAccessFormat.so
...
Cool, it works now!!!
Conclusion:
This short guide talks about how to work on MagicStats and how to set it up to not interfere with your normal installation. If you have any questions regarding any of this stuff, or topics for future entries, let me know.
-Chris