blupi-games / planetblupi-dev

Planet Blupi development bundle (main repository)
https://www.blupi.org
GNU General Public License v3.0
51 stars 9 forks source link

Doesn't build under CMake 3.6 #2

Closed krzys-h closed 7 years ago

krzys-h commented 7 years ago

The build fails when running on CMake 3.6:

krzys_h@krzysh-laptop:~/Pulpit/planetblupi-dev-android3/test$ /opt/android-sdk/cmake/3.6.4111459/bin/cmake --version
cmake version 3.6.0-rc2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
krzys_h@krzysh-laptop:~/Pulpit/planetblupi-dev-android3/test$ /opt/android-sdk/cmake/3.6.4111459/bin/cmake ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- 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
CMake Error at /opt/android-sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/ExternalProject.cmake:1883 (message):
  Could not extract tarball filename from url:

    http://prdownloads.sourceforge.net/libpng/libpng-1.6.28.tar.xz?download
Call Stack (most recent call first):
  /opt/android-sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/ExternalProject.cmake:2473 (_ep_add_download_command)
  CMakeLists.txt:166 (ExternalProject_Add)

-- Configuring incomplete, errors occurred!
See also "/home/krzys_h/Pulpit/planetblupi-dev-android3/test/CMakeFiles/CMakeOutput.log".

Works fine when using 3.7:

krzys_h@krzysh-laptop:~/Pulpit/planetblupi-dev-android3/test$ cmake --version
cmake version 3.7.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
krzys_h@krzysh-laptop:~/Pulpit/planetblupi-dev-android3/test$ cmake ..
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- 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
-- Configuring done
-- Generating done
-- Build files have been written to: /home/krzys_h/Pulpit/planetblupi-dev-android3/test

Seems to be related to Kitware/CMake@af7da934a70d2d694cb378db9283eff1859b2747 and Kitware/CMake@57c337e2ef358c5eae2b2e364065e93bf58f0f64, see also ruslo/hunter#455

A simple workaround seems to be to just change:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92a5fbb..1cdc737 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,7 +164,7 @@ ExternalProject_Add (gettext_Project
 #########

 ExternalProject_Add (libpng_Project
-  URL http://prdownloads.sourceforge.net/libpng/libpng-1.6.28.tar.xz?download
+  URL http://prdownloads.sourceforge.net/libpng/libpng-1.6.28.tar.xz
   PREFIX ${CMAKE_BINARY_DIR}
   CONFIGURE_COMMAND ${CMD} ./configure
     --prefix=${CMAKE_BINARY_DIR}
Skywalker13 commented 7 years ago

Thanks, fixed by https://github.com/blupi-games/planetblupi-dev/commit/8db71bd8b49341f2f5dbf11a4d05bbe027686c3f