Comments (67)
Can you run
!dir c:\ado\plus\g\*gtools*
!dir c:\ado\plus\s\*spooky*
And post the output?
from stata-gtools.
from stata-gtools.
Perhaps; I suspected the issue is that the files are missing. Can you physically navigate to those directories using file explorer? If they are indeed blank, then gtools was not installed correctly. Run
local github "https://raw.githubusercontent.com"
net install gtools, from(`github'/mcaceresb/stata-gtools/master/build/)
And check again using file explorer. If this does not fix the problem then I assume it's a problem with permissions, since it's a server, and you'll have to install gtools in a different folder.
Run the above first. If it's a permissions issue let me know and I can guide you through that install.
from stata-gtools.
from stata-gtools.
You mean that the folders are blank, right? Perhaps there is a discrepancy in the ado paths. How about:
adopath
disp "`c(sysdir_plus)'"
disp "`c(sysdir_personal)'"
You can try and download everything manually. I have placed just the relevant files in the release page (https://github.com/mcaceresb/stata-gtools/releases). You can download gtools-0.12.5.zip
, extract the file, and add
adopath + /path/to/gtools
to your scripts.
from stata-gtools.
These commands show:
. disp "`c(sysdir_plus)'"
c:\ado\plus/
. disp "`c(sysdir_personal)'"
c:\ado\personal/
I mannually removed all gtools installation files from c:/ado/plus and manually installed it from the zip file, as you said. However, I get the same error message while running gcollapse:
"Could not load plugin: c:\ado\plus\g\gtools_windows.plugin
(error occurred while loading _gtools_internal.ado)"
I've also tried to use gegen to check it was some specific problem with gcollapse, but the command gives exactly the same error.
Could it have to do with my Windows version? Windows Server 2016
from stata-gtools.
You said "mannually removed all gtools installation files from c:/ado/plus"; I thought the folders were empty? Anyway, if you did it manually then yes, it might be your windows version.
To check, extract the zip in some a folder but don't move the files. For example, if you extracted them to "C:\testing\gtools" then run, from Stata,
cd C:\testing\gtools
clear
set obs 10
gen x = 1
gcollapse x
capture program drop gtools_plugin
program gtools_plugin, plugin using("gtools_windows.plugin")
And let me know what happens.
from stata-gtools.
No, it wasn't empty before. Installation with net install was successful at first
I've run your code but continue to get the same message:
". gcollapse x
Could not load plugin: .\gtools_windows.plugin
(error occurred while loading _gtools_internal.ado)"
"gcollapse x
Could not load plugin: .\gtools_windows.plugin
(error occurred while loading _gtools_internal.ado)"
from stata-gtools.
I was hoping it was just a permissions thing or an install problem, but it certainly look like it's an issue with the plugin. Hail Mary pass: If you run "disp c(bit)" from Stata, what's the answer?
I don't have access to Windows Server 2016 and I don't know why it wouldn't work there, so this will probably go unfixed for some time.
from stata-gtools.
"disp c(bit)
64"
I've given another shot running it in Compatibility mode with Windows 7&8 and executing as administrator but no luck.
No worries, thanks a lot in any case. That's a great tool, severely improve work with huge datasets!
from stata-gtools.
I ran into the same problem running gegen
with Stata 15.1 on Windows Server 2016.
Gtools ado is installed in a network folder and runs fine from Linux and regular Windows Systems but fails on Windows Server. I also tried compatibility mode (win 7) without success.
Any chance to get this bug fixed. I would like to help, although I have no C++ programming skills.
from stata-gtools.
- Are you able to install programs on the server?
- If not, does the server happen to have Cygwin and MinGW?
Hopefully this is an issue with the gtools code that I can fix rather than spookyhash. If the answer to both of the above are true, I'll try to upload some test plugins for you to try out on the server and see if we can narrow down the problem anyway.
from stata-gtools.
no, to both questions.
Will check with the IT department if they can provide an suitable environment.
from stata-gtools.
Let's try something else before. I'll be uploading some test plugins later today and was hoping you could test them out. No extra programs required.
from stata-gtools.
ok
from stata-gtools.
Please download test.do, test1.plugin, test2.plugin, and spookyhash.dll from here. Then run test.do.
I expect the first test to run and the second should fail. Let me know if that is the case.
from stata-gtools.
as expected:
. cd
L:\Cloud\gtest
. do "L:\Cloud\gtest\test.do"
. program test1, plugin using(test1.plugin)
. plugin call test1
Hello World
.
. program test2, plugin using(test2.plugin)
Could not load plugin: .\test2.plugin
r(9999);
end of do-file
r(9999);
from stata-gtools.
Ok, then the programs I referenced above are not actually the ones required. Do you have access to Visual Studio on the server?
from stata-gtools.
from stata-gtools.
- Can you open the Visual Studio Developer Command Prompt? The command you will need is
msbuild
- You will need a copy of the spookyhash repo.
- Last, you need premake5
The steps are
cd spookyhash\build
premake5.exe vs2013
Replace vs2013
with vs2017
or similar depending on your version. Then open the VS Developer Command Prompt and run
cd spookyhash\build
msbuild SpookyHash.sln
This should generate a version of spookyhash.dll compatible with your system. Let me know how far you get.
PS: If you cannot find msbuild
in your path or you can't open the VS command prompt, the spookyhash repo recommends trying to use the VS GUI. We should try as a backup just in case, but my experience was that the GUI-compiled version did not work with Stata, and I wasn't sure how to configure VS via the GUI to get it to work with Stata. But we can try if you can't get msbuild
to work.
from stata-gtools.
sry, no visual studio
from stata-gtools.
from stata-gtools.
You have to download it and copy it to that location. See: https://premake.github.io/download.html (DL link). Unzip and copy the exe to the build folder.
from stata-gtools.
from stata-gtools.
No worries. I'm glad it's working on your end.
@ppoppitz was experiencing the same issue, so I reckon this might still pop up in the future. Did you ever manage to get premake5.exe to produce an .sln file and were you able to compile it on Visual Studio?
I gather the answer to both of those is no but I wanted to double check.
from stata-gtools.
from stata-gtools.
from stata-gtools.
Finally I got VS 2017.
I was able to run premake5.exe, which generated a .sln file, with the following output:
Der Befehl "git" ist entweder falsch geschrieben oder konnte nicht gefunden werden.
Using x64 architecture
Building configurations...
Running action 'vs2017'...
Done (94ms).
but running msbuild SpookyHash.sln
in the same directory I got the following error message I could not resolve after some googling:
"C:\Users\xxx\gtools_build\spookyhash\build\SpookyHash.sln" (Standardziel) (1) ->
"C:\Users\xxx\gtools_build\spookyhash\build\spookyhash-static.vcxproj" (Standardziel) (2) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Current.targe
ts(108,3): error MSB4019: Das importierte Projekt "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Com
mon7\IDE\VC\VCTargets\Platforms\x64\Platform.targets" wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in
der <Import>-Deklaration korrekt und die Datei auf dem Datenträger vorhanden ist. [C:\Users\xxx\gtools_build\sp
ookyhash\build\spookyhash-static.vcxproj]
"C:\Users\xxx\gtools_build\spookyhash\build\SpookyHash.sln" (Standardziel) (1) ->
"C:\Users\xxx\gtools_build\spookyhash\build\spookyhash-shared.vcxproj" (Standardziel) (3) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Current.targe
ts(108,3): error MSB4019: Das importierte Projekt "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Com
mon7\IDE\VC\VCTargets\Platforms\x64\Platform.targets" wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in
der <Import>-Deklaration korrekt und die Datei auf dem Datenträger vorhanden ist. [C:\Users\xxx\gtools_build\sp
ookyhash\build\spookyhash-shared.vcxproj]
"C:\Users\xxx\gtools_build\spookyhash\build\SpookyHash.sln" (Standardziel) (1) ->
"C:\Users\xxx\gtools_build\spookyhash\build\spookyhash-test.vcxproj" (Standardziel) (4) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.Current.targe
ts(108,3): error MSB4019: Das importierte Projekt "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Com
mon7\IDE\VC\VCTargets\Platforms\x64\Platform.targets" wurde nicht gefunden. Vergewissern Sie sich, dass der Pfad in
der <Import>-Deklaration korrekt und die Datei auf dem Datenträger vorhanden ist. [C:\Users\bued3667\gtools_build\sp
ookyhash\build\spookyhash-test.vcxproj]
0 Warnung(en)
3 Fehler
Verstrichene Zeit 00:00:00.18
sry for the german locale, can't change without admin rights.
from stata-gtools.
Thanks for keeping me up to date.
- Just in case, it might be a good idea to try the versions that worked for me. Can you clean the build and run:
git checkout 2c27b43
premake5.exe vs2013
with msbuild SpookyHash.sln
after?
- Does
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Com
mon7\IDE\VC\VCTargets\Platforms\x64\Platform.targets
exists? If not, the community version of VS might be lacking some components. Not 100% what to DL. Will keep looking into it.
from stata-gtools.
(1)
running premake ...
after checkout ...
I get an error message because git is missing on the server
Error: C:/Users/bued3667/gtest/spookyhash/build/premake5.lua:37: attempt to compare number with nil
after deleting the git check in lines 35-37
I get a SpookyHash.sln file. msbuild
then complains about the missing files under
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Platforms\Win32\Platform.targets
(2)
The reason is of course that files & directories exist only until:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets
from stata-gtools.
After the latest Stata and ado update I can run gtools successfully on win server 2016. I don't really know what was wrong before but I'm happy it's working now!
from stata-gtools.
Good to hear! @dgcbritto are you still experiencing the issue? You can update state via update all
, I think. Then re-install gtools.
from stata-gtools.
from stata-gtools.
I am also receiving this error:
Could not load plugin: C:\ado\plus\g\gtools_windows.plugin
(error occurred while loading _gtools_internal.ado)
from stata-gtools.
- Are you also on Windows server 2016? Can you run
which gtools
dir c:\ado\plus\g\*gtools*
dir c:\ado\plus\s\*spooky*
adopath
disp "`c(sysdir_plus)'"
disp "`c(sysdir_personal)'"
- Can you download test.do, test1.plugin, test2.plugin, and spookyhash.dll from here. Then try to run test.do.
from stata-gtools.
- Windows Server 2008 R2 Enterprise
which gtools
C:\ado\plus\g\gtools.ado
*! version 0.13.1 02May2018 Mauricio Caceres Bravo, [email protected]
*! Program for managing the gtools package installation
.
. dir c:\ado\plus\g\*gtools*
5.3k 7/18/18 8:05 gtools.ado
4.4k 7/18/18 8:05 gtools.sthlp
233.9k 7/18/18 8:05 gtools_macosx.plugin
228.3k 7/18/18 8:05 gtools_unix.plugin
401.3k 7/18/18 8:05 gtools_windows.plugin
.
. dir c:\ado\plus\s\*spooky*
18.5k 7/18/18 8:05 spookyhash.dll
.
.
.
. adopath
[1] (BASE) "C:\Program Files (x86)\Stata15\ado\base/"
[2] (SITE) "C:\Program Files (x86)\Stata15\ado\site/"
[3] "."
[4] (PERSONAL) "c:\users\dustin\ado/"
[5] (PLUS) "C:\ado\plus/"
[6] (OLDPLACE) "c:\ado/"
[7] "D:\data\cairo\data\central repository for ado files"
[8] "D:\data\central_repository\ado_files"
.
. disp "`c(sysdir_plus)'"
C:\ado\plus/
.
. disp "`c(sysdir_personal)'"
c:\users\dustin\ado/
- I will give that a try
from stata-gtools.
Results from running run test.do."
do "C:\Users\dustin\Documents\TEST\test.do"
. cd "C:\Users\dustin\Documents\TEST"
C:\Users\dustin\Documents\TEST
. program test1, plugin using(test1.plugin)
. plugin call test1
Hello World
.
. program test2, plugin using(test2.plugin)
Could not load plugin: .\test2.plugin
r(9999);
from stata-gtools.
Do you have access to Visual Studio?
from stata-gtools.
Not that I'm aware of
from stata-gtools.
As best I can tell, this issue comes down to Windows being unable to load spookyhash.dll
. I think it might be possible to fix this problem by compiling spookyhash.dll
on a Windows Server machine (hopefully this would fix it on every Windows Server version).
I don't have access to Windows Server, and is is unlikely that I'll be able to access it on a physical machine any time soon. If you (or someone else) can't compile spookyhash.dll
for me then I can't fix this issue.
Apologies; I wish I could offer more help.
from stata-gtools.
Hi, I apologize if I'm posting this in the wrong place, but I'm encountering the same issue on Windows 10 Pro 64bit using Stata 14.2 SE.
The error message is "Could not load plugin: c:\ado\plus\g\gtools_windows_v3.plugin"
I went back to Stata 13.1 to try using at, and there was a similar error message - "Could not load plugin: c:\ado\plus\g\gtools_windows_v2.plugin".
from stata-gtools.
@tanby91 This is the correct place to ask; I'm sorry it's not working for you. Let's check that it is, in fact, the same problem: Can you download, to the same folder, test.do, test1.plugin, test2.plugin, and spookyhash.dll from here? Then try to run test.do.
Let me know how that goes. I'm going to check if my uni has Windows 10 Pro installed anywhere; hopefully I can replicate this on a physical machine.
from stata-gtools.
I get the following:
. program test1, plugin using(test1.plugin)
. plugin call test1
Hello World
.
. program test2, plugin using(test2.plugin)
Could not load plugin: .\test2.plugin
from stata-gtools.
@mcaceresb first off, thanks so much for your work on this project. It's really helping us out a lot for a side project I'm working on.
I'm planning on distributing some Stata code that depends on gtools
and would like to make sure it works on all Windows machines. So, thinking about this bug, I was wondering if you can avoid the spookyhash.dll
problem by either compiling against the static library or even by simply compiling the spookyhash
source code directly into gtools
?
I went ahead and recompiled test2
above against spookyhash.dll
(from origin/master
, linked slightly differently than in your Makefile
--against the import library as opposed to the dll
--though I'm not sure this makes a difference....I'm not very comfortable in the Windows environment) and against the spookyhash
source code itself (with no library linked to the plugin). I put the code here: http://www.dynare.org/houtan/gtools/
I was wondering if perhaps you could recompile it using the Makefile provided and then ask one of the users here who has a version of Windows to test it? (I'm guessing they'll trust compiled code provided by you before they'll trust one provided by me). NB: To run test2_dynamic.plugin
the dll
should be copied from the dynamic
folder to the directory containing the plugin.
One note: I'm not a Windows pro, so was not able to compile against the static library. It seems as though the spookyhash.lib
is not in ELF and hence can't be complied with x86_64-w64-mingw32-gcc.exe
(to be clear, I am talking of the .lib
file created by the static build of spookyhash
, not the .lib
import library created by the dynamic build). Perhaps you know a way around this? I'd need to look into what flags to pass to Visual Studio to create the properly formatted library. Of course, unless the spookyhash
library becomes a larger project, simply compiling the source code directly into the plugin should suffice.
Again, thanks for all your help on this
from stata-gtools.
@houtanb I've tried compiling against a static library and haven't had much luck on Windows (the Linux and OSX versions compile against a static spookyhash).
I do like the idea of trying to compile spookyhash as part of the .pluign
; I'll add it to my TODO list and fiddle with it.
from stata-gtools.
@houtanb If I did this correctly, I merged your pull request and fixed up the make script. Install from branch develop-spooky-builtin
and test it out.
from stata-gtools.
@mcaceresb thanks so much. We only have one computer where we can reproduce the error. I'll test that this week and get back to you.
from stata-gtools.
@mcaceresb, this worked for me. Thanks!
from stata-gtools.
Good to know this issue might be fixed.
@houtanb Did you have a chance to test it out? Compiling spookyhash directly with the plugin doesn't seem to affect gtools in any other way so it will probably make it to master, but if it didn't work for you perhaps there is something else we can try before that.
from stata-gtools.
@mcaceresb my colleague has been busy with other things and has unfortunately not had the time to test it. I will be sure to let you know once he does (hopefully soon)
from stata-gtools.
It would be create if @dgcbritto @ppoppitz @dtetley001 and @tanby91 could test it too, if they still have access to the machines where the bug was encountered...
from stata-gtools.
from stata-gtools.
@mcaceresb, just FYI, we tested it and the change works for us.
from stata-gtools.
I have also been having this problem on both a Windows Server 2012 and a Windows 10 Pro.
What should I do to check whether the current fix solves my specific problem?
I tried uninstalling gtools and then:
net install gtools, from(https://raw.githubusercontent.com/mcaceresb/stata-gtools/develop/build/)
But I am still getting the same error:
Could not load plugin: c:\ado\plus\e\env_set_windows_v3.plugin
from stata-gtools.
net uninstall gtools
net install gtools, from(https://raw.githubusercontent.com/mcaceresb/stata-gtools/develop/build/)
Start a new session; make sure which gtools
gives version 1.2.7
and that findfile spookyhash.dll
returns an error. If it still fails to load then the change isn't working for some reason.
from stata-gtools.
I tried the above. Uninstalling and installing from the developer branch goes smooth and the installed version is 1.2.7.
Running the command findfile spookyhash.dll
returns file "spookyhash.dll" not found
.
But I'm still getting Could not load plugin: c:\ado\plus\e\env_set_windows_v3.plugin
I'm happy to help in any way possible. I have access to Visual Studio on the Windows 10 Pro machine, if that could be helpful.
Update:
I tried installing gtools form the developer branch on one of my colleagues computers and it worked! The only different between the two machine that I can come up with is the Windows build version. I´m on 17134 (April 2018 Update) and the one working is on 16299 (Fall Creators Update).
from stata-gtools.
Interesting. I'll be merging this change to master in the future, since some people reported this fixed worked, but I won't close this issue.
@fink42 Do you have cygwin installed? It might be easier to try it that way. If you don't, then can you follow the steps in this comment?
from stata-gtools.
running fine here. thanks again.
from stata-gtools.
Perfect!
When the fix is available by SSC I will test on the Windows Server 2012.
@mcaceresb I don't have cygwin. Will try generating a new spookyhash.dll following the guide from the comment. I vaguely remember trying it previously with a failing build as a result. Will give it a new shot and return with the results.
from stata-gtools.
I managed to build a new spookyhash.dll.
I'm not quite sure what then to do with it?
from stata-gtools.
@fink42 Please uninstall gtools and go back to the SSC version. Run "findfile spookyhash.dll" and replace the file with the version you just built. In a new session, try running any gtools commands again.
from stata-gtools.
@mcaceresb I tried installing via SSC and then replacing the spookyhash.dll, but the problem still persist. I might mention that the laptop is issued by a university. I have previously encountered certain applications and permissions being "blocked" by the IT administrators. They might have changed something with the latest version of Windows that causes gtools to fail, as it works fine on another university laptops running an older version of Windows 10.
I will contact the IT administrators and explain that it works on my colleague’s laptop but not on mine. They might know something which I don't
from stata-gtools.
@mcaceresb Having the same problem. I can not load gtools in R Studio after installing. I have the latest R version.
the error says
load('gtools')
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning message:
In readChar(con, 5L, useBytes = TRUE) :
cannot open compressed file 'gtools', probable reason 'No such file or directory'
My gtools version
gtools NA NA NA "yes" "3.5.2"
from stata-gtools.
@BenjoSilver I believe you are looking for the R package of the same name. This repo is about a Stata plugin called gtools
. I was unaware of the identically named R package.
Good luck with the error (I should point out that I believe R's gtools is up to 3.8 these days. Maybe upgrading will help?)
from stata-gtools.
@mcaceresb Thanks a bunch!
from stata-gtools.
@BenjoSilver By the way your error is trying to use load(gtools)
instead of library(gtools)
, The latter loads the pacakge called gtools
, the former tries to load an R object, which does not exist.
from stata-gtools.
@fink42 I'm closing this issue since it seems to be fixed for several people and following this thread is very confusing. If you still experience it please open anew bug report with the details.
from stata-gtools.
Related Issues (20)
- gegen total vs. egen total HOT 6
- Could not load gtools_macosx_v3.plugin, error 9999 HOT 9
- gegen normalize does not realize that a new variable shall be created HOT 1
- gunique missing scalars when there are no observations
- gtools version of merge HOT 4
- gtools not installing on macos Stata 16 HOT 3
- Problem with -if- condition in several commands HOT 1
- Please update the benchmark using Stata 17. HOT 5
- gtools 1.8.1 not working *at all* with Stata MP 16.1 on MacOS 11.6 HOT 7
- Plugin download error when using "ssc install gtools" HOT 2
- the option cw in gcollapse is invalid. HOT 2
- Error r(111) in Stata MP 16.1 and SE 17.0, macOS Monterey HOT 4
- OSX plugin fails; move OSX Compilation to github
- gegen max does not properly evaluate string expressions HOT 2
- Error trying to copy gtop.sthlp in Stata 14 HOT 3
- Could not load gtools_macosx_v3.plugin, error 9999 HOT 17
- Some commands appear to ignore [w=weights] HOT 3
- Export results to word or excel HOT 4
- Wrong number of groups HOT 1
- Will greshape support strL variabes in the future? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stata-gtools.