build: luks-fs-mgr: build fails

Bug #2039980 reported by Davlet Panech
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Davlet Panech

Bug Description

Brief Description
-----------------
Package luks-fs-mgr fails to compile. Likely caused by https://review.opendev.org/c/starlingx/integ/+/894531 .

Severity
--------
Major

Steps to Reproduce
------------------
Build the package

Expected Behavior
------------------
Build succeeds

Actual Behavior
----------------
Build fails

Reproducibility
---------------
Seen once

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
master/2023-10-20

Last Pass
---------
master/2023-10-19

Timestamp/Logs
--------------
From log file luks-fs-mgr_1.0-1.stx.1_amd64.build :

  dpkg-buildpackage
  -----------------

  Command: dpkg-buildpackage --sanitize-env -us -uc -rfakeroot -j6

  [...]

  dh build
     dh_update_autotools_config
     dh_autoreconf
     dh_auto_configure
     dh_auto_build
      make -j6 "INSTALL=install --strip-program=true"
  make[1]: Entering directory '/<<PKGBUILDDIR>>'
  (cd encryption ; make all VER=1 VER_MJR=1)
  make[2]: Entering directory '/<<PKGBUILDDIR>>/encryption'
  make[2]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
  g++ -Wall -Wextra -g -Werror -std=c++11 -I. -o luks-fs-mgr PassphraseGenerator.cpp luks-fs-mgr.cpp -lstdc++ -ljson-c
  PassphraseGenerator.cpp: In member function ‘virtual bool HWIDPassphraseGenerator::generatePassphrase(std::string&)’:
  PassphraseGenerator.cpp:31:19: error: ‘runtime_error’ was not declared in this scope
     31 | throw runtime_error("system_uuid: Command execution failed.");
        | ^~~~~~~~~~~~~
  PassphraseGenerator.cpp:33:19: error: ‘runtime_error’ was not declared in this scope
     33 | throw runtime_error("baseboard-serial: Command execution failed.");
        | ^~~~~~~~~~~~~
  PassphraseGenerator.cpp:35:19: error: ‘runtime_error’ was not declared in this scope
     35 | throw runtime_error("chassis-serial: Command execution failed.");
        | ^~~~~~~~~~~~~
  PassphraseGenerator.cpp:44:19: error: ‘runtime_error’ was not declared in this scope
     44 | throw runtime_error("SHA256 execution failed.");
        | ^~~~~~~~~~~~~
  PassphraseGenerator.cpp:48:9: error: ‘cerr’ was not declared in this scope
     48 | cerr << "Error: " << ex.what() << endl;
        | ^~~~
  PassphraseGenerator.cpp:18:1: note: ‘std::cerr’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
     17 | #include "PassphraseGenerator.h"
    +++ |+#include <iostream>
     18 | using namespace std;
  PassphraseGenerator.cpp:48:43: error: ‘endl’ was not declared in this scope
     48 | cerr << "Error: " << ex.what() << endl;
        | ^~~~
  PassphraseGenerator.cpp:18:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’?
     17 | #include "PassphraseGenerator.h"
    +++ |+#include <ostream>
     18 | using namespace std;
  PassphraseGenerator.cpp: In member function ‘virtual bool SGXPassphraseGenerator::generatePassphrase(std::string&)’:
  PassphraseGenerator.cpp:80:37: error: unused parameter ‘shaPhrase’ [-Werror=unused-parameter]
     80 | bool generatePassphrase(string &shaPhrase) override {
        | ~~~~~~~~^~~~~~~~~
  PassphraseGenerator.cpp: In member function ‘virtual bool TPMPassphraseGenerator::generatePassphrase(std::string&)’:
  PassphraseGenerator.cpp:90:37: error: unused parameter ‘shaPhrase’ [-Werror=unused-parameter]
     90 | bool generatePassphrase(string &shaPhrase) override {
        | ~~~~~~~~^~~~~~~~~
  cc1plus: all warnings being treated as errors
  make[2]: *** [Makefile:25: luks-fs-mgr] Error 1
  make[2]: Leaving directory '/<<PKGBUILDDIR>>/encryption'
  make[1]: *** [Makefile:11: build] Error 2
  make[1]: Leaving directory '/<<PKGBUILDDIR>>'
  dh_auto_build: error: make -j6 "INSTALL=install --strip-program=true" returned exit code 2
  make: *** [debian/rules:10: build] Error 25
  dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Test Activity
-------------
N/A

Workaround
----------
N/A

Changed in starlingx:
status: New → In Progress
Davlet Panech (dpanech)
Changed in starlingx:
assignee: nobody → Davlet Panech (dpanech)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to integ (master)

Reviewed: https://review.opendev.org/c/starlingx/integ/+/898970
Committed: https://opendev.org/starlingx/integ/commit/e35b25e6c0ff71f2d514bf08ba4a4b6790d53621
Submitter: "Zuul (22348)"
Branch: master

commit e35b25e6c0ff71f2d514bf08ba4a4b6790d53621
Author: Davlet Panech <email address hidden>
Date: Fri Oct 20 11:30:25 2023 -0400

    luks-fs-mgr: fix compilation errors

    * Add missing includes
    * Suppress "unused parameter" warnings because this project is built
      with -Werror

    TESTS
    ============================
    * Reproduce the build error
    * Apply this fix, rebuild and make sure it compiles w/o issues

    Closes-Bug: 2039980
    Signed-off-by: Davlet Panech <email address hidden>
    Change-Id: I05bf30845d775e9d754fb61625d2eb13c3712d47

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → High
tags: added: stx.9.0 stx.build
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.