scons: building terminated because of errors - gem5

I cloned this https://gem5.googlesource.com/public/gem5 and ran the scons build/X86/gem5.opt -j5 in the gem5 directory. I get
scons: building terminated because of errors.
A snippet of the error log:
In file included from build/X86/arch/x86/interrupts.hh:58,
from build/X86/arch/interrupts.hh:1,
from build/X86/cpu/base.hh:57,
from build/X86/mem/abstract_mem.cc:50:
build/X86/arch/x86/intmessage.hh: In function 'Packet* X86ISA::buildIntRequest(uint8_t, X86ISA::TriggerIntMessage)':
build/X86/arch/x86/intmessage.hh:105:42: error: implicitly-declared 'constexpr BitfieldBackend::BitUnionOperators<X86ISA::BitfieldUnderlyingClassesTriggerIntMessage>::BitUnionOperators(const
BitfieldBackend::BitUnionOperators<X86ISA::BitfieldUnderlyingClassesTriggerIntMessage>&)' is deprecated [-Werror=deprecated-copy]
105 | sizeof(TriggerIntMessage));
Another snippet:
In file included from build/X86/cpu/base.hh:64,
from build/X86/mem/abstract_mem.cc:50:
build/X86/sim/insttracer.hh: In member function 'void Trace::InstRecord::setData(VecRegContainer<8>&)':
build/X86/sim/insttracer.hh:203:71: error: implicitly-declared 'constexpr VecRegContainer<8>::VecRegContainer(const VecRegContainer<8>&)' is deprecated [-Werror=deprecated-copy]
203 | data.as_vec = new ::VecRegContainer<TheISA::VecRegSizeBytes>(d);
Warnings:
MI_example-cache.sm:179: Warning: Non-void return ignored, return type is 'bool'
MI_example-cache.sm:181: Warning: Non-void return ignored, return type is 'bool'
MI_example-cache.sm:336: Warning: Non-void return ignored, return type is 'Tick'
MI_example-cache.sm:350: Warning: Non-void return ignored, return type is 'Scalar'
MI_example-cache.sm:354: Warning: Non-void return ignored, return type is 'Scalar'
MI_example-dir.sm:183: Warning: Non-void return ignored, return type is 'bool'
MI_example-dir.sm:398: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dir.sm:402: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dir.sm:482: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dir.sm:277: Warning: Unused action: a_sendWriteBackAck, Send writeback ack to requestor
MI_example-dma.sm:189: Warning: Non-void return ignored, return type is 'Tick'
MI_example-dma.sm:193: Warning: Non-void return ignored, return type is 'Tick'
>
git SHA: af8d107191cc69a77624e2af34f108dc9c1ff03f
OS: Archlinux 5.1.11-arch1-1-ARCH
It previously worked on my computer with the same procedure. It works on my other system(pc).

Related

react-native-gesture-handler:generateReleaseRFile FAILED trying to generate APK

