Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Published copy lacks 32-bit builds #1

Open
Ade-Omari opened this issue Mar 28, 2018 · 7 comments
Open

Published copy lacks 32-bit builds #1

Ade-Omari opened this issue Mar 28, 2018 · 7 comments
Assignees

Comments

@Ade-Omari
Copy link

Good Day,

I am having an issue with the svmachine you've created in Stata. After I run this code within my loop, I get:

local t = 4 local k = 16 local split = floor(k'/t') local train = "1/=split'-1'" local test = "split'/k'" svmachines shower i.trans_from in train', type(svr) sv(Is_SV)
`

i.trans_from _Itrans_fro_1-3 (naturally coded; _Itrans_fro_1 omitted) file _svm_getenv.plugin not found ensurelib's prerequisites are missing. If you are running this from the source repo you need to 'make'. (error occurred while loading svm_ensurelib.ado) (error occurred while loading _svm_train.ado) r(601);

Is it a coding issue that I am having? Or, is it a bug in the .ado file?

Ade-Omari

@Ade-Omari
Copy link
Author

By the way; I am using Stata 14.2 on a Windows OS 32bit computer (not a 64bit), could this be the problem?

@kousu kousu self-assigned this May 13, 2018
@kousu
Copy link
Owner

kousu commented May 13, 2018

Hi there @Ade-Omari; sorry I missed your bug report, sometimes github notifications get buried in my inbox. To help us debug, can you answer if you installed svmachines with net install st or from source? Can you search your Stata install directory for _svm_getenv.plugin? It should be C:\ado\plus\_\_svm_getenv.plugin.

Your guess about the architecture is a good one. All the .plugin files are .DLLs, so loading them requires loading the right version and I didn't discover a way to distinguish mismatched architecture from a missing file. However, we made sure to support 32 bit Windows so I wouldn't think that would be the issue.

@kousu
Copy link
Owner

kousu commented May 13, 2018

Oh dear, but I just looked at https://www.stata-journal.com/software/sj16-4/st0461.pkg and it contains

d SJ16-4 st0461. Support vector machines
d Support vector machines
d by Nick Guenther, University of Waterloo,
d      Waterloo, Canada
d    Matthias Schonlau, University of Waterloo,
d      Waterloo, Canada
d Support:  nguenthe@@uwaterloo.ca,
d           schonlau@@uwaterloo.ca
d After installation, type help ^svmachines^,
d   ^export svmlight^, and ^import svmlight^

g LINUX st0461/_svmachines.forlinux _svmachines.plugin
g LINUX st0461/_svm_dlopenable.forlinux _svm_dlopenable.plugin
g LINUX st0461/_svm_getenv.forlinux _svm_getenv.plugin
g LINUX st0461/_svmlight.forlinux _svmlight.plugin
g LINUX st0461/_svm_setenv.forlinux _svm_setenv.plugin
g LINUX64 st0461/_svmachines.forlux64 _svmachines.plugin
g LINUX64 st0461/_svm_dlopenable.forlux64 _svm_dlopenable.plugin
g LINUX64 st0461/_svm_getenv.forlux64 _svm_getenv.plugin
g LINUX64 st0461/_svmlight.forlux64 _svmlight.plugin
g LINUX64 st0461/_svm_setenv.forlux64 _svm_setenv.plugin
g MACINTEL64 st0461/_svmachines.formacintel64 _svmachines.plugin
g MACINTEL64 st0461/_svm_dlopenable.formacintel64 _svm_dlopenable.plugin
g MACINTEL64 st0461/_svm_getenv.formacintel64 _svm_getenv.plugin
g MACINTEL64 st0461/_svmlight.formacintel64 _svmlight.plugin
g MACINTEL64 st0461/_svm_setenv.formacintel64 _svm_setenv.plugin
G WIN64A st0461/libsvm.forwin64a libsvm.dll
g WIN64A st0461/_svmachines.forwin64a _svmachines.plugin
g WIN64A st0461/_svm_dlopenable.forwin64a _svm_dlopenable.plugin
g WIN64A st0461/_svm_getenv.forwin64a _svm_getenv.plugin
g WIN64A st0461/_svmlight.forwin64a _svmlight.plugin
g WIN64A st0461/_svm_setenv.forwin64a _svm_setenv.plugin
f st0461/attitude_indicators.dta
f st0461/binary_classification_example.do
f st0461/class_probability_example.do
f st0461/export_svmlight.ado
f st0461/export_svmlight.sthlp
f st0461/import_svmlight.ado
f st0461/import_svmlight.sthlp
f st0461/multiclass_classification_example.do
f st0461/regression_example.do
f st0461/svmachines.ado
f st0461/svmachines_example.ado
f st0461/svmachines.sthlp
f st0461/svm_ensurelib.ado
f st0461/svm_examples.ihlp
f st0461/_svm_model2stata.ado
f st0461/svm_predict.ado
f st0461/_svm_train.ado

Notice that there's no "WIN" lines in there. So somewhere between coding and publishing a critical part got lost; I'm not sure where the ball got dropped, nor totally how to get the package updated with a fix.

I don't have a Windows machine active right now so I can't do the build for you easily; if you're feeling brave you can try getting MinGW and gmake running as described in the dev guide and then run

get clone https://github.com/kousu/statasvm/
cd statasvm
make

This should produce the .plugin files you're missing.

Otherwise, I am attempting to do some maintenance on this code now so I will be digging out Windows VMs over the next couple months so if you're patient I might be able to produce you a new package.

@kousu kousu changed the title Problem with svmachine.ado Published copy lacks 32-bit builds May 13, 2018
@kousu
Copy link
Owner

kousu commented May 13, 2018

Oh! I just remembered: I thought ahead and committed a binary distribution to the repo here. You can try that. It is a very tiny bit out of date--the help files got tweaked by the Stata Journal editors--but it has the software you need.

Download and unzip that file, say to C:\Users\adeomari\svmachines then do

// this path needs to be wherever the file "svmachines.pkg" ended up
net use C:\Users\adeomari\
net install svmachines

kousu added a commit that referenced this issue May 13, 2018
related: issue #1

Also, conform the Stata syntax to convention.
@kousu
Copy link
Owner

kousu commented May 13, 2018

Oh, I actually just looked closer at that zip file again, and it too is missing the bin/WIN/ files. So the oversight was on me: when we were getting ready for publication I somehow skipped over doing a final 32 bit Windows build.

kousu added a commit that referenced this issue May 13, 2018
related: issue #1

Also, conform the Stata syntax to convention.
@Ade-Omari
Copy link
Author

Okay, thank you. I kind of figured it out, because I didn't see the 32-bit file. So I started using a 64-bit computer and the command worked.

Thanks for replying and I'm glad to bring it to your attention.

@kousu
Copy link
Owner

kousu commented Aug 13, 2019

Just an update on this: I've had another few reports of this issue, and since I don't see why the long march of technology needs to be quite so jackbooted, I'm planning to start doing 32-bit builds properly. I think I can use Travis-CI's mixed Windows/macOS/Linux environment to cover all possible combinations and produce a single unified package. Stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants