Almamu / linux-wallpaperengine

Wallpaper Engine backgrounds for Linux!
GNU General Public License v3.0
1.67k stars 61 forks source link

Won't Compile #74

Closed Soggy-Pancake closed 2 years ago

Soggy-Pancake commented 2 years ago

-- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is unknown -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- broken CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler

"/usr/bin/cc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_7e905/fast && /usr/bin/make -f CMakeFiles/cmTC_7e905.dir/build.make CMakeFiles/cmTC_7e905.dir/build
make[1]: Entering directory '/home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_7e905.dir/testCCompiler.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_7e905.dir/testCCompiler.c.o   -c /home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_7e905
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7e905.dir/link.txt --verbose=1
/usr/bin/cc      -rdynamic CMakeFiles/cmTC_7e905.dir/testCCompiler.c.o  -o cmTC_7e905 
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_7e905.dir/build.make:87: cmTC_7e905] Error 1
make[1]: Leaving directory '/home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_7e905/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)

CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred! See also "/home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeOutput.log". See also "/home/soggy-pancake/Downloads/wallpaperenginelinux/build/CMakeFiles/CMakeError.log".

Almamu commented 2 years ago

Sounds like you might be missing some stuff required for the compiler. Installing it will depend on what distro you're using. If you're using a debian-based distro most likely the package build-essential should fix this issue.

TheArcaneBrony commented 2 years ago

Can reproduce, but on FreeImage:

[100%] Linking CXX executable wallengine
/usr/bin/ld: CMakeFiles/wallengine.dir/main.cpp.o: in function `main':
main.cpp:(.text+0x6d6): undefined reference to `FreeImage_Initialise'
/usr/bin/ld: main.cpp:(.text+0xdf1): undefined reference to `FreeImage_DeInitialise'
/usr/bin/ld: CMakeFiles/wallengine.dir/src/WallpaperEngine/Assets/CTexture.cpp.o: in function `WallpaperEngine::Assets::CTexture::CTexture(void*)':
CTexture.cpp:(.text+0x523): undefined reference to `FreeImage_OpenMemory'
/usr/bin/ld: CTexture.cpp:(.text+0x548): undefined reference to `FreeImage_LoadFromMemory'
/usr/bin/ld: CTexture.cpp:(.text+0x558): undefined reference to `FreeImage_FlipVertical'
/usr/bin/ld: CTexture.cpp:(.text+0x564): undefined reference to `FreeImage_ConvertTo32Bits'
/usr/bin/ld: CTexture.cpp:(.text+0x574): undefined reference to `FreeImage_GetBits'
/usr/bin/ld: CTexture.cpp:(.text+0x584): undefined reference to `FreeImage_GetWidth'
/usr/bin/ld: CTexture.cpp:(.text+0x596): undefined reference to `FreeImage_GetHeight'
/usr/bin/ld: CTexture.cpp:(.text+0x6d5): undefined reference to `FreeImage_Unload'
/usr/bin/ld: CTexture.cpp:(.text+0x6e1): undefined reference to `FreeImage_Unload'
/usr/bin/ld: CTexture.cpp:(.text+0x6ed): undefined reference to `FreeImage_CloseMemory'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/wallengine.dir/build.make:1139: wallengine] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/wallengine.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Distro: Arch Linux

EDIT: Upon closer reading, these issues may be unrelated. EDIT 2: Resolved by deleting build directory and trying again

UltraBlackLinux commented 2 years ago

Just faced the same build issue, also solved by deleting build and trying again. Why does this work xD Thank you for sharing that!

RiverMoot commented 2 years ago

I encountered the same issue and the solution also worked for me. I don't know abt you all, but I think I got the issue due to my failed attempts at compilation while I was figuring out dependencies.

tysm for looking into this!!!!