-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Build failed on Windows #122
Comments
I changed the build key to: {
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
} and got this error messages when building. Import-PowerShellDataFile : The term 'Import-PowerShellDataFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:210 char:33
+ $hash.Add($_.Basename, (Import-PowerShellDataFile $_.FullName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Import-PowerShellDataFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Import-PowerShellDataFile : The term 'Import-PowerShellDataFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:196 char:22
+ $colorData = Import-PowerShellDataFile $_.FullName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Import-PowerShellDataFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Index operation failed; the array index evaluated to null.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:197 char:9
+ $hash[$colorData.Name] = $colorData
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArrayIndex
Index operation failed; the array index evaluated to null.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:198 char:9
+ $hash[$colorData.Name].Types.Directories[''] = $colorReset
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArrayIndex
Index operation failed; the array index evaluated to null.
At C:\Users\imBLZ\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:199 char:9
+ $hash[$colorData.Name].Types.Files[''] = $colorReset
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArrayIndex
Import-PowerShellDataFile : The term 'Import-PowerShellDataFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:196 char:22
+ $colorData = Import-PowerShellDataFile $_.FullName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Import-PowerShellDataFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Index operation failed; the array index evaluated to null.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:197 char:9
+ $hash[$colorData.Name] = $colorData
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArrayIndex
Index operation failed; the array index evaluated to null.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:198 char:9
+ $hash[$colorData.Name].Types.Directories[''] = $colorReset
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArrayIndex
Index operation failed; the array index evaluated to null.
At C:\userpath\scoop\modules\Terminal-Icons\Terminal-Icons.psm1:199 char:9
+ $hash[$colorData.Name].Types.Files[''] = $colorReset
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArrayIndex
At line:1 char:46
+ cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build - ...
+ ~~
The token '&&' is not a valid statement separator in this version.
At line:1 char:86
+ ... BUILD_TYPE=Release && cmake --build build --config Release && cmake - ...
+ ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine |
The way I made it work is install Zig language, and execute, from plugin's folder zig cc -O3 -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.dll basically the same command but with |
its worked for me thaanks maan soo much i tried everything but this one is from heaven lol |
Thanks for this! It worked for me too. I tried using For context, I was following this guide to set up my Neovim. During installation, I encountered issues with telescope-fzf-native.nvim and luasnip (though I'm not sure if the latter is related). I was getting a sourcing error because of these. Here's the Neovim config repository for anyone interested. |
The original error is not exactly like what I was observing myself on Windows, but can you check to see if #133 fixes your issue? If so, I can add this issue to the fixed list on the PR. |
Thanks alot @Luladjiev ... that worked for me as well. Do you have to manually run it directly in powershell in the directory of fzf? or were you able to add the zig command to your telescope lua plugin file for the build property? I was not able to get it to work in the plugin config build property but would love to figure it out (if possible) for future. |
@GitMurf I had to do it manually in powershell. |
Thanks for the response and for the solution! |
doesn't work for me when executed by Lazy I had to navigate manually to and execute the build command: cd ~/AppData/Local/nvim-data/lazy/telescope-fzf-native.nvim
# in powershell replace && with ;
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release ; cmake --build build --config Release output is: CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22631.
-- Configuring done (0.1s)
-- Generating done (0.0s)
-- Build files have been written to: C:/Users/kiril/AppData/Local/nvim-data/lazy/telescope-fzf-native.nvim/build
MSBuild version 17.11.9+a69bbaaf5 for .NET Framework
1>Checking Build System
Building Custom Rule C:/Users/kiril/AppData/Local/nvim-data/lazy/telescope-fzf-native.nvim/CMakeLists.txt
Auto build dll exports
fzf.vcxproj -> C:\Users\kiril\AppData\Local\nvim-data\lazy\telescope-fzf-native.nvim\build\Release\libfzf.dll
Building Custom Rule C:/Users/kiril/AppData/Local/nvim-data/lazy/telescope-fzf-native.nvim/CMakeLists.txt additionaly I had to copy libfzf.dll to build folder because plugin searches for it there cd ~/AppData/Local/nvim-data/lazy/telescope-fzf-native.nvim
cp ./build/Release/libfzf.dll ./build/libfzf.dll after that it started to work |
I had the same exact issue where it places the dll in the ...build/release folder as opposed to in the ...build dir where telescope expects to find it. I first spent a couple hours trying to get the build to work correctly and the solution was to install CMake, the SDK for my OS (in my case windows 10), then make sure to add the path to cmake.exe in my env variables. Finally I manually moved the files in the ...build/release dir to ...build and it finally worked. I hope the maintainers read this so they can make appropriate mods to resolve. |
there are 2 options to resolve it
|
I am a bit confused. You listed 4 options fyi. I don't disagree with some of your findings, but wasn't clear what you were proposing? Thanks! |
FYI with presumably the changes recently from here: #136 I am able to build fine now using Windows Terminal with the following build command:
Note this still requires a tweak of what is in the README:
I am not sure whether the README needs to be updated or whether there is still an issue and it just happens to work ok on my machine now given everything I have tried in the past. But I no longer have to do anything other than use the build command listed above in my plugin config. Previously I had to do the manual cc @Conni2461 in case this is helpful and/or if we think the README should be updated for Windows with the additional |
Was able to make this work on Windows w/o any manual step (outside installing zig) with a lazy plugin spec like this: This way you don't have to mess around with trying to get make/cmake working on windows. You can install zig on Windows w/ Theoretically, it should also be cross-platform as mkdir should be the same in this scenario across Windows/Linux/Mac and as long as zig is in your PATH, it should be good to go |
Install zig in ur windows the brows to ur telescope folder and run power
shell there
And run the command u good to go
…On Thu, Dec 26, 2024, 12:13 PM KV Le ***@***.***> wrote:
Was able to make this work on Windows w/o any manual step (outside
installing zig) with a lazy plugin spec like this:
{ "nvim-telescope/telescope-fzf-native.nvim", build = "mkdir build; zig cc
-O3 -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.dll" }
Theoretically, it should also be cross-platform as mkdir should be the
same in this scenario across Windows/Linux/Mac and as long as zig is in
your PATH, it should be good to go
—
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQC4ZGSX2FUE26XBWFLOVNL2HPQFHAVCNFSM6AAAAABEFWLPBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRSGQ3TIMRSGI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
I tried using fzf plugin in Windows but failed at the building step, in Linux and Mac seems to be working just fine.
Windows version
11
Nvim version
9.5
fzf version
0.46.1 (3c0a630)
Error message
from lazy ui:
mkdir -p build cc -O3 -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.so process_begin: CreateProcess(NULL, cc -O3 -Wall -Werror -fpic -std=gnu99 -shared src/fzf.c -o build/libfzf.so, ...) failed. make: *** [Makefile:24: build/libfzf.so] Error 2
The text was updated successfully, but these errors were encountered: