Issue when run build-extern.sh
Wu-Xiuchao opened this issue · 19 comments
When I run
bash build-extern.sh
I got this error
CMake Error at /home/rush/Desktop/surface_splatting-master/.extern/build/imgui-debug-prefix/src/imgui-debug-stamp/imgui-debug-configure-.cmake:16 (message):
Command failed: 1
'/usr/bin/cmake' '-C/home/rush/Desktop/surface_splatting-master/.extern/build/imgui-debug-prefix/tmp/imgui-debug-cache-.cmake' '-GUnix Makefiles' '/home/rush/Desktop/surface_splatting-master/.extern/build/imgui-prefix/src/imgui'
See also
/home/rush/Desktop/surface_splatting-master/.extern/build/imgui-debug-prefix/src/imgui-debug-stamp/imgui-debug-configure-*.log
CMakeFiles/imgui-debug-install.dir/build.make:72: recipe for target 'imgui-debug-prefix/src/imgui-debug-stamp/imgui-debug-configure' failed
make[2]: *** [imgui-debug-prefix/src/imgui-debug-stamp/imgui-debug-configure] Error 1
CMakeFiles/Makefile2:330: recipe for target 'CMakeFiles/imgui-debug-install.dir/all' failed
make[1]: *** [CMakeFiles/imgui-debug-install.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
How could I fix this problem?
It seems like that the imgui CMake configure step runs into a problem. In order to understand the issue I need to have a look at the log files:
/home/rush/Desktop/surface_splatting-master/.extern/build/imgui-debug-prefix/src/imgui-debug-stamp/imgui-debug-configure-*.log
Please attach them to this issue.
imgui-debug-configure-err.log
shows:
CMake Error at CMakeLists.txt:34 (add_library):
Target "imgui_sdl" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:34 (add_library):
Target "imgui_sdl" links to target "SDL2::SDL2-static" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2-static" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2-static" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:34 (add_library):
Target "imgui_sdl" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:34 (add_library):
Target "imgui_sdl" links to target "SDL2::SDL2-static" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Generate step failed. Build files cannot be regenerated correctly.
The imgui buildsystem is able to successfully find SDL2, i.e. find_package(SDL2 REQUIRED CONFIG)
does not fail. However, this command does not result in the creation of the expected imported targets.
Do you have a CMake user or system package registry with another SDL2 version installed on your system?
I don't know. But I have tested on both Ubuntu and MacOS. They have the same error as what I showed. What should I do to fix this problem?
In /usr/lib/x86_64-linux-gnu
, I find:
libSDL-1.2.so.0 libSDL2-2.0.so.0.8.0 libSDL2_test.a
libSDL-1.2.so.0.11.4 libSDL2.a libSDL_image-1.2.so.0
libSDL2-2.0.so libSDL2main.a libSDL_image-1.2.so.0.8.4
libSDL2-2.0.so.0 libSDL2.so
I removed all lib
and include
files about SDL
, and run again, I got this:
You have called ADD_LIBRARY for library imgui without any source files. This typically indicates a problem with your CMakeLists.txt file
You have called ADD_LIBRARY for library imgui_sdl without any source files. This typically indicates a problem with your CMakeLists.txt file
CMake Error at CMakeLists.txt:34 (add_library):
Target "imgui_sdl" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:34 (add_library):
Target "imgui_sdl" links to target "SDL2::SDL2-static" but the target was
not found. Perhaps a find_package() call is missing for an IMPORTED
target, or an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2-static" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:10 (add_library):
Target "imgui" links to target "SDL2::SDL2-static" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
CMake Error at CMakeLists.txt:34 (add_library):
Target "imgui_sdl" links to target "SDL2::SDL2main" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
The following change should fix the problem:
--- a/cmake/extern/CMakeLists.txt
+++ b/cmake/extern/CMakeLists.txt
@@ -51,6 +51,7 @@ function(BuildProject _name)
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
CMAKE_CACHE_ARGS "-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>"
"-DCMAKE_BUILD_TYPE:STRING=${_arg_BUILD_TYPE}"
+ "-DCMAKE_FIND_ROOT_PATH:PATH=<INSTALL_DIR>"
STEP_TARGETS install
Please delete the .extern
folder before running build-extern.sh
again.
Hi , I have fixed this problem after change the code.
So I try the next step.
cd src
mkdir build
cd build
cmake ../
And then I got this error:
CMake Error at CMakeLists.txt:15 (include):
include could not find load file:
GLvizShaderWrapCpp
CMake Error at CMakeLists.txt:16 (glviz_shader_wrap_cpp):
Unknown CMake command "glviz_shader_wrap_cpp".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.10)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/rush/Desktop/surface_splatting-master/src/build/CMakeFiles/CMakeOutput.log".
Do not run CMake in the src
folder. Run CMake with the top-level CMakeLists.txt
file in the repository root.
Hi, I did what you said and got this:
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
You have called ADD_LIBRARY for library shader without any source files. This typically indicates a problem with your CMakeLists.txt file
CMake Error at src/CMakeLists.txt:28 (add_executable):
add_executable called with incorrect number of arguments
CMake Error at src/CMakeLists.txt:30 (target_sources):
Cannot specify sources for target "surface_splatting" which is not built by
this project.
CMake Error at src/CMakeLists.txt:42 (target_include_directories):
Cannot specify include directories for target "surface_splatting" which is
not built by this project.
CMake Error at src/CMakeLists.txt:46 (target_link_libraries):
Cannot specify link libraries for target "surface_splatting" which is not
built by this project.
-- Configuring incomplete, errors occurred!
See also "/home/rush/Desktop/surface_splatting-master/build/CMakeFiles/CMakeOutput.log".
Which CMake version do you use?
cmake version 3.10.2
Hm, the creation of targets without specifying any source files seems to require unfortunately at least CMake 3.11.
I need to fix this.
So what should I do to fix this ?
Easiest is to just use CMake 3.11 for the time being. A workaround might be to specify an empty .c
or .cpp
at target creation.
Hi, I have cmake successfully, but when I run make
, I got this error:
/usr/bin/ld: cannot find -ldbus-1
/usr/bin/ld: cannot find -libus-1.0
/usr/bin/ld: cannot find -lgio-2.0
/usr/bin/ld: cannot find -lgobject-2.0
/usr/bin/ld: cannot find -lglib-2.0
collect2: error: ld returned 1 exit status
src/CMakeFiles/surface_splatting.dir/build.make:153: recipe for target 'bin/surface_splatting' failed
make[2]: *** [bin/surface_splatting] Error 1
CMakeFiles/Makefile2:122: recipe for target 'src/CMakeFiles/surface_splatting.dir/all' failed
make[1]: *** [src/CMakeFiles/surface_splatting.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
(base) rush@rush-System-Pr
However when I input locate libdbus-1
, I got:
/home/rush/anaconda3/lib/libdbus-1.a
/home/rush/anaconda3/lib/libdbus-1.so
/home/rush/anaconda3/lib/libdbus-1.so.3
/home/rush/anaconda3/lib/libdbus-1.so.3.24.0
/home/rush/anaconda3/pkgs/dbus-1.13.6-h746ee38_0/lib/libdbus-1.a
/home/rush/anaconda3/pkgs/dbus-1.13.6-h746ee38_0/lib/libdbus-1.so
/home/rush/anaconda3/pkgs/dbus-1.13.6-h746ee38_0/lib/libdbus-1.so.3
/home/rush/anaconda3/pkgs/dbus-1.13.6-h746ee38_0/lib/libdbus-1.so.3.24.0
/lib/x86_64-linux-gnu/libdbus-1.so.3
/lib/x86_64-linux-gnu/libdbus-1.so.3.19.4
/snap/core/7270/lib/x86_64-linux-gnu/libdbus-1.so.3
/snap/core/7270/lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
/snap/core/7270/usr/share/doc/libdbus-1-3
/snap/core/7270/usr/share/doc/libdbus-1-3/changelog.Debian.gz
/snap/core/7270/usr/share/doc/libdbus-1-3/copyright.gz
/snap/core18/1066/lib/x86_64-linux-gnu/libdbus-1.so.3
/snap/core18/1066/lib/x86_64-linux-gnu/libdbus-1.so.3.19.4
/snap/core18/1066/usr/share/doc/libdbus-1-3
/snap/core18/1066/usr/share/doc/libdbus-1-3/changelog.Debian.gz
/snap/core18/1066/usr/share/doc/libdbus-1-3/copyright
/snap/core18/1066/usr/share/lintian/overrides/libdbus-1-3
/snap/gnome-3-28-1804/67/lib/x86_64-linux-gnu/libdbus-1.so.3
/snap/gnome-3-28-1804/67/lib/x86_64-linux-gnu/libdbus-1.so.3.19.4
/snap/gnome-3-28-1804/67/usr/share/doc/libdbus-1-3
/snap/gnome-3-28-1804/67/usr/share/doc/libdbus-1-3/AUTHORS.gz
/snap/gnome-3-28-1804/67/usr/share/doc/libdbus-1-3/NEWS.gz
/snap/gnome-3-28-1804/67/usr/share/doc/libdbus-1-3/README.gz
/snap/gnome-3-28-1804/67/usr/share/doc/libdbus-1-3/changelog.Debian.gz
/snap/gnome-3-28-1804/67/usr/share/doc/libdbus-1-3/copyright
/snap/gnome-3-28-1804/67/usr/share/lintian/overrides/libdbus-1-3
/usr/lib/x86_64-linux-gnu/libdbus-1.a
/usr/lib/x86_64-linux-gnu/libdbus-1.so
/usr/share/doc/libdbus-1-3
/usr/share/doc/libdbus-1-dev
/usr/share/doc/libdbus-1-3/AUTHORS.gz
/usr/share/doc/libdbus-1-3/NEWS.gz
/usr/share/doc/libdbus-1-3/README.gz
/usr/share/doc/libdbus-1-3/changelog.Debian.gz
/usr/share/doc/libdbus-1-3/copyright
/usr/share/lintian/overrides/libdbus-1-3
/usr/share/lintian/overrides/libdbus-1-dev
/var/cache/apt/archives/libdbus-1-dev_1.12.2-1ubuntu1.1_amd64.deb
/var/lib/dpkg/info/libdbus-1-3:amd64.list
/var/lib/dpkg/info/libdbus-1-3:amd64.md5sums
/var/lib/dpkg/info/libdbus-1-3:amd64.shlibs
/var/lib/dpkg/info/libdbus-1-3:amd64.symbols
/var/lib/dpkg/info/libdbus-1-3:amd64.triggers
/var/lib/dpkg/info/libdbus-1-dev:amd64.list
/var/lib/dpkg/info/libdbus-1-dev:amd64.md5sums
So why can not find?
OK I know how to fix this problem.
I got the src
file in build
, so what should I do next? I am confused
Both problems are fixed in the most recent version. Thanks!