Package: libubootenv-tool
Version: 0.2-1
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source
Dear Maintainer,
I tried to build libubootenv-tool with dpkg-buildpackage and the following
error
did occur:
```
-- Detecting C compile features - done
CMake Error at src/CMakeLists.txt:29 (install):
install TARGETS given no RUNTIME DESTINATION for executable target
"fw_printenv".
CMake Error at src/CMakeLists.txt:30 (install):
install TARGETS given no RUNTIME DESTINATION for executable target
"fw_setenv".
```
I fix the build error by moving the
```
include("GNUInstallDirs")
```
from Subject: [PATCH 2/4] Add support GNUInstallDirs
before
```
add_subdirectory (src)
```
Best regards,
Quirin
-- System Information:
Debian Release: 10.5
APT prefers stable
APT policy: (800, 'stable'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-10-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=UTF-8) (ignored: LC_ALL set to
en_US.UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to
en_US.UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
>From c0ada30c985cda300c94ab243944b5e70df40bc1 Mon Sep 17 00:00:00 2001
From: Quirin Gylstorff <[email protected]>
Date: Mon, 3 Aug 2020 18:04:03 +0200
Subject: [PATCH] libubootenv: Change possition of include
Cmake modules should be included before the usage of variables or
function from the module.
Signed-off-by: Quirin Gylstorff <[email protected]>
---
.../0002-Add-support-GNUInstallDirs.patch | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/debian/patches/0002-Add-support-GNUInstallDirs.patch
b/debian/patches/0002-Add-support-GNUInstallDirs.patch
index abe9b93..41c3bbe 100644
--- a/debian/patches/0002-Add-support-GNUInstallDirs.patch
+++ b/debian/patches/0002-Add-support-GNUInstallDirs.patch
@@ -1,4 +1,4 @@
-From b17d194bd8285a19382a902a0bec9e5e042df064 Mon Sep 17 00:00:00 2001
+From 6e8ce00347b276a336bb3006f2fccce81d150fc6 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <[email protected]>
Date: Tue, 16 Apr 2019 08:52:01 +0900
Subject: [PATCH 2/4] Add support GNUInstallDirs
@@ -9,24 +9,25 @@ installation compatible with GNU.
https://cmake.org/cmake/help/v3.14/module/GNUInstallDirs.html
Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
+Signed-off-by: Quirin Gylstorff <[email protected]>
---
CMakeLists.txt | 2 ++
src/CMakeLists.txt | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 104969e..1d66f60 100644
+index 104969e..57477fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -14,6 +14,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
- include_directories ("${PROJECT_SOURCE_DIR}/src")
- add_subdirectory (src)
+@@ -10,6 +10,8 @@ add_definitions(-DVERSION="${VERSION}")
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+include("GNUInstallDirs")
+
- # first we can indicate the documentation build as an option and set it to ON
by default
- option(BUILD_DOC "Build documentation" ON)
-
+ #set(CMAKE_C_FLAGS_DEBUG "-g")
+ include_directories ("${PROJECT_SOURCE_DIR}/src")
+ add_subdirectory (src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ea5979c..d97f221 100644
--- a/src/CMakeLists.txt
@@ -44,5 +45,5 @@ index ea5979c..d97f221 100644
+install (TARGETS fw_printenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
+install (TARGETS fw_setenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
--
-2.24.0
+2.20.1
--
2.20.1
>From c0ada30c985cda300c94ab243944b5e70df40bc1 Mon Sep 17 00:00:00 2001
From: Quirin Gylstorff <[email protected]>
Date: Mon, 3 Aug 2020 18:04:03 +0200
Subject: [PATCH] libubootenv: Change possition of include
Cmake modules should be included before the usage of variables or
function from the module.
Signed-off-by: Quirin Gylstorff <[email protected]>
---
.../0002-Add-support-GNUInstallDirs.patch | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/debian/patches/0002-Add-support-GNUInstallDirs.patch
b/debian/patches/0002-Add-support-GNUInstallDirs.patch
index abe9b93..41c3bbe 100644
--- a/debian/patches/0002-Add-support-GNUInstallDirs.patch
+++ b/debian/patches/0002-Add-support-GNUInstallDirs.patch
@@ -1,4 +1,4 @@
-From b17d194bd8285a19382a902a0bec9e5e042df064 Mon Sep 17 00:00:00 2001
+From 6e8ce00347b276a336bb3006f2fccce81d150fc6 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <[email protected]>
Date: Tue, 16 Apr 2019 08:52:01 +0900
Subject: [PATCH 2/4] Add support GNUInstallDirs
@@ -9,24 +9,25 @@ installation compatible with GNU.
https://cmake.org/cmake/help/v3.14/module/GNUInstallDirs.html
Signed-off-by: Nobuhiro Iwamatsu <[email protected]>
+Signed-off-by: Quirin Gylstorff <[email protected]>
---
CMakeLists.txt | 2 ++
src/CMakeLists.txt | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 104969e..1d66f60 100644
+index 104969e..57477fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -14,6 +14,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
- include_directories ("${PROJECT_SOURCE_DIR}/src")
- add_subdirectory (src)
+@@ -10,6 +10,8 @@ add_definitions(-DVERSION="${VERSION}")
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
+include("GNUInstallDirs")
+
- # first we can indicate the documentation build as an option and set it to ON
by default
- option(BUILD_DOC "Build documentation" ON)
-
+ #set(CMAKE_C_FLAGS_DEBUG "-g")
+ include_directories ("${PROJECT_SOURCE_DIR}/src")
+ add_subdirectory (src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ea5979c..d97f221 100644
--- a/src/CMakeLists.txt
@@ -44,5 +45,5 @@ index ea5979c..d97f221 100644
+install (TARGETS fw_printenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
+install (TARGETS fw_setenv DESTINATION "${CMAKE_INSTALL_BINDIR}")
--
-2.24.0
+2.20.1
--
2.20.1