Skip to content
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

fatal error: keyfinder/keyfinder.h: No such file or directory #18

Open
robertin0 opened this issue Mar 23, 2022 · 8 comments
Open

fatal error: keyfinder/keyfinder.h: No such file or directory #18

robertin0 opened this issue Mar 23, 2022 · 8 comments

Comments

@robertin0
Copy link

Hi guys,
I receive an error on make saying:
fatal error: keyfinder/keyfinder.h: No such file or directory

i installed libkeyfinder in /usr/lib/libkeyfinder but also in /usr/lib/keyfinder and /usr/lib/lkeyfinder
I'm on Debian GNU/Linux bookworm/sid
what am I doing wrong??
thanks rob

@evanpurkhiser
Copy link
Owner

Could you expand on what commands you're running to install the tool?

@drbarzyk
Copy link

╰─➤ make
c++ keyfinder_cli.cpp -std=c++11 -Wall -lkeyfinder -lavcodec -lavformat -lavutil -lswresample -lfftw3 -o keyfinder-cli
keyfinder_cli.cpp:5:10: fatal error: 'keyfinder/keyfinder.h' file not found
#include <keyfinder/keyfinder.h>
^~~~~~~~~
1 error generated.
make: *** [keyfinder-cli] Error 1

@evanpurkhiser
Copy link
Owner

@drbarzyk you have libkeyfinder installed? What OS are you on? where is the shared library installed?

@jordyf15
Copy link

make install
g++ keyfinder_cli.cpp -std=c++11 -Wall -lkeyfinder -lavcodec -lavformat -lavutil -lswresample -lfftw3 -o keyfinder-cli
keyfinder_cli.cpp:5:10: fatal error: keyfinder/keyfinder.h: No such file or directory
    5 | #include <keyfinder/keyfinder.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:4: keyfinder-cli] Error 1

Hello, i also encounter the same problem.
I used WSL and i installed the libkeyfinder in /home/username by following the steps in the libkeyfinder repo which resulted in /home/username/include/keyfinder and /home/username/lib.
Is there any other information i could help provide?

@aleksblendwerk
Copy link

aleksblendwerk commented Sep 9, 2022

I've also had a little trouble building both projects but that's just because I don't do that often and am not familiar with the respective paths.

On Ubuntu via WSL2, the following steps worked for me:

In my cloned libkeyfinder repo directory (from https://github.com/mixxxdj/libkeyfinder/), I did this:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local -S . -B build
cmake --build build --parallel 2
sudo cmake --install build

(cmake --build build --parallel 2 because the Windows task manager shows 2 cores for the CPU on this system.)

In my cloned keyfinder-cli repo directory, I did this:

sudo apt-get install libavutil-dev libavcodec-dev libavformat-dev
make
sudo make install

Then I ended up with a shiny new keyfinder-cli executable in /usr/local/bin/.

The ffmpeg package was already installed on my system.

Thanks for this project, @evanpurkhiser!

Next I'll be looking for a command-line tool to properly detect the BPM...

@j3-solutions
Copy link

j3-solutions commented Oct 10, 2023

Hello, I had the same problem. I was able to resolve it finally with these steps. I hope it helps others. Greetings!

  1. Install libkeyfinder in the path of git repository keyfinder-cli:
    cmake -DCMAKE_INSTALL_PREFIX=/path_to_keyfinder-cli_repository/ -S . -B build

  2. Add this texto to the file /path_to_keyfinder-cli_repository/Makefile, -I argument and -L argument:
    keyfinder-cli: keyfinder_cli.cpp key_notations.h $(CXX) $< -std=c++11 -Wall -lkeyfinder -lavcodec -lavformat -lavutil -lswresample -lfftw3 -I"./include" -L"./lib" -lkeyfinder -o $@

  3. Launch make command

The directory structure is:

keyfinder-cli
├── fftw-3.3.10
│   ├── api
│   ├── dft
│   │   ├── scalar
│   │   └── simd
│   ├── doc
│   │   ├── FAQ
│   │   └── html
│   ├── genfft
│   ├── kernel
│   ├── libbench2
│   ├── m4
│   ├── mpi
│   ├── rdft
│   │   ├── scalar
│   │   └── simd
│   ├── reodft
│   ├── simd-support
│   ├── support
│   ├── tests
│   ├── threads
│   └── tools
├── include
│   └── keyfinder

├── lib
│   ├── cmake
│   │   └── KeyFinder
│   └── pkgconfig
└── libkeyfinder
├── build
│   ├── CMakeFiles
│   ├── Testing
│   ├── _deps
│   ├── packaging
│   └── tests
├── cmake
├── docs
├── examples
├── packaging
├── src
└── tests

@j3-solutions
Copy link

j3-solutions commented Oct 10, 2023

Updated

Info extracted from .github/workflows/main.yml

sudo apt-get install --yes \
            libswresample-dev libavformat-dev libavutil-dev libavcodec-dev \
            cmake **catch2** libfftw3-dev

If fail catch2, compile from -> git clone https://github.com/catchorg/Catch2.git

Launch inside of keyfinder-cli repository cloned in you system

git clone https://github.com/mixxxdj/libkeyfinder keyfinder
cd keyfinder
cmake -S . -B build
cmake --build build
sudo cmake --install build

Return to keyfinder-cli repository directory

make; make install;

Note: It is not necessary to fix the Makefile.

Note 2: if fail import of libkeyfinder.so, use:

export LD_LIBRARY_PATH=/path_to_keyfinder-cli_repository/lib

@rsc3
Copy link

rsc3 commented Sep 15, 2024

Thanks, when I try to run make I get:
make: *** No rule to make target 'g++', needed by 'keyfinder-cli'. Stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants