-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 2 in make processing of cereal. #762
Comments
I tried to make in 18.04. and this installation worked. |
you can disable unit test to avoid the problem cmake .. -DBUILD_TESTS=OFF
|
On Fri, Sep 6, 2024 at 1:05 PM wonder ***@***.***>
wrote:Disabling unit tests in software development—especially in projects
related to mission-critical systems or those that handle ethical and safety
concerns—can introduce both ethical and technical risks. Here’s an outline
of the issues:
### 1. **Ethical Issues**
**A. Accountability & Responsibility**
- **Negligence:** By disabling unit tests, the development team may
knowingly bypass essential validation steps, potentially leading to harm or
failure in mission-critical systems. This could raise ethical concerns
regarding responsibility.
- **Transparency:** In industries with strict safety standards (e.g.,
medical, automotive, aerospace), omitting tests may violate transparency
requirements, which stakeholders rely on for trust.
**B. Compliance with Standards**
- **Regulatory Requirements:** Many sectors require rigorous testing to
ensure the safety and effectiveness of software. Disabling tests may
violate standards like ISO 26262 (automotive) or IEC 61508 (functional
safety). Ethical compliance with these standards is critical.
- **Public Trust:** If software is deployed without proper testing and
later causes harm, public trust in the development organization and
software development as a whole may erode.
**C. Long-term Risk to Human Safety**
- **Safety Risks:** Skipping tests may introduce undetected errors,
which in safety-critical applications (e.g., medical devices or aircraft
control systems) could directly impact human lives.
- **Ethical Design Philosophy:** Developers have a duty to create
reliable and safe software. Disabling tests undermines this philosophy and
may lead to ethical dilemmas, especially if preventable failures cause harm.
### 2. **Technical Issues**
**A. Introduction of Bugs**
- **Higher Likelihood of Bugs:** Unit tests are designed to catch small
bugs early in the development process. Disabling tests increases the risk
of defects going unnoticed, which may lead to crashes or data corruption.
- **Regression Issues:** Future changes to the codebase are not
validated against the previously working state, making it harder to
identify if new code introduces regressions (errors that reappear after
being fixed).
**B. Increased Maintenance Costs**
- **More Complex Debugging:** Without unit tests, future debugging
becomes more difficult because the foundational safety net for code
validation is missing. Technical debt accumulates over time, making
maintenance costly and challenging.
- **Code Quality Degradation:** Unit tests enforce a modular and
structured coding style. Without these tests, the code quality may
deteriorate, making future changes and optimizations risky.
**C. Dependency Breakage**
- **Broken Dependencies:** If parts of the code rely on external
libraries or APIs, disabling tests makes it easier to overlook issues
arising from version upgrades or changes in these dependencies, leading to
failures in the production environment.
### 3. **Mission-Critical Safety Concerns**
**A. Lack of Verification**
- **Inadequate Verification for Critical Functions:** For systems that
are mission-critical—such as avionics, healthcare, or space
exploration—unit tests are essential for verifying the correct behavior of
crucial functions. Without them, failures may occur during operation,
leading to catastrophic consequences.
**B. Uncontrolled Failures**
- **No Early Detection:** Unit tests can serve as an early warning
system, identifying defects before they cascade into more severe issues. In
mission-critical systems, uncontrolled failures due to unchecked errors
could lead to significant damage or loss of life.
**C. Reliability and Uptime**
- **Decreased System Reliability:** For systems where uptime is
critical, such as in financial institutions or industrial control systems,
failure to run unit tests can lead to lower reliability, causing financial
loss, operational downtime, or system breaches.
### Recommendations
- **Only Disable Tests Temporarily:** If disabling tests is required to
resolve a specific issue, ensure that it’s a temporary measure. Track this
decision in the project logs and implement a plan to re-enable testing as
soon as possible.
- **Isolate and Address Problematic Tests:** Instead of disabling all
tests, isolate and fix problematic tests or temporarily exclude only the
affected ones.
- **Implement Alternative Safeguards:** If unit tests are disabled,
additional layers of code review, integration testing, or manual testing
should be implemented to compensate for the lack of automated verification.
- **Document the Decision:** If tests are disabled, document the rationale
and communicate the risks to stakeholders. This ensures accountability and
allows future teams to understand the decision context.
- **Maintain a Robust CI/CD Pipeline:** Make sure the continuous
integration (CI) pipeline is still running other tests (e.g., integration
or system tests) to catch potential issues.
Disabling unit tests should be a last resort, especially for systems with
significant ethical and safety implications. Maintaining a robust testing
framework is crucial for ensuring software reliability, maintaining trust,
and adhering to ethical standards.
… you can disable unit test to avoid the problem
cmake .. -DBUILD_TESTS=OFF
—
Reply to this email directly, view it on GitHub
<#762 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGRK55B666BWTJEDPJBS23ZVELYZAVCNFSM6AAAAABNXWNV7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTGEZTQNBXGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
***@***.***:~$ nvim ser.cpp
***@***.***:~$ g++ ser.cpp
ser.cpp:1:10: fatal error: cereal/types/unordered_map.hpp: No such file or
directory
1 | #include <cereal/types/unordered_map.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
***@***.***:~$ apt-cache search cereal
cereal - automated, logged serial terminal management system
libcereal-dev - C++11 library for serialization
libcereal-doc - C++11 library for serialization HTML documentation
libghc-bytes-dev - Sharing code for serialization between binary and cereal
libghc-bytes-doc - Sharing code for serialization between binary and
cereal; documentation
libghc-bytes-prof - Sharing code for serialization between binary and
cereal; profiling libraries
libghc-cereal-conduit-dev - turn Data.Serialize Gets and Puts into Sources
and Sinks
libghc-cereal-conduit-doc - turn Data.Serialize Gets and Puts into Sources
and Sinks; documentation
libghc-cereal-conduit-prof - turn Data.Serialize Gets and Puts into Sources
and Sinks; profiling libraries
libghc-cereal-dev - binary serialization library
libghc-cereal-doc - binary serialization library; documentation
libghc-cereal-prof - binary serialization library; profiling libraries
libghc-cereal-vector-dev - Serialize instances for Data.Vector types
libghc-cereal-vector-doc - Serialize instances for Data.Vector types;
documentation
libghc-cereal-vector-prof - Serialize instances for Data.Vector types;
profiling libraries
libghc-safecopy-dev - Haskell serialization library with version control -
GHC libraries
libghc-safecopy-doc - Haskell serialization library with version control -
documentation; documentation
libghc-safecopy-prof - Haskell serialization library with version control -
GHC profiling libraries; profiling libraries
python3-cerealizer - secure pickle-like module for Python 3
***@***.***:~$ sudo apt install libcereal-dev libcereal-doc
[sudo] password for ian:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer
required:
chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libflashrom1 libftdi1-2
libgstreamer-plugins-bad1.0-0 libllvm13 libva-wayland2
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
rapidjson-dev
Suggested packages:
rapidjson-doc
The following NEW packages will be installed:
libcereal-dev libcereal-doc rapidjson-dev
0 to upgrade, 3 to newly install, 0 to remove and 6 not to upgrade.
Need to get 723 kB of archives.
After this operation, 7,254 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://au.archive.ubuntu.com/ubuntu jammy/universe amd64
rapidjson-dev all 1.1.0+dfsg2-7 [95.0 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu jammy/universe amd64
libcereal-dev all 1.3.1+dfsg-1 [222 kB]
Get:3 http://au.archive.ubuntu.com/ubuntu jammy/universe amd64
libcereal-doc all 1.3.1+dfsg-1 [406 kB]
Fetched 723 kB in 0s (7,647 kB/s)
Selecting previously unselected package rapidjson-dev.
(Reading database ... 255799 files and directories currently installed.)
Preparing to unpack .../rapidjson-dev_1.1.0+dfsg2-7_all.deb ...
Unpacking rapidjson-dev (1.1.0+dfsg2-7) ...
Selecting previously unselected package libcereal-dev.
Preparing to unpack .../libcereal-dev_1.3.1+dfsg-1_all.deb ...
Unpacking libcereal-dev (1.3.1+dfsg-1) ...
Selecting previously unselected package libcereal-doc.
Preparing to unpack .../libcereal-doc_1.3.1+dfsg-1_all.deb ...
Unpacking libcereal-doc (1.3.1+dfsg-1) ...
Setting up rapidjson-dev (1.1.0+dfsg2-7) ...
Setting up libcereal-doc (1.3.1+dfsg-1) ...
Setting up libcereal-dev (1.3.1+dfsg-1) ...
***@***.***:~$ g++ ser.cpp
***@***.***:~$ ./a.out
***@***.***:~$ nano ser,cpp
***@***.***:~$ nano ser.cpp
***@***.***:~$ ls out.cereal
out.cereal
***@***.***:~$ cat out.cereal
***@***.***:~$ cat ser.cpp
#include <cereal/types/unordered_map.hpp>
#include <cereal/types/memory.hpp>
#include <cereal/archives/binary.hpp>
#include <fstream>
struct MyRecord
{
uint8_t x, y;
float z;
template <class Archive>
void serialize( Archive & ar )
{
ar( x, y, z );
}
};
struct SomeData
{
int32_t id;
std::shared_ptr<std::unordered_map<uint32_t, MyRecord>> data;
template <class Archive>
void save( Archive & ar ) const
{
ar( data );
}
template <class Archive>
void load( Archive & ar )
{
static int32_t idGen = 0;
id = idGen++;
ar( data );
}
};
int main()
{
std::ofstream os("out.cereal", std::ios::binary);
cereal::BinaryOutputArchive archive( os );
SomeData myData;
archive( myData );
return 0;
}
***@***.***:~$
…On Fri, Sep 6, 2024 at 2:15 PM Ian Ajzenszmidt ***@***.***> wrote:
On Fri, Sep 6, 2024 at 1:05 PM wonder ***@***.***>
wrote:Disabling unit tests in software development—especially in projects
related to mission-critical systems or those that handle ethical and safety
concerns—can introduce both ethical and technical risks. Here’s an outline
of the issues:
### 1. **Ethical Issues**
**A. Accountability & Responsibility**
- **Negligence:** By disabling unit tests, the development team may
knowingly bypass essential validation steps, potentially leading to harm or
failure in mission-critical systems. This could raise ethical concerns
regarding responsibility.
- **Transparency:** In industries with strict safety standards (e.g.,
medical, automotive, aerospace), omitting tests may violate transparency
requirements, which stakeholders rely on for trust.
**B. Compliance with Standards**
- **Regulatory Requirements:** Many sectors require rigorous testing to
ensure the safety and effectiveness of software. Disabling tests may
violate standards like ISO 26262 (automotive) or IEC 61508 (functional
safety). Ethical compliance with these standards is critical.
- **Public Trust:** If software is deployed without proper testing and
later causes harm, public trust in the development organization and
software development as a whole may erode.
**C. Long-term Risk to Human Safety**
- **Safety Risks:** Skipping tests may introduce undetected errors,
which in safety-critical applications (e.g., medical devices or aircraft
control systems) could directly impact human lives.
- **Ethical Design Philosophy:** Developers have a duty to create
reliable and safe software. Disabling tests undermines this philosophy and
may lead to ethical dilemmas, especially if preventable failures cause harm.
### 2. **Technical Issues**
**A. Introduction of Bugs**
- **Higher Likelihood of Bugs:** Unit tests are designed to catch small
bugs early in the development process. Disabling tests increases the risk
of defects going unnoticed, which may lead to crashes or data corruption.
- **Regression Issues:** Future changes to the codebase are not
validated against the previously working state, making it harder to
identify if new code introduces regressions (errors that reappear after
being fixed).
**B. Increased Maintenance Costs**
- **More Complex Debugging:** Without unit tests, future debugging
becomes more difficult because the foundational safety net for code
validation is missing. Technical debt accumulates over time, making
maintenance costly and challenging.
- **Code Quality Degradation:** Unit tests enforce a modular and
structured coding style. Without these tests, the code quality may
deteriorate, making future changes and optimizations risky.
**C. Dependency Breakage**
- **Broken Dependencies:** If parts of the code rely on external
libraries or APIs, disabling tests makes it easier to overlook issues
arising from version upgrades or changes in these dependencies, leading to
failures in the production environment.
### 3. **Mission-Critical Safety Concerns**
**A. Lack of Verification**
- **Inadequate Verification for Critical Functions:** For systems that
are mission-critical—such as avionics, healthcare, or space
exploration—unit tests are essential for verifying the correct behavior of
crucial functions. Without them, failures may occur during operation,
leading to catastrophic consequences.
**B. Uncontrolled Failures**
- **No Early Detection:** Unit tests can serve as an early warning
system, identifying defects before they cascade into more severe issues. In
mission-critical systems, uncontrolled failures due to unchecked errors
could lead to significant damage or loss of life.
**C. Reliability and Uptime**
- **Decreased System Reliability:** For systems where uptime is
critical, such as in financial institutions or industrial control systems,
failure to run unit tests can lead to lower reliability, causing financial
loss, operational downtime, or system breaches.
### Recommendations
- **Only Disable Tests Temporarily:** If disabling tests is required to
resolve a specific issue, ensure that it’s a temporary measure. Track this
decision in the project logs and implement a plan to re-enable testing as
soon as possible.
- **Isolate and Address Problematic Tests:** Instead of disabling all
tests, isolate and fix problematic tests or temporarily exclude only the
affected ones.
- **Implement Alternative Safeguards:** If unit tests are disabled,
additional layers of code review, integration testing, or manual testing
should be implemented to compensate for the lack of automated verification.
- **Document the Decision:** If tests are disabled, document the rationale
and communicate the risks to stakeholders. This ensures accountability and
allows future teams to understand the decision context.
- **Maintain a Robust CI/CD Pipeline:** Make sure the continuous
integration (CI) pipeline is still running other tests (e.g., integration
or system tests) to catch potential issues.
Disabling unit tests should be a last resort, especially for systems with
significant ethical and safety implications. Maintaining a robust testing
framework is crucial for ensuring software reliability, maintaining trust,
and adhering to ethical standards.
> you can disable unit test to avoid the problem
>
> cmake .. -DBUILD_TESTS=OFF
>
> —
> Reply to this email directly, view it on GitHub
> <#762 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABGRK55B666BWTJEDPJBS23ZVELYZAVCNFSM6AAAAABNXWNV7KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTGEZTQNBXGY>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: