When you run any rake task with cucumber installed on a machine that doesn't have ANSICON installed, you get the following message:
*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows
When running locally I like using ANSICON, but when used within the build server I don't care about that - and I don't want to see that warning there. Is there a way to get rid of it?
You can actually remove the warning itself. I do not like installing a bunch of garbage just for the sake of having a green word. So, to remove the warning:
1. Locate the Cucumber installation in gems directory (it's in the Ruby installation directory). For me it was: lib\ruby\gems\1.9.1\gems\cucumber-1.2.0
2. In the cucumber-1.2.0\lib\cucumber\formatter directory of the Cucumber installation find the file ansicolor.rb
3. Locate the line:
STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
and add # in front of it to comment it out:
# STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
The line number was 14 for my version of Cucumber.
4. Save the file and you're done
Download and unzip the file from http://adoxa.altervista.org/ansicon/
open cmd and navigate to the unzipped folder
Navigate to x64 (if you have a 64 bit machine) otherwise navigate to x86
Type ansicon.exe -h and you will get help of this command
Execute 'ansicon.exe -i' to install and add ansicon to your Windows
Run your cucumber 0.10.0 test and you should
get the coloured output result on Windows
Can you add an exception to you spec_helper.rb? Or perhaps try adding a tag which you filter on when using rake?
Related
I have built llvm-13.0.1 from source using Visual Studio 17 2022 on Windows 11. When attempting to build llvm-sys (through external crate llvm-ir). It fails, saying:
error: No suitable version of LLVM was found system-wide or pointed to by LLVM_SYS_130_PREFIX.
I know llvm-config exists because I can use it from the command line, and it returns the correct version. I don't understand why this doesn't work. This might be a stupid question but I am really stuck.
I was also having this problem, trying to use llvm-sys on Windows. Here are some mistakes that I did that made it fail to compile just like yours.
Installation Prefix
Make sure that your LLVM installation path doesn't have any whitespace.
Mine was -DCMAKE_INSTALL_PREFIX=C:\Program Files (x86)\LLVM, which was their default install prefix. The whitespace in the installation path causes some errors when using it with llvm-sys. Later, I changed it to C:\LLVM and it worked.
Set Environment Variable
Set Environment Variable LLVM_SYS_<version>_PREFIX to the installed LLVM folder.
From CMD For LLVM-13.0.1
setx LLVM_SYS_130_PREFIX "<PATH TO LLVM WITHOUT WHITESPACE>" /M
Make sure that the variable is registered by using echo command
echo %LLVM_SYS_130_PREFIX%
It should output your registered path, not %LLVM_SYS_130_PREFIX%.
If it doesn’t output your path, restart the computer and try again and it should be working.
Now you should be good to go .....
Hope this helps :)
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.
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.
After wrestling with my environment variables to get the proper directory set, I can now get the version with:
C:\Projects\TestProj>ant -version
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ant appears to be working:
C:\Projects\TestProj>ant
Buildfile: build.xml does not exist!
Build failed
I still get the error when I try:
C:\Projects\TestProj>cordova -d platform add android
cordova library for "android" already exists. No need to download. Continuing.
Checking if platform "android" passes minimum requirements...
Creating android project...
Running command: C:\Users\Administrator\.cordova\lib\android\cordova\3.4.0\bin\c
reate.bat --cli C:\Projects\TestProj\platforms\android com.company.testproj
TestProj
C:\Users\Administrator\.cordova\lib\android\cordova\3.4.0\bin\node_modules\q\q.j
s:126
throw e;
^
Error: ERROR : executing command 'ant', make sure you have ant installed and add
ed to your path.
From all of the posts that I have read, this is an issue with ANT_HOME, but it appears I have that part of it tackled. Edit I've installed ant 1.9.3 to program files, and bin resides in:
EDIT Changed to just ant, instead of apache-ant-1.9.3-bin\apache-ant-1.9.3
C:\Program Files\ant
Echo home:
C:\Projects\TestProj>echo %ANT_HOME%
C:\Program Files\ant
And of course I have %ANT_HOME%\bin in my path. Any help identifying the issue would be appreciated.
I think the path you use for ANT_HOME is wrong. C:\Users\Administrator\AppData\Roaming\npm\node_modules\ant\ant seems to be the path to the ant npm module but not the ant command.
Ant command more probably is somewhere in program files. In a cmd, run where ant to know where in your path ant is found and use this path for ANT_HOME. (in the folder you should see ant, ant.cmd and ant.bat)
After further investigation, I think your problem is caused half by cordova not correctly checking node errors and half because of registry setting in your computer (a cmd autorun parameter).
You can check answers in those posts for more info:
nodejs child_process exec 'java -version'
Windows CMD.exe "The system cannot find the path specified."
Check if you have a registry key HKCU\Software\Microsoft\Command Processor\AutoRun
after setting the variables, restart your machine. Closing command prompt etc will not help.
Even I was stuck for quite a long time and next day when I started my system, it was working fine :P
I am using Linux
I downloaded the latest linux version from here
uploaded the .bin file to /home/asimon/java
executed the following commands
chmod 755 jdk-6u22-linux-i586.bin
./jdk-6u22-linux-i586.bin
and jdk1.6.0_22 was created, but whenever i try to execute java -version from /home/asimon/java/jdk1.6.0_22/bin i get the below output, i.e., not 1.6.0 but 1.4.2. What is creating the problem. I am also giving a screenshot of my set
Screenshot 1
my set output screenshot
Type which java to find out which directory java is being picked up from. You probably need to correct your PATH. At the moment, you have /home/asimon/java/bin on your PATH, which must be an old version of java. You should update it to /home/asimon/java/jdk1.6.0_22/bin. The PATH variable would be present in $HOME/.profile.
Also, note that if you execute ./java -version it will use the java executable present in the current working directory, instead of searching the PATH for it.
You get whatever Java appears first in the list of directories in your PATH environment variable. The preinstalled Java is almost certainly in /usr/bin, so if you want to default to the self-installed one in ~/java/jdk1.6.0/bin, you must change your PATH so that thiat directory comes before /usr/bin. The installation instructions should have told you how to do that.