Dolphin, the GameCube and Wii emulator - Forums

Full Version: Can't build master branch on Debian Sid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

sedme

I can't get Dolphin to build. I think it has something to do with libpng. I've tried uninstalling libpng-dev so that it uses the version in the Externals folder, but that doesn't seem to do anything. Here's the output from make. I ran it again so that it doesn't show all the stuff that succeeds.

Code:
thomas@thomas-desktop:~/programs-src/dolphin/build$ make
[  0%] Built target bdisasm
[  0%] Built target cpp-optparse
[  0%] Built target imgui
[  4%] Built target glslang
[  4%] Built target pugixml
[  5%] Built target enet
[  5%] Built target xxhash
[  6%] Built target bzip2
[  9%] Built target zstd
[  9%] Built target minizip
[ 10%] Built target FreeSurround
[ 11%] Built target SoundTouch
[ 11%] Built target fmt
[ 11%] Building CXX object Source/Core/Common/CMakeFiles/common.dir/Image.cpp.o
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp: In function ‘bool Common::LoadPNG(const std::vector<unsigned char>&, std::vector<unsigned char>*, u32*, u32*)’:
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:22:3: error: ‘png_image’ was not declared in this scope; did you mean ‘png_time’?
  22 |   png_image png = {};
     |   ^~~~~~~~~
     |   png_time
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:23:3: error: ‘png’ was not declared in this scope
  23 |   png.version = PNG_IMAGE_VERSION;
     |   ^~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:23:17: error: ‘PNG_IMAGE_VERSION’ was not declared in this scope
  23 |   png.version = PNG_IMAGE_VERSION;
     |                 ^~~~~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:24:8: error: ‘png_image_begin_read_from_memory’ was not declared in this scope
  24 |   if (!png_image_begin_read_from_memory(&png, input.data(), input.size()))
     |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:28:16: error: ‘PNG_FORMAT_RGBA’ was not declared in this scope
  28 |   png.format = PNG_FORMAT_RGBA;
     |                ^~~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:29:21: error: ‘PNG_IMAGE_SIZE’ was not declared in this scope
  29 |   size_t png_size = PNG_IMAGE_SIZE(png);
     |                     ^~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:33:8: error: ‘png_image_finish_read’ was not declared in this scope
  33 |   if (!png_image_finish_read(&png, nullptr, data_out->data(), 0, nullptr))
     |        ^~~~~~~~~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp: In function ‘bool Common::SavePNG(const string&, const u8*, Common::ImageByteFormat, u32, u32, int)’:
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:45:3: error: ‘png_image’ was not declared in this scope; did you mean ‘png_time’?
  45 |   png_image png = {};
     |   ^~~~~~~~~
     |   png_time
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:46:3: error: ‘png’ was not declared in this scope
  46 |   png.version = PNG_IMAGE_VERSION;
     |   ^~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:46:17: error: ‘PNG_IMAGE_VERSION’ was not declared in this scope
  46 |   png.version = PNG_IMAGE_VERSION;
     |                 ^~~~~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:54:18: error: ‘PNG_FORMAT_RGB’ was not declared in this scope
  54 |     png.format = PNG_FORMAT_RGB;
     |                  ^~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:58:18: error: ‘PNG_FORMAT_RGBA’ was not declared in this scope
  58 |     png.format = PNG_FORMAT_RGBA;
     |                  ^~~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:68:3: error: ‘png_alloc_size_t’ was not declared in this scope; did you mean ‘png_size_t’?
  68 |   png_alloc_size_t size = buffer.size();
     |   ^~~~~~~~~~~~~~~~
     |   png_size_t
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:69:65: error: ‘size’ was not declared in this scope; did you mean ‘std::size’?
  69 |   int success = png_image_write_to_memory(&png, buffer.data(), &size, 0, input, stride, nullptr);
     |                                                                 ^~~~
     |                                                                 std::size
In file included from /usr/include/c++/10/string:54,
                from /home/thomas/programs-src/dolphin/Source/Core/Common/Image.h:6,
                from /home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:4:
/usr/include/c++/10/bits/range_access.h:254:5: note: ‘std::size’ declared here
 254 |     size(const _Tp (&)[_Nm]) noexcept
     |     ^~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:69:17: error: ‘png_image_write_to_memory’ was not declared in this scope
  69 |   int success = png_image_write_to_memory(&png, buffer.data(), &size, 0, input, stride, nullptr);
     |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/thomas/programs-src/dolphin/Source/Core/Common/Image.cpp:77:43: error: ‘PNG_IMAGE_ERROR’ was not declared in this scope
  77 |   if (!success || (png.warning_or_error & PNG_IMAGE_ERROR) != 0)
     |                                           ^~~~~~~~~~~~~~~
make[2]: *** [Source/Core/Common/CMakeFiles/common.dir/build.make:342: Source/Core/Common/CMakeFiles/common.dir/Image.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1785: Source/Core/Common/CMakeFiles/common.dir/all] Error 2
make: *** [Makefile:171: all] Error 2
After removing libpng-dev, did you delete the build folder and make a new clean cmake environment for make?

sedme

(08-04-2021, 11:18 PM)KHg8m3r Wrote: [ -> ]After removing libpng-dev, did you delete the build folder and make a new clean cmake environment for make?

Yeah, I did.