For most users, the Installation instructions suffice to help them get the STAToolkit installed properly. However, users do occasionally run into system-dependent issues, which require some troubleshooting. If you're having trouble with installation, please check this page to see if other users have encountered the same problem. And if you have successfully overcome an installation problem, please contribute your advice to this page, so that your experience may help others.
User Susan Travers initially had this error message upon installation:
>> make Compiling shared code. LINK : fatal error LNK1181: cannot open input file 'user32.lib' C:\PROGRA~1\MATLAB\R2009A\BIN\MEX.PL: Error: Link of 'multisitearray.mexw32' failed. ??? Error using ==> mex at 218 Unable to complete successfully. Error in ==> make>fixpath at 102 eval(strrep(in,'/',filesep)); Error in ==> make at 25 fixpath(['mex' args 'input/multisitearray.c' common_files]);
Susan contacted me by email for help. Notice in the error above, the file 'user32.lib' is either missing or corrupt. Since this file is not needed by the toolkit, per say, but by the operating system, it was an indication that the compiler was not properly installed. Susan was running on the following system: Windows XP Professional 2002, service pack 3, Matlab 7.8.0.347 (R2009a), Microsoft Visual C++ 2003. The fact that her versions of Matlab and Microsoft Visual C++ were separated by six years was further indication that the problem was related to the compiler. And, in fact, when Susan installed the newer Microsoft Visual C++ 2008 (Express Edition), the issue was resolved. — Michael Repucci 2009/06/29 17:04
Matlab includes the library files libstdc++ and libgcc_s, which are necessary for compiling and running MEX files built from C++ code with gcc. However, if you use a non-supported version of gcc, as I do—gcc 4.3.3 with Matlab R2008b—then the compilation instructions in make.m will (apparently by default) use the shared libraries on your system, but the execution of the resultant MEX files will try to use the included library files found in $MATLABPATH/sys/os/$ARCH/. I overcame this issue by symlinking to the updated files on my system:
ln -s /lib/libgcc_s.so.1 /usr/local/matlabR2008b/sys/os/glnx86/libgcc_s.so.1 ln -s /usr/lib/libstdc++.so.6.0.10 /usr/local/matlabR2008b/sys/os/glnx86/libstdc++.so.6
Be sure to use the appropriate paths for your system. You may also need to run the command with sudo.
Other Matlab users have experienced a similar issue, and suggested an alternative approach, which involves a simple change to the LD_LIBRARY_PATH in your Matlab startup options. Unfortunately, this did not work for me. — Michael Repucci 2009/07/22 17:28
We haven't yet had the chance to fully test the STAToolkit on a 64-bit machine—we don't have one at the moment—but there's no reason to believe that it shouldn't work just fine. After a small struggle with the installation, user Ian M. Andolina discovered that STAToolkit does run successfully on a 64-bit machine. Ian contacted me when he was having difficulty with the installation, and I helped him zone-in on the following error:
ld: warning: in /opt/local/lib/libgsl.dylib, file is not of required architecture
Notice that this is a linker, not a compiler error. The STAToolkit compiled just fine, but when the linker attempted to link the STAToolkit binaries with the GNU Scientific Library (GSL)—one of the STAToolkit dependencies—it failed. Such external libraries, once installed, consist of pre-compiled files with extensions such as DLL, A, SO, or DYLIB (depending on your operating system and processor type). This error indicates that the compiled STAToolkit binaries couldn't find a compatible library file, due to differences in the computer architecture under which the library was compiled.
Fortunately, with this note Ian realized that his system—64-bit Mac OS X Snow Leopard (10.6.1)—creates 64-bit libraries with Fink or MacPorts by default, which were incompatible with the STAToolkit binaries created by a 32-bit Matlab process. When he switched Matlab to run as a 64-bit process, STAToolkit compiled and linked successfully, and he was able to confirm its success with staverify and the included demos. Ian was subsequently able to create a universal binary of the GSL library with which he was able to successfully link 32-bit and 64-bit versions of the STAToolkit. He also noted a significantly faster execution—1.6 times!—with the 64-bit version of the STAToolkit. — Michael Repucci 2009/10/13 15:09