Building VFML Incremental Decision Tree Segmentation Fault
I'm attempting to compile the VFML toolkit on Ubuntu 10.04. It was originally built using GCC and hasn't been maintained in about 7 years, but it's the only open source implementation of an increment开发者_如何学Cal decision tree algorithm (VFDT), so I'd like to evaluate it.
After fixing a couple minor bugs in the makefile and vfml/src/core/BeliefNet.c, I was able to compile it. However, attempting to run the vfdt
or cvfdt
binaries on the example "banana" dataset (vfml/examples/c45interface/test.data) results in a Segmentation fault.
localhost:vfml$ vfdt -batch -f test
Segmentation fault
My C is a little rusty, and it's been a while since I've debugged these kinds of errors. Can anyone recommend the best way to fix such old code? Is the only route to dig into it with gdb or is there some other way to update the code to work with a modern version of GCC?
The 'best way' to fix old code is to start with a known working environment and migrate to the environment you want. Find a popular stable distribution from the last release date.
If the last release was July 2003, try Red Hat Linux 9 (shrike-i386-disc1.iso, shrike-i386-disc2.iso, shrike-i386-disc3.iso).
Install the distribution with the appropriate tool and library options. Once the distribution is installed try building the source. If you are lucky the source will just build. If not, update the compiler and libraries until the minimum dependencies are satisfied. From there try updating one component (library or compiler) in reasonable size step until you reach a modern toolset. Keep careful track of the last configuration that built sucessfully. This way, if you loose track, you can always go back to the last successful state. Now this may be a lot of work, more than you are willing to do, but I am trying to answer the question asked rather than encourage you to look for a more modern or better supported library. Good luck!
精彩评论