Skip to content

[windows-os] ../build/libfzf.dll missing, cmake errors with recent version, too many dependencies for building a single c file #157

@FrancescElies

Description

@FrancescElies

Problem

When building with cmake cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release as suggested on the readme. build/Release/libfzf.dll is created but

return dirname .. "../build/libfzf.dll"

Expects build/Release/libfzf.dll.

Since I was calling pcall(require('telescope').load_extension, 'fzf') I only noticed by chance that things were not properly working.

Suggestions

  • If you pcall(require('telescope').load_extension, 'fzf') you won't notice something went wrong, you cold say if you call pcall is your duty to check everything went fine, would you be open to still show a warning or something?
  • In the readme you mention As of now, we do not ship binaries, would you be open for that? You could provide binaries for other os in CI by calling zig cc -target native-windows-gnu -shared src/fzf.c -o build/libfzf.dll or zig cc -target x86_64-macos-none -shared src/fzf.c -o build/libfzf.so from a single linux instance without having to fiddle with different OS. I am not affiliated to zig in any form, but I find the previous pretty neat. Another nice thing that you no longer have a command with && which is shell dependent, some other shells use ; instead. So one needs to be less careful when copy pasting things from the readme. The compiler is also pretty cheap, ~50MB download extract it to your PATH, done.
  • If you install a recent version of cmake it will complain with an error during build CMake Error at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake.
  • Needing CMake, and the Microsoft C++ Build Tools on Windows, feels too much just to build a single c file.
  • I see there are a couple of windows related issues Build failed on Windows #122 Build failed on msys2 windows #126 Clang build fails on Windows #124, simplifying the build process by reducing options would also help reducing the churn.

All of this said from the respect for making this package making my life easier :)

If you are open to any of these suggestions and would like to see a PR, please let me know. Otherwise, please close this at your discretion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions