Cmake error the source directory does not exist

CMake Error: The source directory «/home/username» does not appear to contain CMakeLists.txt. #568 Comments /Hotot-master$ cmake -DWITH_QT=off .. CMake Error: The source directory «/home/felixdz» does not appear to contain CMakeLists.txt. How can I fix this? The text was updated successfully, but these errors were encountered: have you created a build directory?? you should execute […]

Содержание

  1. CMake Error: The source directory «/home/username» does not appear to contain CMakeLists.txt. #568
  2. Comments
  3. apt-get install libqt4-dev cmake intltool
  4. cmake error ‘the source does not appear to contain CMakeLists.txt’
  5. 5 Answers 5
  6. CMake says source dir does not appear to contain CMakeLists.txt #752
  7. Comments
  8. Operating System
  9. OBS Studio Version?
  10. StreamFX Version
  11. OBS Studio Log
  12. OBS Studio Crash Log
  13. Current Behavior
  14. Expected Behavior
  15. Steps to Reproduce the Bug
  16. Any additional Information we need to know?
  17. Cmake third_party: not contain CMakeLists.txt #219
  18. Comments
  19. Wrong CMakeCache.txt directory #12
  20. Comments

CMake Error: The source directory «/home/username» does not appear to contain CMakeLists.txt. #568

/Hotot-master$ cmake -DWITH_QT=off ..

CMake Error: The source directory «/home/felixdz» does not appear to contain CMakeLists.txt.

How can I fix this?

The text was updated successfully, but these errors were encountered:

have you created a build directory?? you should execute the cmake .. from the build directory.
from the tutorial:
«Create a new directory for creating build mkdir build cd build Once you are inside the build directory. Pass the command»

you can also follow the «building from source» instruction here (scroll down)
https://github.com/lyricat/Hotot

@mwgkdm I have same issue.
Is there any way to make build directory independent cmake 😕

not sure what you mean.
You want a different directory or to not use cmake?
Either way, that would require changing the code which is beyond my knowledge.

«Since Hotot core is largely based on HTML5, JavaScript and Webkit technology, It can be run under many Webkit implementations. Hotot officially supports Gtk, Qt, and Chrome webkit wrapper.

so cmake is a must,

the path for building is set to be build, so just create that directory and then execute «cmake ..» from it.

«On Ubuntu 11.10 all of these resources are available in the standard repositories.

While I still use hotot, I will probably forsake it soon as the 260 characters has really broke it, and messing with the code, though it doesn’t look very complicated is too time consuming for me to learn.

@mwgkdm i got it
the file named *Cache* was responsible 😆

@tbhaxor please tell me what to do with CMake.cache file . should I delete it, or place it in any other folder .

hell i am trying to run an open source project and i created the build dir inside my root folder withe the project files and then cd inot build but when i run cmake ..
i get noCmakelists.txt file

like where do i get this file or how do i crete this file
like its NOT in my project folder i only have makefile

sorry this is too complex for no reason
but anyway thxz for any solution
Lisa

Источник

cmake error ‘the source does not appear to contain CMakeLists.txt’

I’m installing opencv in ubuntu 16.04. After installing the necessary prerequisites I used the following command:-

but it produced an error:-

I used the command provided in the folder ‘module’ documentation. How do I solve it? I tried the answers here at stack-overflow and a few other question but still can’t figure it out.

Project Git repository here.

5 Answers 5

You should do mkdir build and cd build while inside opencv folder, not the opencv-contrib folder. The CMakeLists.txt is there.

Since you add .. after cmake, it will jump up and up (just like cd .. ) in the directory. But if you want to run cmake under the same folder with CMakeLists.txt, please use . instead of .. .

This reply may be late but it may help users having similar problem. The opencv-contrib (available at https://github.com/opencv/opencv_contrib/releases) contains extra modules but the build procedure has to be done from core opencv (available at from https://github.com/opencv/opencv/releases) modules.

Follow below steps (assuming you are building it using CMake GUI)

Download openCV (from https://github.com/opencv/opencv/releases) and unzip it somewhere on your computer. Create build folder inside it

Download exra modules from OpenCV. (from https://github.com/opencv/opencv_contrib/releases). Ensure you download the same version.

Unzip the folder.

Click Browse Source and navigate to your openCV folder.

Click Browse Build and navigate to your build Folder.

Click the configure button. You will be asked how you would like to generate the files. Choose Unix-Makefile from the drop down menu and Click OK. CMake will perform some tests and return a set of red boxes appear in the CMake Window.

Search for «OPENCV_EXTRA_MODULES_PATH» and provide the path to modules folder (e.g. /Users/purushottam_d/Programs/OpenCV3_4_5_contrib/modules)

Click Configure again, then Click Generate.

Go to build folder

  1. This will install the opencv libraries on your computer.

An easier way to build OpenCV from source in a step by step fashion as given in this reference: Installing OpenCV from the Source is to,

step 1: install dependencies,

Step 2: create a directory opencv_build and Clone the necessary repositories as shown below,

step 3: cd into opencv directory, inside create another directory called build and cd into it,

step 4: evoke Cmake to build OpenCV,

If step 4 completes successfully you should see the following line at the end of the terminal, the build has been written to the directory created in step 3, along with the following lines above this line,

configuration done generating done

step 5: To start the compilation process where -j is a flag for the number of the processor inside your machine, for example -j6 means we have 6 processors available. to verify the number of processors type nproc on the terminal then use this number after -j. To start this process, we use the following command:

step 6: install OpenCV, We use,

then check the version Of OpenCV to verify the installation:

Источник

CMake says source dir does not appear to contain CMakeLists.txt #752

Operating System

Linux (like Arch Linux)

OBS Studio Version?

StreamFX Version

OBS Studio Log

cmake -H=source/ -B=build/

OBS Studio Crash Log

I’m trying to get OBS up on my new Manjaro install. It is working, installed from pamac, and does open. But I’d really like to have both the virtual camera, and the built-in RTSP server which seem to be missing compared to the install I had up on Kubuntu and Zorin prior. I’m normally a debian/Ubuntu user, but only recently switched to Manjaro. Noting that I can’t open .deb files (Manjaro can’t open .deb right?), I figured maybe I could compile it from source.

Current Behavior

But I get stuck with this error about missing file CMakeLists.txt which does not seem to be in the git repo:

Expected Behavior

I expected it would compile a binary that I can use in obs-studio to enable virtual camera.

Steps to Reproduce the Bug

  • install manjaro
  • install obs-studio using pamac
  • clone the streamfx repo recursively

Any additional Information we need to know?

Linux putin 5.15.7-1-MANJARO #1 SMP PREEMPT Wed Dec 8 10:09:19 UTC 2021 x86_64 GNU/Linux
cmake version 3.22.1
OBS Studio — 27.1.3-1 (linux)
ffmpeg version n4.4.1 Copyright (c) 2000-2021 the FFmpeg developers

commit 2d7fce5 (HEAD -> master, tag: 0.11.0c1, origin/master, origin/HEAD)
Date: Sun Dec 12 17:04:36 2021 +0100
project: Version 0.11.0c1

The text was updated successfully, but these errors were encountered:

Источник

Cmake third_party: not contain CMakeLists.txt #219

I follow the commands cmake third-party library:
cd $PYMESH_PATH/third_party
mkdir build
cd build
cmake ..
make
make install

and the result prompts:
CMake Error: The source directory «$PYMESH_PATH/third_party» does not appear to contain CMakeLists.txt.

I have confirmed that there is no CMakeLists.txt file in the third-party library. Did I make a mistake?

The text was updated successfully, but these errors were encountered:

I also am getting the same issue. I note that there is a build.py file, but this comes with a few problems that makes it using it unwieldy. Specifically, there is no ‘all’ option, and when I attempt to use the script going through dependencies 1-by-1 I get a failure on the first one (cgal) with the same issue (no CMakeLists).

I’ve tried going back to a previous commit (bb0bac9 which was made on the 13/10, which is well before the «Overhaul third party build process.» commit which I suspect is causing the issue). However, this does not work — I get a «error: Server does not allow request for unadvertised object. «.

Yes, sorry about the confusion. Please try using the setup.py build script for building both the third party and the main PyMesh code.

It is still possible to just build third party libraries by themselves, I have provided a build python script:

Thank you very much, Qingnan. I got it.

I have added an all option, and the doc has been updated. To build third party, you can simply

Thanks a lot. I am most grateful.

Hi, but I don’t think this issue should be closed because this has not resolved the issue — the command:

Returns the error: CMake Error: The source directory «

/third_party/build/cgal» does not appear to contain CMakeLists.txt.

Can you let me know your cmake version?

The build script assumes -B options is supported, which requires cmake 3.13.5 and above. Maybe that is why?

Ah yes, you are correct, but this is because the system cmake is used (Ubuntu 18.04 does not have cmake of the required version in the repositories). Could an option be added to specify the cmake bin? This would be very useful because it would enable everyone using Ubuntu 18.04 and older to use your package without having to go through a custom install process for cmake (which would involve overriding the system cmake).

@charlie0389 I have updated the build script. It should work for older cmake now. Please let me know if it is still an issue.

Hello, Qingnan!
When ./build.py draco, an error occurs: error: expected ‘;’ at end of member declaration.
How do I do it?

I seem to be encountering this same error with current pymesh — I have cmake 3.13.4 and I get:

It is running cmake as

@charlie0389 I have updated the build script. It should work for older cmake now. Please let me know if it is still an issue.

It still exists the same issue when the cmake version is 3.10.2.

Hi @qnzhou
After build using your instruction above, I try pymesh function and am getting error:
pymesh’ has no attribute ‘distance_to_mesh’
It states elsewhere ( #37) that it is caused by failure of CGAL to build. But I think it has built. I ran it again and attach herewith a log file, and screen grab.
Note: My problem is similar to the comment in the other thread ( #37) except my CGAL_DIR environmental value is empty.
Can you please help me to understand why I cannot use distance_to_mesh ?
cgal.log

Источник

Wrong CMakeCache.txt directory #12

After it runs the sudo ./LCD5-show command, it throws an error:
CMake Error: The current CMakeCache.txt directory /home/pi/downloads/LCD-show/rpi-fbcp/build/CMakeCache.txt is different than the directory /home/pi/LCD-show/rpi-fbcp/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt CMake Error: The source «/home/pi/downloads/LCD-show/rpi-fbcp/CMakeLists.txt» does not match the source «/home/pi/LCD-show/rpi-fbcp/CMakeLists.txt» used to generate cache. Re-run cmake with a different source directory. CMake Error: The source directory «/home/pi/LCD-show/rpi-fbcp» does not exist. Specify —help for usage, or press the help button on the CMake GUI. Makefile:176: recipe for target ‘cmake_check_build_system’ failed make: *** [cmake_check_build_system] Error 1 LCD configrue 0

The text was updated successfully, but these errors were encountered:

nothing on this one? I’m getting this one too.

You have the LCD-show folder in downloads folder /home/pi/downloads/LCD-show/ must be on /home/pi/LCD-show/ solved moving the directory to home path

who the hell is using raspbian default user pi for doing anything else than booting the os creating an individual admin account?

For me it is best security practice to not use pi as user.

I ran into this issue after running a c++ program on a new computer than the one I had originally ran it on.

The program used a CMakeLists.txt to do the build initially and then created a CMakeCache.txt file.

When I deleted the CMakeCache.txt and ran cmake again it worked as expected. 👍

I ran into this issue after running a c++ program on a new computer than the one I had originally ran it on.

The program used a CMakeLists.txt to do the build initially and then created a CMakeCache.txt file.

When I deleted the CMakeCache.txt and ran cmake again it worked as expected. 👍

Thank you. THIS WORKED. I have been stuck at this spot for 3 days now.

Источник

❯ flutter doctor --verbose
[✓] Flutter (Channel master, 1.19.0-2.0.pre.83, on Linux, locale en_US.UTF-8)
    • Flutter version 1.19.0-2.0.pre.83 at /home/jonas/Documents/flutter
    • Framework revision 8abf0a6d8c (13 hours ago), 2020-05-16 15:07:34 -0700
    • Engine revision aaf9e79f1d
    • Dart version 2.9.0 (build 2.9.0-9.0.dev 2676764792)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/jonas/Android/Sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /snap/android-studio/88/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2

[✓] Android Studio (version 3.6)
    • Android Studio at /snap/android-studio/88/android-studio
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.8052
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Connected device (1 available)
    • Linux • Linux • linux-x64 • Linux

• No issues found!
❯ flutter analyze --verbose
[   +9 ms] executing: [<home>/Documents/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +26 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 8abf0a6d8c0d94fc5a6a6761025fcf035870d8c0
[        ] executing: [<home>/Documents/flutter/] git tag --contains HEAD
[ +165 ms] Exit code 0 from: git tag --contains HEAD
[   +1 ms] executing: [<home>/Documents/flutter/] git describe --match *.*.*-*.*.pre --first-parent --long --tags
[ +120 ms] Exit code 0 from: git describe --match *.*.*-*.*.pre --first-parent --long --tags
[        ] 1.19.0-1.0.pre-83-g8abf0a6d8
[   +6 ms] executing: [<home>/Documents/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [<home>/Documents/flutter/] git ls-remote --get-url origin
[   +2 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +46 ms] executing: [<home>/Documents/flutter/] git rev-parse --abbrev-ref HEAD
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +33 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +7 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[ +180 ms] Generating /tmp/linux_test/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +283 ms] dart <home>/Documents/flutter/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --disable-server-feature-completion --disable-server-feature-search --sdk <home>/Documents/flutter/bin/cache/dart-sdk
[  +16 ms] ==> {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]}}
[        ] ==> {"id":"2","method":"analysis.setAnalysisRoots","params":{"included":["/tmp/linux_test"],"excluded":[]}}
[   +1 ms] Analyzing linux_test...
[ +278 ms] <== {"event":"server.connected","params":{"version":"1.27.4","pid":27000}}
[  +19 ms] <== {"id":"1"}
[ +183 ms] <== {"event":"analysis.errors","params":{"file":"/tmp/linux_test/pubspec.yaml","errors":[]}}
[   +5 ms] <== {"event":"analysis.errors","params":{"file":"/tmp/linux_test/android/app/src/main/AndroidManifest.xml","errors":[]}}
[        ] <== {"event":"analysis.errors","params":{"file":"/tmp/linux_test/android/app/src/profile/AndroidManifest.xml","errors":[]}}
[        ] <== {"event":"analysis.errors","params":{"file":"/tmp/linux_test/android/app/src/debug/AndroidManifest.xml","errors":[]}}
[  +45 ms] <== {"id":"2"}
[ +680 ms] <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[   +2 ms] <== {"event":"analysis.errors","params":{"file":"/tmp/linux_test/lib/main.dart","errors":[]}}
[  +89 ms] <== {"event":"analysis.errors","params":{"file":"/tmp/linux_test/test/widget_test.dart","errors":[]}}
[   +2 ms] <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
[   +8 ms] Analyzing linux_test... (completed in 1.3s)
[        ] No issues found! (ran in 1.3s)
[   +1 ms] "flutter analyze" took 1,825ms.

I ran the following lines

cmake -D CMAKE_BUILD_TYPE=RELEASE 
    -D CMAKE_INSTALL_PREFIX=/usr/local 
    -D INSTALL_C_EXAMPLES=ON 
    -D INSTALL_PYTHON_EXAMPLES=ON 
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.0.0/modules 
    -D BUILD_EXAMPLES=ON 

and got this error

CMake Error: The source directory /home/pi/opencv-3.0.0/build/BUILD_EXAMPLES=ON does not exist`

How could this be solved?

Zanna's user avatar

Zanna

68.2k55 gold badges210 silver badges320 bronze badges

asked Apr 28, 2018 at 11:10

Nauman Ahmed's user avatar

The last argument to the cmake command needs to be a directory containing a CMakeList.txt file.

Usually that’s either the current directory . or the parent directory .. in the case of an out-of-source build where you are running the command from a separate build subdirectory:

cmake -D CMAKE_BUILD_TYPE=RELEASE 
    -D CMAKE_INSTALL_PREFIX=/usr/local 
    -D INSTALL_C_EXAMPLES=ON 
    -D INSTALL_PYTHON_EXAMPLES=ON 
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.0.0/modules 
    -D BUILD_EXAMPLES=ON ..

[I suspect you are following instructions that used .. and misinterpreted it as standing in for an arbitrary list of -D options rather than an actual directory argument]

answered Apr 28, 2018 at 12:16

steeldriver's user avatar

steeldriversteeldriver

127k21 gold badges226 silver badges311 bronze badges

1

Ошибка при компиляции

Модератор: Bizdelnick

Bookkc

Сообщения: 245
ОС: Ubuntu, Gentoo, Debian

Ошибка при компиляции

Код: Выделить всё

root@orangepi:/home/orangepi/classic# cmake ../classic -DCMAKE_INSTALL_PREFIX=../classic/build -DPCH=1 -DDEBUG=0
CMake Error at CMakeLists.txt:33 (message):
  This project requires an out of source build.  Remove the file
  'CMakeCache.txt' found in this directory before continuing, create a
  separate build directory and run 'cmake <srcs> [options]' from there.


-- Configuring incomplete, errors occurred!
See also "/home/orangepi/classic/CMakeFiles/CMakeOutput.log".

Что я делаю не так ???

Аватара пользователя

s.xbatob

Сообщения: 1139
ОС: Fedora

Re: Ошибка при компиляции

Сообщение

s.xbatob » 04.05.2018 11:56

Всё правильно: вы запускаете cmake в том же каталоге, что и дерево исходников. Cmake такое не позволяет. Сделайте то, что он написал: удалите CMakeCache.txt, создайте каталог сборки, перейдите в него и оттуда запустите cmake, указав ему нужный каталог с исходниками.

Bookkc

Сообщения: 245
ОС: Ubuntu, Gentoo, Debian

Re: Ошибка при компиляции

Сообщение

Bookkc » 04.05.2018 12:29

ага. то есть я создаю build заходу в него и как будет выглядеть строка компиляции тогда ?

cmake ../classic -DCMAKE_INSTALL_PREFIX=../build -DPCH=1 -DDEBUG=0

Bookkc

Сообщения: 245
ОС: Ubuntu, Gentoo, Debian

Re: Ошибка при компиляции

Сообщение

Bookkc » 04.05.2018 12:32

root@orangepi:/home/orangepi/classic/build# cmake -DCMAKE_INSTALL_PREFIX=../build -DPCH=1 -DDEBUG=0
CMake Error: The source directory «/home/orangepi/classic/build» does not appear to contain CMakeLists.txt.
Specify —help for usage, or press the help button on the CMake GUI.

NickLion

Сообщения: 3408
Статус: аватар-невидимка
ОС: openSUSE Tumbleweed x86_64

Re: Ошибка при компиляции

Сообщение

NickLion » 04.05.2018 12:38

Bookkc писал(а): ↑

04.05.2018 12:32


cmake -DCMAKE_INSTALL_PREFIX=../build -DPCH=1 -DDEBUG=0

Там ещё указать путь к каталогу с CMakeLists.txt ведь надо, если это родительский каталог, то добавьте ...

Bookkc

Сообщения: 245
ОС: Ubuntu, Gentoo, Debian

Re: Ошибка при компиляции

Сообщение

Bookkc » 04.05.2018 12:42

Оки

Код: Выделить всё

root@orangepi:/home/orangepi/classic/build# cmake ../classic -DCMAKE_INSTALL_PREFIX=../build -DPCH=1 -DDEBUG=0
CMake Error: The source directory "/home/orangepi/classic/classic" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
root@orangepi:/home/orangepi/classic/build#

Оки 2

Код: Выделить всё

root@orangepi:/home/orangepi/classic/build# cmake ../ -DCMAKE_INSTALL_PREFIX=../build -DPCH=1 -DDEBUG=0
CMake Error at CMakeLists.txt:33 (message):
  This project requires an out of source build.  Remove the file
  'CMakeCache.txt' found in this directory before continuing, create a
  separate build directory and run 'cmake <srcs> [options]' from there.


-- Configuring incomplete, errors occurred!
See also "/home/orangepi/classic/CMakeFiles/CMakeOutput.log".
root@orangepi:/home/orangepi/classic/build#

Оки 3

Код: Выделить всё

root@orangepi:/home/orangepi/classic/build# cmake /home/orangepi/classic/ -DCMAKE_INSTALL_PREFIX=../build -DPCH=1 -DDEBUG=0
CMake Error at CMakeLists.txt:33 (message):
  This project requires an out of source build.  Remove the file
  'CMakeCache.txt' found in this directory before continuing, create a
  separate build directory and run 'cmake <srcs> [options]' from there.


-- Configuring incomplete, errors occurred!
See also "/home/orangepi/classic/CMakeFiles/CMakeOutput.log".
root@orangepi:/home/orangepi/classic/build#

Я это всё уже пробовал… что не так ?

NickLion

Сообщения: 3408
Статус: аватар-невидимка
ОС: openSUSE Tumbleweed x86_64

Re: Ошибка при компиляции

Сообщение

NickLion » 04.05.2018 12:46

Вам же в логах пишут понятным языком:

Bookkc писал(а): ↑

04.05.2018 12:42


Remove the file
‘CMakeCache.txt’ found in this directory before continuing

И ранее обратили на это внимание:

s.xbatob писал: ↑

04.05.2018 11:56


Сделайте то, что он написал: удалите CMakeCache.txt

Аватара пользователя

Bizdelnick

Модератор
Сообщения: 19825
Статус: nulla salus bello
ОС: Debian GNU/Linux

Re: Ошибка при компиляции

Сообщение

Bizdelnick » 04.05.2018 12:50

Bookkc писал(а): ↑

04.05.2018 11:49


Что я делаю не так ???

Во-первых, собираете софт под root. По поводу каталога уже сказали. Ну и вообще неплохо бы в вопросе уточнять, что именно пытаетесь собрать.

Пишите правильно:

в консоли
вку́пе (с чем-либо)
в общем
вообще
в течение (часа)
новичок
нюанс
по умолчанию
приемлемо
проблема
пробовать
трафик

Аватара пользователя

Bizdelnick

Модератор
Сообщения: 19825
Статус: nulla salus bello
ОС: Debian GNU/Linux

Re: Ошибка при компиляции

Сообщение

Bizdelnick » 04.05.2018 12:51

Bookkc писал(а): ↑

04.05.2018 12:48


-DCMAKE_INSTALL_PREFIX=../build

А этого делать не надо.

Пишите правильно:

в консоли
вку́пе (с чем-либо)
в общем
вообще
в течение (часа)
новичок
нюанс
по умолчанию
приемлемо
проблема
пробовать
трафик

I put in «make»

CMake Error: The source directory "/home/avian/catkin_ws/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Makefile:500: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1

Then if I put in «catkin_make» and I get this

catkin_make
Base path: /home/avian/catkin_ws/build
The specified source space "/home/avian/catkin_ws/build/src" does not exist

I did edit my CMakeList.txt to

cmake_minimum_required(VERSION 2.8.3) project(beginner_tutorials)

find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs message_generation )

add_message_files( FILES Num.msg )

add_service_files( FILES AddTwoInts.srv )

generate_messages( DEPENDENCIES std_msgs )

catkin_package( ... CATKIN_DEPENDS message_runtime ... ...)

include_directories( ${catkin_INCLUDE_DIRS} )

include_directories(include ${catkin_INCLUDE_DIRS})

add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)

add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner_tutorials_generate_messages_cpp)

I dont know what to do to fix this.

1 Answer

Based on the output you get from running catkin_make, it looks like you’re running it from inside the catkin workspace’s build directory.

catkin_make needs to be run from the catkin workspace root directory, as noted in the guide @skr_robo linked to ( http://wiki.ros.org/catkin/commands/c… ):

$ cd ~/catkin_ws
$ catkin_make

The first line will take your terminal environment to the catkin workspace’s root directory. From there, catkin_make can do it’s thing!

Your Answer

Please start posting anonymously — your entry will be published after you log in or create a new account.

Question Tools

Related questions

Понравилась статья? Поделить с друзьями:
  • Cmake error target dependinfo cmake file not found clion
  • Cmake error does not match the source
  • Cmake error could not create named generator ninja
  • Cmake error could not create named generator mingw makefiles
  • Cmake error cmake was unable to find a build program corresponding to ninja