cargo compile error with 'nanorand' E0425 - random

While I'm trying to build cargo build --release --target wasm32-unknown-unknown --lib it does return an error saying:
Error[E0425]: cannot find function `backup_entropy` in this scope
--> /home/xxx/.cargo/registry/src/github.com-1ecc6299db9ec823/nanorand-0.6.1/src/entropy/mod.rs:51:2
|
51 | backup_entropy(out);
| ^^^^^^^^^^^^^^ not found in this scope
For more information about this error, try `rustc --explain E0425`.
error: could not compile `nanorand` due to previous error
I haven't called a backup_entropy function anywhere in my code, but It could be called by other dependencies which I use, which includes "rand". Is there a way to make it build? If you know more details on this error type and/if it's connected with rand crate, I'd love to hear from you.

Related

Error when trying to run 'gradlew assembleRelease' in the Windows command line : jest-haste-map: Haste module naming collision

I am trying to generate a .apk file of my react native project with the 'gradlew assembleRelease' command. I'm using AWS Amplify, which is where the naming collision seems to be coming from. The version of react native I'm running is 0.59.9.
I've tried creating a 'rn-cli.config.js' file in the root folder and replacing the code in the 'metro.config.js' with the 'rn-cli.config.js' code, which was unsuccessful. I can't remove the problem folder either because that creates more errors.
I've also tried stopping and restarting the Gradle daemon, which hasn't worked either. This is the error I'm getting:
Configure project :app
WARNING: The specified Android SDK Build Tools version (25.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.0.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.0'" from your build.gradle file, as each version of the Android Gradle Plugin now has a
default version of the build tools.
Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
error jest-haste-map: Haste module naming collision:
Duplicate module name: myreactnativeapp_cfnlambda_ff57ce62
Paths: C:\Users\Kim\Desktop\myReactNativeApp\amplify\backend\interactions\reactLex\src\package.json collides with C:\Users\Kim\Desktop\myReactNativeApp\amplify#current-cloud-backend\interactions\reactLex\src\package.json
This error is caused by hasteImpl returning the same name for different files.. Run CLI with --verbose flag for more details.
Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
Process 'command 'cmd'' finished with non-zero exit value 1
The code in the 'rn-cli.config.js' file looks like this:
const blacklist = require('metro-config/src/defaults/blacklist');
// blacklist is a function that takes an array of regexes and combines
// them with the default blacklist to return a single regex.
module.exports = {
resolver: {
blacklistRE: blacklist([/amplify\/.*/])
}
};'
Do I need to change the code in the 'rn-cli.config.js' file or is there another workaround I could try?

Converting maven to gradle of Spring Initializr

Spring Initializr is a open source project , which can be downloaded/cloned from github to run our own spring initializr. however the build of the project is maven. I want to convert it to gradle. Can anyone Help ?
I tried it with gradle init and gradle build
Gradle init is creating build.gradle and settings.gradle but gradle build is giving error.
Can someone try and post the solution
Thanks in advance
Error Details :
Task :initializr-actuator:compileTestJava FAILED
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\ActuatorIntegrationTests.java:19: error: package io.spring.initializr.web does not exist
import io.spring.initializr.web.AbstractFullStackInitializrIntegrationTests;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\ActuatorIntegrationTests.java:35: error: cannot find symbol
extends AbstractFullStackInitializrIntegrationTests {
^
symbol: class AbstractFullStackInitializrIntegrationTests
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\info\BomRangesInfoContributorTests.java:24: error: package io.spring.initializr.test.metadata does not exist
import io.spring.initializr.test.metadata.InitializrMetadataTestBuilder;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\metric\ProjectGenerationMetricsListenerTests.java:28: error: package io.spring.initializr.test.metadata does not exist
import io.spring.initializr.test.metadata.InitializrMetadataTestBuilder;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\stat\AbstractInitializrStatTests.java:23: error: package io.spring.initializr.test.metadata does not exist
import io.spring.initializr.test.metadata.InitializrMetadataTestBuilder;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\stat\MainControllerStatsIntegrationTests.java:24: error: package io.spring.initializr.web does not exist
import io.spring.initializr.web.AbstractFullStackInitializrIntegrationTests;
^
D:\Duplicate1\initializr\initializr-actuator\src\test\java\io\spring\initializr\actuate\stat\MainControllerStatsIntegrationTests.java:56: error: cannot find symbol
extends AbstractFullStackInitializrIntegrationTests {
^
symbol: class AbstractFullStackInitializrIntegrationTests
7 errors
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':initializr-actuator:compileTestJava'.
Compilation failed; see the compiler error output for details.
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 5.0.
See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 4s
11 actionable tasks: 1 executed, 10 up-to-date
Instead of converting that you can generate fresh project from following url:
https://start.spring.io/
Select Gradle Project and download the code.

Kotlin via a Gradle build script isn't executing a WebDriver spek

Repo with a tight reproduction of my problem: https://github.com/paul-hammant/kotlin-webdriver-snafu
The spec, that could not be simpler:
class WebDriverSpeks : Spek({
ChromeDriverManager.getInstance().setup()
val co = ChromeOptions()
val chromeDriver = ChromeDriver(co) as WebDriver
beforeGroup {
chromeDriver.get("https://yahoo.com/")
}
describe("yahoo") {
it("should have index.html") {
assertEquals(chromeDriver.title, "hello")
}
}
afterGroup {
chromeDriver.close()
}
})
There's no red lines denoting compile failures in Intellij, yet when the gradle build runs it complains about a transitive dep:
$ gradle build
Download https://jcenter.bintray.com/org/slf4j/slf4j-api/1.7.24/slf4j- api-1.7.24.jar
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
/Users/paul/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk8/1.2.30/f916048adc012c9342b796a5f84c0ac6205abcac/kotlin-stdlib-jdk8-1.2.30.jar (version 1.2)
/Users/paul/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/1.2.30/ca12c47fc1e3a7316067b2a51e2f214745ebf8c5/kotlin-stdlib-jdk7-1.2.30.jar (version 1.2)
/Users/paul/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.0.6/3d499d3b7768f88c4796e5a1e357933e11a8936d/kotlin-reflect-1.0.6.jar (version 1.0)
/Users/paul/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.2.30/2dfac33f8b4e92c9dd1422cd286834701a6f6d6/kotlin-stdlib-1.2.30.jar (version 1.2)
w: Consider providing an explicit dependency on kotlin-reflect 1.2 to prevent strange errors
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath or use '-Xskip-runtime-version-check' to suppress this warning
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
class org.openqa.selenium.chrome.ChromeDriver, unresolved supertypes: org.openqa.selenium.remote.RemoteWebDriver
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileTestKotlin'.
> Compilation error. See log for more details
* 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
BUILD FAILED in 6s
5 actionable tasks: 5 executed
The allegedly unresolved supertype org.openqa.selenium.remote.RemoteWebDriver is in a selenium-remote-driver, and
If I delete ~/.gradle or ./build and try again it is the same.
If I inspect the pom.xml for selenium-java, I can see a dependency on selenium-remote-driver (which exists). See here - http://central.maven.org/maven2/org/seleniumhq/selenium/selenium-java/3.11.0/selenium-java-3.11.0.pom. The one in jcenter is the same.
I don't know why Gradle isn't finding selenium-remote-driver. I have an extra testCompile commented out in the Gradle script but nothing gets fixed if it is commented in.
I think this is a problem in Gradle, or some Gradleized treatment of Maven Central that I don't know much about but is online somewhere. I don't think it is a Kotlin problem. I've used Selenium since it started and am super familiar with it (I've made 100 Maven projects that use Selenium) so I don't think that is it. Of course, I could be wrong with where the root cause is.
Well, this did the trick:
rm -rf ~/.m2/repository/org/seleniumhq/
I didn't know Gradle used the local Maven repo cache. It must have been corrupt somehow.
Hopefully this helps someone another day.

Unable to understand a error from gradle build -Xlint:unchecked

I got this error while building hibernate using gradle
:hibernate-entitymanager:compileTestJava
/home/jsiddharth/workspace/hibernate-orm-master/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/criteria/paths/SingularAttributeJoinTest.java:128: error: <anonymous org.hibernate.jpa.test.criteria.paths.SingularAttributeJoinTest$2> is not abstract and does not override abstract method integrate(MetadataImplementor,SessionFactoryImplementor,SessionFactoryServiceRegistry) in Integrator
return new Integrator() {
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:hibernate-entitymanager:compileTestJava FAILED
FAILURE: Build failed with an exception.
I assumed that I need to run gradle with the -Xlint options, but turns out, I am doing it wrong. I got this error when I ran
./gradlew eclipse -Xlint:deprecation -Xlint:unchecked Maven settings.xml file did not exist : /home/jsiddharth/.m2/settings.xml
FAILURE: Build failed with an exception.
* What went wrong:
Problem configuring task :eclipse from command line. Unknown command-line option '-X'.
> Unknown command-line option '-X'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.185 secs
How do I run my build to ignore the errors ?
As to you question, the -Xlint is a Java compiler option and has nothing to do with Gradle. You can specify these options via GRADLE_OPTS which is how Gradle passes arguments to the JVM.
Specifically: GRADLE_OPTS="-Xlint:deprecation"
Anyway this is not your trouble. Have a look at the error:
SingularAttributeJoinTest$2> is not abstract and does not override abstract method integrate(MetadataImplementor,SessionFactoryImplementor,SessionFactoryServiceRegistry) in Integrator
return new Integrator() {
You have an anonymous class inside SingularAttributeJoinTest which is declared to implement Integrator but fails to implement method integrate and is not declared abstract. This kind of error can't be suppressed by a -Xlint option of course.

Problem in compiling in release mode --VC++

I am compiling my project in the release mode in VC++.
I have a .def file where i have declared the setLog and now i
am getting following error
Linking...
Creating library Release/HKL.lib and object Release/HKL.exp
HKL_libinterface.obj : error LNK2001: unresolved external symbol _SCTP_setLog#8
Please help me on the above to fix the problem.
Thanks
It sounds to me like you have a lib file configured in your debug build that is not in the release build. Your setLog() function does not seem to be the function the linker is complaining about - it sounds like it's not finding a function called SCTP_setLog().
Look in the list of libraries you have configured in your project's debug configuration and make sure they are also configured in the release configuration.
If this compiles in Debug mode the most possible reason is that somehow the code where this function is implemented is not included into build - for example, the cpp file where it is implemented has "Excluded from build" set.
As sharptooth mentioned, you most likely are not compiling the above function in your release build. In addition to looking for 'Excluded from build', check if you have any defines set (or not set) that would exclude the missing function from your release build.

Resources