I am trying to generate APK but i run into an Obstacle, I am getting this As error :
> Task :react-native-gesture-handler:generateReleaseRFile FAILED
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-gesture-handler:generateReleaseRFile'.
> Could not resolve all files for configuration ':react-native-gesture-handler:releaseCompileClasspath'.
> Failed to transform react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=release, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
> Could not find react-native-0.71.0-rc.0-release.aar (com.facebook.react:react-native:0.71.0-rc.0).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/facebook/react/react-native/0.71.0-rc.0/react-native-0.71.0-rc.0-release.aar
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
BUILD FAILED in 2m 8s
62 actionable tasks: 4 executed, 58 up-to-date
What would I not be doing rightly?
Other errors include
info Writing bundle output to:, D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle
info Writing sourcemap output to:, D:\react-native\******\android\app\build\intermediates\sourcemaps\react\release\index.android.bundle.packager.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 13 asset files
info Done copying assets
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:1769:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
typeof DebuggerInternal !== 'undefined' && DebuggerInternal.shouldPauseOnThrow === true
^~~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:4994:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
setTimeout(function () {
^~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:3592:21: warning: the variable "clearTimeout" was not declared in anonymous function " 90#"
cancelTimeout = clearTimeout;
^~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:7492:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 90#"
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:7507:146: warning: the variable "nativeFabricUIManager" was not declared in anonymous function " 119#"
null != handle._nativeTag && (null != handle._internalInstanceHandle ? (handle = handle._internalInstanceHandle.stateNode, null != handle && nativeFabricUIManager.dispatchCommand(handle.node, command, args)) : _$$_REQUIRE(_dependencyMap[2]).UIManager.dispatchViewManagerCommand(handle._nativeTag, command, args));
^~~~~~~~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:8324:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
setImmediate(function () {
^~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:8540:16: warning: the variable "AggregateError" was not declared in function "getAggregateError"
if (typeof AggregateError === 'function') {
^~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11456:12: warning: the variable "fetch" was not declared in anonymous function " 294#"
fetch: fetch,
^~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11457:14: warning: the variable "Headers" was not declared in anonymous function " 294#"
Headers: Headers,
^~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11458:14: warning: the variable "Request" was not declared in anonymous function " 294#"
Request: Request,
^~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11459:15: warning: the variable "Response" was not declared in anonymous function " 294#"
Response: Response
^~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11608:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
var reader = new FileReader();
^~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11645:36: warning: the variable "Blob" was not declared in anonymous function " 305#"
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
^~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11647:40: warning: the variable "FormData" was not declared in anonymous function " 305#"
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
^~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11649:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 305#"
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
^~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11877:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 314#"
var xhr = new XMLHttpRequest();
^~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:11468:76: warning: the variable "self" was not declared in anonymous function " 297#"
var global = typeof globalThis !== 'undefined' && globalThis || typeof self !== 'undefined' && self || typeof global !== 'undefined' && global;
^~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:19082:27: warning: the variable "performance" was not declared in anonymous function " 498#"
if ("object" === typeof performance && "function" === typeof performance.now) {
^~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:19105:26: warning: the variable "navigator" was not declared in anonymous function " 498#"
"undefined" !== typeof navigator && undefined !== navigator.scheduling && undefined !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);
^~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:19172:37: warning: the variable "MessageChannel" was not declared in anonymous function " 498#"
};else if ("undefined" !== typeof MessageChannel) {
^~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:26733:32: warning: the variable "requestAnimationFrame" was not declared in function "onUpdate"
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
^~~~~~~~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:65200:7: warning: the property "alignItems" was set multiple times in the object definition.
alignItems: 'center',
^~~~~~~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:65199:7: note: The first definition was here.
alignItems: 'flex-start',
^~~~~~~~~~~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:65242:7: warning: the property "alignItems" was set multiple times in the object definition.
alignItems: 'center',
^~~~~~~~~~~~~~~~~~~~
D:\react-native\******\android\app\build\generated\assets\react\release\index.android.bundle:65241:7: note: The first definition was here.
alignItems: 'flex-end',
^~~~~~~~~~~~~~~~~~~~~~
Been searching out different things on the Internet, could not find anything that solves the issue. Seems React native has changed some things i do not seem to see why its giving this As an error.
android/build.gradle
comment this line
maven {
url("$rootDir/../node_modules/react-native/android")
}
add
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
mavenLocal()
add these lines into android/build.gradle File
allprojects {
repositories {
google()
exclusiveContent {
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
}

SystemC ERROR: type name requires a specifier or qualifier

I am trying to write synthesizable SystemC code.
My code:
struct test:sc_module{
sc_in<sc_lv<4>> inp;
sc_out<sc_lv<4>> outp;
void run(){
sc_lv<4> temp = inp.read();
outp.write(temp);
}
SC_CTOR(test){
SC_METHOD(run);
sensitive << inp;
}
};
I am able to simulate the code, but when I run synthesis, Vivado HLS v.2019 throws the following errors. Can someone please help me understand how to fix this error?
ERROR: [HLS 200-70] Compilation errors found: In file included from test2/test.cpp:1:
test2/test.cpp:4:18: error: use of undeclared identifier 'inp'
sc_in<sc_lv<4>> inp;
^
test2/test.cpp:4:21: error: type name requires a specifier or qualifier
sc_in<sc_lv<4>> inp;
^
test2/test.cpp:4:21: warning: declaration does not declare anything [-Wmissing-declarations]
sc_in<sc_lv<4>> inp;
When I add spaces between the angular brackets (as below), it does not throw an error, and synthesis runs successfully.
sc_in< sc_lv<4> > inp;
sc_out< sc_lv<4> > outp;

How to write custom errors and return messages with error keyword Solidity

I tried to make a custom error but it doesn't return a message to revert
How could I make it return a message?
/// custom error
error MyCustomError(address _address);
if user { revert MyCustomError({address: msg.sender}) }
I got this error
Runtime error: revert
There are two errors:
1- if statement should be inside a function
2- when you defined the custom error,you defined the named parameter as _address
contract Test {
address public user;
/// custom error
error MyCustomError(address _address);
function revertError() public view {
// I just had to pass a valid condition. address(0)=0x0000000000000000000000000000000000000000
// if(user) would give this error: "Type address is not implicitly convertible to expected type bool"
if(user!=address(0))
{
revert MyCustomError({_address: msg.sender});
}
}
}

returning error code from open acc routine directive

I am porting a CPU code to GPU with OPENACC,
the routine returns exit code
int myFunction()
{
// so stuff
// it has a check for division by zero
int returnVal=SUCCESS;
if(fabs(a)<1e-14)
{
returnVal=1;
}
return(returnVal);
}
adding the
#pragma acc routine seq
int myFunction()
{
// so stuff
// it has a check for division by zero
int returnVal=SUCCESS;
if(fabs(a)<1e-14)
{
returnVal=1;
}
return(returnVal);
}
will give the following error,
call to cuStreamSynchronize returned error 719: Launch failed (often invalid pointer dereference)
call to cuMemFreeHost returned error 719: Launch failed (often invalid pointer dereference)
Primary job terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
If I eliminate the return by changing it to void, it works fine,
what is the correct way of doing this ?
I do understand the race condition, given the fact that this is called inside a loop, should I privatize the return value and then perform a reduction on it?

Wrong argument type for NSAssert1

This isn't giving me an error but several warnings I'd like to get rid of.
OSErr err = AudioUnitInitialize(toneUnit);
NSAssert1(err == noErr, #"Error initializing unit: %ld", err);
The warning I'm getting is: Format specifies type 'long' but the argument has type 'OSErr' (aka 'short'). Obviously I can change this by using long instead of OSErr but I was wondering why I'm getting the error. This is an upcast so I thought it shouldn't cause any problems.
Can anyone explain?
Since NSAssert1 is a variadic function implemented within the constraints of C, it cannot perform the cast internally: it is not possible to find the type of an argument passed in the vararg section of the function. Objective-C compiler will perform the default type promotions before making the call, but the short is converted to int, not to long by default. That is why you should either insert an explicit cast, or use a different format specifier.
Use
NSAssert1(err == noErr, #"Error initializing unit: %hd", err);
or
NSAssert1(err == noErr, #"Error initializing unit: %ld", (long)err);
instead.