I am using JAVA 11.0.11
I have installed ant on my Linux desktop.
Then to install optional dependencies i run following command which is on the documentation.
ant -f fetch.xml -Ddest=system
After running , I received following error.
-setup-temp-cache:
-fetch-netrexx:
[ftp] getting files
[ftp] 0 files retrieved
-fetch-netrexx-no-commons-net:
netrexx:
[checksum] Could not find file /root/.ant/tempcache/NetRexx.zip to generate checksum for.
BUILD FAILED
/usr/local/apache-ant/fetch.xml:368: Could not find file /root/.ant/tempcache/NetRexx.zip to generate checksum for.
Total time: 22 seconds
Related
I'm created plugin using this command
npx create-react-native-library react-native-randomness
I write code for ios is it in <root_dir>/ios and add pod dependencies there.
But when I build the project I got this error.
** BUILD FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'react-native-awesome-module' from project 'Pods')
(1 failure)
Any help would be appreciated.
I cloned a react-native project from github and below are the steps that I followed in order to make it work on my local ubuntu 20.04 machine:
(The project was expo managed earlier, but now it is ejected because there are android and ios folders)
created my local feature branch -> git checkout -b feature
installed all the packages in package.json -> yarn install
ran npx react-native run-android to run the app on android emulator
1st Encountered error:-
Could not write standard input to Gradle build daemon.
java.io.IOException: Stream closed
* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please read the following process output to find out more:
-----------------------
Unrecognized VM option 'MaxPermSize=512m'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
In order to solve this issue, I used this https://stackoverflow.com/a/69630720/11685381 answer and removed -XX:MaxPermSize=512m from my gradle.properties
2nd Encountered error:-
Again used npx react-native run-android and ran into another build error:-
* What went wrong:
Could not open settings generic class cache for settings file '/home/user/project/android/settings.gradle' (/home/user/.gradle/caches/6.9/scripts/5bii70nilhgbvb8zyo7v963b7).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61
To fix this, I used this solution: https://www.codegrepper.com/code-examples/whatever/BUG!+exception+in+phase+'semantic+analysis'+in+source+unit+'_BuildScript_'+Unsupported+class+file+major+version+61
3rd Encountered error:-
Again ran npx react-native run-android and ran into these 2 build error this time:
1: Task failed with an exception.
-----------
* Where:
Build file '/home/user/project/node_modules/expo-gl-cpp/android/build.gradle' line: 307
* What went wrong:
Default side-by-side NDK installation is not found.
Set $ANDROID_NDK_HOME environment variable correctly or setup ndk.dir in local.properties.
> NDK is not installed
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':expo'.
> compileSdkVersion is not specified. Please add it to build.gradle
To solve the 1st issue i.e. NDK is not installed (it is installed though), I created a local.properties inside project/android directory and pasted the following path:
sdk.dir=/home/user/Android/Sdk
ndk.dir=/home/user/Android/Sdk/ndk/24.0.8215888
4th Encountered error:-
> Task :app:generatePackageList FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
* Where:
Script '/home/user/project/node_modules/#react-native-community/cli-platform-android/native_modules.gradle' line: 131
* What went wrong:
Execution failed for task ':app:generatePackageList'.
> argument type mismatch
To solve this, I tried this solution: https://stackoverflow.com/a/68180959/11685381 but this again downloaded the gradle 6.9 which I had earlier also, and again to the 2nd Encountered error
I've been doing this since 2 days, can someone please help me out here what am I doing wrong?
Try updating build.grade from
classpath("com.android.tools.build:gradle:3.5.3")
To
classpath("com.android.tools.build:gradle:3.5.4")
It's just an example. try to update Gradle.
I'm trying to build JPostal as described in this link using the following command:
./gradlew assemble
However, the command produces the following output claiming the file C:\x\Program Files\Msys64\usr\share does not exist when it clearly does:
$ ./gradlew assemble
:buildJniLibaclocal-1.16: error: aclocal: file '/x/Program Files/Msys64/usr/share/aclocal/tcl-tea.m4' does not exist
autoreconf-2.71: error: aclocal failed with exit status: 1
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: Files/JPostal/src/main/jniLibs
configure: error: cannot find required auxiliary files: compile config.guess config.sub ltmain.sh missing install-sh
make: *** No rule to make target 'install'. Stop.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildJniLib'.
> Process 'command 'sh'' finished with non-zero exit value 2
* 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: 5.844 secs
I can clearly see a file named tcl-tea.m4 in the directory: C:\x\Program Files\Msys64\usr\share\aclocal
See the screenshot below:
If the file clearly exists, why am I getting this error? Why is the file being discriminated against?
Despite these are supported, but paths with spaces generally tend to be problematic on Linux.
Even without the build.gradle, the path is obviously wrong; this likely needs to be escaped:
"C:\\x\\Program\ Files\\Msys64\\usr\\share\\aclocal"
Where \\ gives \ and \ gives .
To use ${File.separator} would be the alternate cross-platform approach.
This would give \ on Windows and / on Linux.
I have previously been deploying a java application successfully in Cloud Foundry. However, now the developers have added a shared library compiled from C. I have added the .so to the .zip file (I'm using universal packager and deploying to Cloud Foundry by zip file) and ensured the .so is executable. However, when I deploy I get an error:
2016-12-23T14:39:01.013+00:00 [STG/0] [OUT] -----> Java Buildpack Version: eba4df6 | git://github.com/cloudfoundry/java-buildpack.git#eba4df6
2016-12-23T14:39:01.017+00:00 [STG/0] [ERR] [Buildpack] ERROR Compile failed with exception #<RuntimeError: No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
2016-12-23T14:39:01.017+00:00 [STG/0] [ERR] No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
2016-12-23T14:39:01.022+00:00 [STG/0] [ERR] Failed to compile droplet
2016-12-23T14:39:01.024+00:00 [STG/0] [OUT] Exit status 223
So my understanding is that I need to created a Custom Buildpack from the Java Buildpack. However, I am getting stuck with the code at this point:
https://github.com/ONSdigital/java-buildpack/blob/master/bin/compile#L28
# Adding crf tagger library
status "Adding crf tagger support"
cp $bp_dir/parsers/src/main/resources/libbackend.so $build_dir/vendor/
# update the PATH
status "Building runtime environment"
mkdir -p $build_dir/.profile.d
echo "export PATH=\"$HOME/bin:\$HOME/vendor/:\$PATH\";" > $build_dir/.profile.d/crftagger.sh
echo "export LD_LIBRARY_PATH=\"\$HOME/vendor/\";" >> $build_dir/.profile.d/crftagger.sh
From what I can gather I only need to modify the compile stage. What do I need to do to copy over the .so and have the Buildpack run successfully.
Please take a look to this https://docs.cloudfoundry.org/devguide/deploy-apps/deploy-app.html#profile
Pre-Runtime Hooks that's you need. I can't give you more details because you haven't provided enough information (project structure, do you have .profile in you root and etc.).
If you need to add shared libs try to use attr_reader :additional_libraries https://github.com/cloudfoundry/java-buildpack/blob/master/docs/extending-droplet.md
I am trying to create an executable file from my project but unfortunately I have this failure:
Buildfile: C:\02_DEV\R_5_2_3\DiagraDB\build.xml
compile:
[javac] Compiling 1 source file to C:\02_DEV\R_5_2_3\DiagraDB\bin
dist:
[jar] Building jar: C:\DiagraDB_build\lib\DiagraDB.jar
[copy] Copying 1 file to C:\DiagraDB_build\mysql
[launch4j] Compiling resources
[launch4j] Linking
[launch4j] C:\02_DEV\R_5_2_3\DiagraDB\launch4j\bin\ld.exe: C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\crt2.o: No such file: No such file or directory
BUILD FAILED
C:\02_DEV\R_5_2_3\DiagraDB\build.xml:125: net.sf.launch4j.BuilderException: net.sf.launch4j.ExecException: Exec failed (1): C:\02_DEV\R_5_2_3\DiagraDB\launch4j\bin\ld.exe -mi386pe --oformat pei-i386 --subsystem windows -s C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\crt2.o C:\02_DEV\R_5_2_3\DiagraDB\launch4j\head\guihead.o C:\02_DEV\R_5_2_3\DiagraDB\launch4j\head\head.o C:\Users\MET4ABT\AppData\Local\Temp\launch4j5622103051739315213o C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libmingw32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libgcc.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libmsvcrt.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libkernel32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libuser32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libadvapi32.a C:\02_DEV\R_5_2_3\DiagraDB\launch4j\w32api\libshell32.a -o C:\DiagraDB_build\DiagraDB.exe
Total time: 6 seconds
I have read some kind of stuff such as Launch4j / windres: how to set paths correctly? but I couldn't make it work for mine.
(I have the JDK Version 7 and windows 7.) I appreciate your suggestions about a solution for this problem. Thanks in advance.