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

Could not find file "config.h" #5518

Closed
YuzheHao opened this issue Dec 23, 2019 · 10 comments
Closed

Could not find file "config.h" #5518

YuzheHao opened this issue Dec 23, 2019 · 10 comments

Comments

@YuzheHao
Copy link

YuzheHao commented Dec 23, 2019

I downloaded the master-branch, and try to run a depth example program in Clion, then I got this error message:

librealsense-master/cmake-build-debug/third-party/libusb/libusb/core.c:23:20: fatal error: config.h: No such file or directory #include "config.h"

Before I downloading the whole master-branch, I have tried to run a program to get the distance, and it works, so I don't think my environment is not complete.
Maybe it is a rather beginner problem but I hope could get some helps here

@dorodnic
Copy link
Contributor

Hi @YuzheHao
Have you tried manually running cmake .. && make? I suspect something is wrong with Clion CMake configuration, you should not be encountering this error when building from source.

@YuzheHao
Copy link
Author

Thank you for the answering,
i tried to run cmake .. && make, and I got the following error:

CMake Error at CMakeLists.txt:5 (include):
include could not find load file:
CMake/lrs_options.cmake

CMake Error at CMakeLists.txt:6 (include):
include could not find load file:
CMake/connectivity_check.cmake

CMake Error at CMakeLists.txt:9 (if):
if given arguments:
"OR" "OR"

Unknown arguments specified
-- Configuring incomplete, errors occurred!
See also "/work/yuzhe/docs/librealsense-master/CMakeFiles/CMakeOutput.log".

Do you have any idea how could I check the cmake config of CLion?

@dorodnic
Copy link
Contributor

Something is strange with the output, step by step, please try:

cd ~
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
mkdir build
cd build
cmake ..
make

This should download and build librealsense on your machine

@Esquimen
Copy link

Install this lib for debug:
sudo apt-get install libusb-1.0-0-dev

@YuzheHao
Copy link
Author

YuzheHao commented Jan 6, 2020

Something is strange with the output, step by step, please try:

cd ~
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
mkdir build
cd build
cmake ..
make

This should download and build librealsense on your machine

Sorry.... I tried this line by line, and it is still telling me "lacking config.h". And this time I ran all these commands in shell rather than in CLion, which makes me confused more....

@YuzheHao
Copy link
Author

YuzheHao commented Jan 6, 2020

Hi everyone, I have solved this problem, thank you for your helping.
Later I will summarize the solution and post it here.

@Jiloc
Copy link

Jiloc commented Jan 13, 2020

To me, running

sudo apt-get install libusb-1.0-0-dev

solved the issue

@ernestp
Copy link

ernestp commented Oct 28, 2020

I'm getting this error during cross compile.
Is there any workaround to compile libusb without installing globally?

@monacv
Copy link

monacv commented Jan 14, 2021

$ sudo apt-get install libusb-1.0-0-dev
didn't solve the issue for me
https://pastebin.com/raw/aNeb2KLB

@ddwell
Copy link

ddwell commented Mar 11, 2021

@monacv try cleaning the build folder and doing cmake && make again

cd ..
sudo rm -R build
mkdir build && cd build
cmake ..
make
...

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

8 participants