Cygwin - Error Running Program on Windows 8.1 - linux

Operating System: Windows 8.1
Cygwin Version: Latest version, as of Sept. 9, 2014.
Guile Version: 1.8
Background:
My overall goal is to install a program called "MIT Photonics Band (MPB)" on Windows 8.1 using Cygwin. I am a new user, as I started using Cygwin a few days ago. I was able to install all required packages successfully after some troubleshooting. Eventually, I installed the MPB program using the generic ./configure, make, make install commands with slight modifications. All of this appeared to be successful.
The Problem:
When I try to run the executable program, I get the following error:
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file "ice-9/boot-9.scm" in load path
Attempt At Solution:
The following is a page of the MPB installation manual:
MPB Installation Manual - Shared Libraries.
It appears to address my issue. Note that it mentions LIBDIR and foobar. For my operating system, foobar is PATH. The LIBDIR, however, I do not know explicitly because my "make install" output did not indicate it, as the manual suggests it should have. Anyhow, I found the location of ice-9/boot-9.scm through a computer search and its directory happens to be here:
C:\cygwin64\usr\share\guile\1.8\ice-9
Hence, I ran the following command (again, for a Windows 8.1 operating system) in bash:
$ export PATH="/usr/share/guile/1.8/ice-9:$PATH"
However, note that when I run $PATH, I get this message:
-bash: /usr/share/guile/1.8/ice-9:/usr/local/bin:/usr/bin:/cygdrive/c/Program: No such file or directory
I also tried:
$ export GUILE_LOAD_PATH="/usr/share/guile/1.8/ice-9:$GUILE_LOAD_PATH"
That yielded:
-bash: /usr/share/guile/1.8/ice-9:: No such file or directory
Furthermore, I tried to copy and paste the "ice-9" folder in various locations for a quick and sloppy solution, but it was to no avail. I searched online for answers as some users have had an issue with the program not finding the ice-9/boot-9.scm file in the past. I could not get my problem solved.
Please let me know if I need to provide more information. I appreciate the help!
EDIT: In response to the first user's post, I used the command echo $PATH and the following was the output:
/usr/share/guile/1.8:/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/MATLAB/R2013a/runtime/win64:/cygdrive/c/Program Files/MATLAB/R2013a/bin:/cygdrive/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/MATLAB/MATLAB Compiler Runtime/v81/runtime/win64:/usr/lib/lapack
Note that the problem still persists.
EDIT 2:
So I opened the "load.scm" file for GUILE and I found this line:
(define load-path '("/usr/share/emacs/20.7/lisp/"
"/usr/share/emacs/20.7/lisp/emacs-lisp/"))
I tried to add /usr/share/guile/1.8/ to these directories, but that didn't do anything either. Can't tell what's wrong.

Related

Anaconda Prompt(Anaconda3) does not recognize files in a directory

I took to heart the message that support for anaconda2 was dropped. I installed anaconda3 and used 2to3 to convert my *.py codes. Everything seemed to work as expected. I have several 2 line bat codes that cd to a particular directory and then call python to execute a particular *.py code in that directory. By loading Anaconda Prompt(Anaconda3) and invoking the bat file I could run pythons in that directory as expected.
Then, a couple of days ago, I made such a run and got an error message saying the *.py file could not be found. I immediately looked in the directory and the python file was there as expected. I then did a dir command in Anaconda Prompt(Anaconda3) and found that almost no files in the directory were listed. This was happening on my windows 10 laptop.
On my desktop, everything continues to work as expected. Are there any suggestions as to what could cause such a problem and how to fix it.
Thanks,
Mack Elrod
Responding to the request for additional information, I have a bin directory that is in path. In bin\MackData.bat is
c:
cd %USERPROFILE%\Documents\Medev\MackData
copy sugarhist.png sugarhist.old.png
python MackData.py
When I open Anaconda Prompt(Anaconda3) and enter MackData I get
(base) C:\Users\Mack>MackData
(base) C:\Users\Mack>c:
(base) C:\Users\Mack>cd C:\Users\Mack\Documents\Medev\MackData
(base) C:\Users\Mack\Documents\Medev\MackData>copy sugarhist.png sugarhist.old.png
1 file(s) copied.
(base) C:\Users\Mack\Documents\Medev\MackData>python MackData.py
python: can't open file 'MackData.py': [Errno 2] No such file or directory
(base) C:\Users\Mack\Documents\Medev\MackData>
But MackData.py is a python file in the directory MackData.
This code worked on this laptop until a few days ago and continues to work on my desktop computer. I can, of course, publish MackData.py but that seems irrelevant. The point is that Anaconda can't find it.
Thanks,
Mack
I must submit a sincere apology to this community. I have determined my problem and Anaconda is not responsible in any way. I thank all of you for you concerns and comments.
For any who might be interested I will give a brief outline of what happened. First, I installed Anaconda3. Several days later my directory, MackData, was moved to a new location. I conjecture that happened by me inadvertently letting my hand drag on the touch pad. Then, not knowing the location had changed I updated my laptop from my desktop. My update program not finding MackData where expected recreated it and put only the most recently changed files from the desktop into the new MackData. New but in the correct location. Then of course running my script in the Anaconda3 prompt failed. Doing a dir in the Anaconda3 prompt showed only a few files were there. I then went to Windows File Explore and looked at MackData and saw all of the expected files. I used the quick access feature which unknown to me pointed to the old directory in its new location.
That is not intended to be an excuse but only as an explanation. Again, I do apologize to the community.
Mack Elrod
I'm pretty sure newer anaconda launchers users different environment paths, and not even windows ones.
I suggest either checking the environment path within the anaconda launcher and configurations or, a better solution in my opinion, run these scrips using the regular python engine, without using anaconda (simpler, more determinant and works within your standard environment)

Why can't I fix the cygwin1.dll mismatch issue?

I'm trying to execute a .sh script (that wasn't written by me) and I get the following error:
0 [main] echo (5320) C:\Program Files\Git\usr\bin\echo.exe: *** fatal error - cygheap base mismatch detected - 0x180343408/0x180317408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version should
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
I tried to follow the instructions in the error but I only have one cygwin1.dll file.
So I tried to execute the following command in a git bash shell:
/c/cygwin/bin/man
and I get:
0 [main] man (11952) C:\cygwin\bin\man.exe: *** fatal error - cygheap
base mismatch detected - 0x180317408/0x180343408. This problem is
probably due to using incompatible versions of the cygwin DLL. Search
for cygwin1.dll using the Windows Start->Find/Search facility and
delete all but the most recent version. The most recent version
should reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested
I already tried to disable ASRL options in the exploit protection panel (as suggested by somebody) and reboot but that didn't fix the problem.
If I write
which -a cygwin1.dll
I get:
/c/cygwin/bin/cygwin1.dll
/c/cygwin/bin/cygwin1.dll
It looks like I have two cygwin1.dll but actually I only have one..
I have been searching for a possible solution since days but nothing seems to work for me.
Any suggestion?
While the error message is mentioning cygwin1.dll, it is misleading as the Git for Windows is using MSYS and the file was renamed msys-2.0.dll
Unfortunately the MSYS team forgot to change the error messages when they imported and modified the Cygwin source:
I encountered the same problem while trying to build a certain C/C++ project from source in the Git Bash Terminal.
Based on the previous answers by #Harry and #matzeri it seems that Git Bash is what is causing this problem. To resolve it I had to disable ASLR for all executables in my Cygwin install folder (Usuall C:\cygwin64) using the command
Get-Item -Path "C:\cygwin64\bin\*.exe" | %{ Set-ProcessMitigation -Name $_.Name -Disable ForceRelocateImages }
I restarted the computer and then switched to using Cygwin Terminal and compiled from there.
NB: Cygwin Terminal comes by default with Cygwin installation
Find all the msys-2.0.dll's on your machine and add the suffix .bkp to them.
Wherever you found them at, copy "C:\Program Files\Git\usr\bin\msys-2.0.dll" to those locations.
Notes:
If you were to copy from C:\msys64\usr\bin\msys-2.0.dll to all other locations, then you lose that nice additional text at the end that shows the branch you're on (master)
Same goes if you just decide to delete all the extra dlls and just add C:\msys64\usr\bin to your path, there must be a dependencies it looks for relative to the directory it normally resides.
Because apparently I skimmed the selected answer and missed the part about msys-2.0.dll, I had to figure this out myself. For future reference:
Run listdlls -r -v -d msys-2.0.dll
Check Base, Path, and Version info for discrepancies.

F# on linux (mint/ubuntu) - dll path

This is a similar question to Running F# code with Mono but the solution there doesn't work for me, and I suspect I've got a slightly different problem.
I'm on linux mint petra (based on ubuntu saucy) and I've installed mono-complete and fsharp. Running it doesn't work:
$ fsharpi
/home/me/unknown(1,1): error FS0078: Unable to find the file 'FSharp.Core.dll' in any of
/usr/lib/mono/4.0
/home/me
/usr/lib/mono/4.0/
Which is not surprising, the file's in /usr/lib/cli/FSharp.Core-4.3. So let's try gacutil:
$ sudo gacutil -i /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.dll
Installed /usr/lib/cli/FSharp.Core-4.3/FSharp.Core.dll into the gac (/usr/lib/mono/gac)
So mono and gacutil seem to disagree which paths to search! This is why I think I've got a different problem to the one referenced.
The command MONO_PATH=/usr/lib/cli/FSharp.Core-4.3/ fsharpi doesn't work either (it prints the same search paths as above).
How do I get F# up and running?

How do i resolve the procedure entry point_impure_ptr error in cygwin/opencobol?

Whenever I try to run my .exe cobol file, i get this error..
fileName.exe Entry Point Not Found
The procedure entry point_impure_ptr could not be located in the dynamic link library cygwin1.dll
I am using OpenCObol and cygwin ver1.7.15.thanks
You'll need to specify the proper path for the command below, but Cygwin seems pretty persnickety with entry point addresses and updates, The system includes a rebaseall command to help fix this problem. Most times I've witnessed it is after a setup.exe pass, while the Cygwin system was still active (and perhaps only in the background and not visible).
C:\Users\btiffin\cygwin\bin\dash -c '/usr/bin/rebaseall'
Run that from a Windows CMD shell (while Cygwin isn't active, say after a clean boot and before running the Cygwin shell. Basically cygwin1.dll can't be open). You'll need to use the proper Windows path to dash for your particular install. Google Cygwin rebase for detailed articles.
I had a similar error message after upgrading from cygwin version 1.5 to 1.7. I solved it by completely removing and reinstalling 1.7 from scratch. I was told there might have been a problem with multiple versions of dlls.

Android NDK Error using Cygwin: ERROR: GNUMAKE variable is defined to an invalid name

I am trying to build a static library using Android NDK. For this I have installed Cygwin & android-ndk-r7.
To build the library I have already created the required source file and Android.mk file. These files are located under "D:\NDK\test" on my machine.
My NDK Tools are installed under "C:\Android\android-ndk-r7" & Cygwin files are located under "C:\Cygwin\http%3a%2f%2fcygwin.mirrors.hoobly.com%2f". Hence there are no space in any of the locations.
For building the library, I launch Cygwin and point it to the location where my source files and Android.mk file is located. Then to give the build command I type "/cygdrive/c/Android/android-ndk-r7/ndk-build". On giving the above command, I get an error message:
ERROR: Cannot find 'make' program. Please install Cygwin make package
or define the GNUMAKE variable to point to it.
I went through several blogs and followed the solutions on them:
Install make under Devel folder in Cygwin installation. This didnt do any change.
Create an Environmental Variable GNUMAKE and define it as /usr/bin/make. I also tried defining this variable to different locations:
C:\Cygwin\http%3a%2f%2fcygwin.mirrors.hoobly.com%2f\bin
C:\Android\android-ndk-r7\prebuilt\windows\bin
C:\Android\android-ndk-r7
But with each I got the same error:
ERROR: Your GNUMAKE variable is defined to an invalid name: C:\Android\android-ndk-r7
Please fix it to point to a valid make executable (e.g. /usr/bin/make)
So it looks like I am not pointing the path correctly.
Can someone please tell me which path should GNUMAKE point to.
I also did make -v on my Cygwin prompt and the below message pops up (which makes me believe that everything related to Cygwin installation is fine):
$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for Windows32
Thanks for your help.
Starting with NDKr7, you don't need Cygwin anymore to build libraries. Here's the simpler way.
In command prompt, navigate to your project directory: cd D:\NDK\test
Make sure your native code and Android.mk are in the jni folder of that directory
Call ndk-build: C:\Android\android-ndk-r7\ndk-build
This should do it all for you.
i worked hard on error in gygwin terminal "gnumake variable is define to invalid name" and after that i get to the point that we simply remove this error by deleting the GNUMAKE path in environment variable both in system and user variable if u created it....
mycomputer > system properties > advanced system setting > environment variable

Resources