ffmpeg: Build failed in windows with cygwin for Android - C++ or Other Android Development Languages

0
down vote
favorite
I have trying building ffmpeg for android using windows 7 and Cygwin. I have android-ndk-r9d.
I have download the source code from here
I have already set NDK environment variable. And updated TOOLCHAIN line to: TOOLCHAIN=echo $NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64 because linux folder not present.
After running ./build.sh command. I got following error:
arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Help me to find out what I did wrong?

Related

[Q] Ant build error while compiling uiautomator script

Hi, I am trying to compile uiautomator script using "ant build" command, and it fails with the following output. Would someone know what is wrong?
I tried to follow the guide in from the android.com website.
I'm not sure where to post the script though, I posted it into subfolder "src" and named it "case" without any extension.
Thanks
Code:
Buildfile: C:\!Android SDK\Workspace\AdminOn\build.xml
-check-env:
[checkenv] Android SDK Tools Revision 22.0.5
[checkenv] Installed at C:\!Android SDK\sdk
-build-setup:
[getbuildtools] Using latest Build Tools: 18.0.1
[echo] Resolving Build Target for AdminOn...
[getuitarget] Project Target: Android 4.3
[getuitarget] API level: 18
[echo] ----------
[echo] Creating output directories if needed...
-pre-compile:
compile:
-post-compile:
-dex:
[dex] input: C:\!Android SDK\Workspace\AdminOn\bin\classes
[dex] Converting compiled files and external libraries into C:\!Android SD
K\Workspace\AdminOn\bin\classes.dex...
[dx] no classfiles specified
BUILD FAILED
C:\!Android SDK\sdk\tools\ant\uibuild.xml:198: null returned: 1
Total time: 4 seconds

[Q] Seeking compiled LatinIME dicttool for use with a V401 Binary Dictionary

I’m trying to convert a version 401 binary dictionary -- a directory called PersonalizationDictionary.en_US.dict -- to human readable .xml.
The command line utility dicttool_aosp in packages/inputmethods/LatinIME/tools/dicttool can do it like so:
Code:
dicttool_aosp makedict -s sourcedict.dict -x output.xml
I’m unable to compile the Android Lollipop version of dicttool, since dicttool has native C++ dependencies that don’t play nice with my Mac. Note this line in the NativeLib.mk file of dictool:
Code:
# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
I am hoping someone with a compatible setup can compile this utility for me using “make dicttool_aosp” from the root of the AOSP source tree. I've spent the past few days looking for compiled versions of it, and while I’ve found many makedict.jar files online, they are too old to support my newer V401 binary dictionary. The main difference between the V401 and older versions is that a V401 is split up into multiple files with extensions like .bigrams, .freq, .header, whereas the older dicts are contained in a single file.
Thank you, please let me know if I can clarify anything!

[HELP] Compiling Android from source (sm-g360f)

Hi there,
I have Samsung Galaxy Core Prime LTE and I could not find any custom ROMs so I decided that I will try to compile it myself. I downloaded the LineageOS source code from git (cm 14.1), the device trees and kernel from here: github/MSM8916-Samsung, and the samsung vendor files from the extraxt-files.sh script. The qcom-common files from here: github/CyanogenMod/android_device_samsung_qcom-common. Then I set up the environment (source build/envsetup.sh), ran breakfast and everything went fine. And then came brunch... It's running for about 40-50 minutes, and then stopes because "ninja: build stopped: subcommand failed". Here's the output from my terminal: https:/ /drive.google.com/fi le/d/0Bzbi _UspTWqac3ZkV2RhRjJGeW8/view?usp=drivesdk (remove spaces - sorry for that, but I cannot add links yet)
If the ninja log is needed I will post it.
Can someone help me to understand the code and find out why it is failing?
(I am new to developing stuff, but I have already compiled programs back in the days, and I am familiar with Linux, which is my daily driver)
what version of linux are you using at the moment?
Ubuntu 17.04, but I have also tried it on 16.10 last week, and openjdk-8
wasowski02 said:
Ubuntu 17.04, but I have also tried it on 16.10 last week, and openjdk-8
Click to expand...
Click to collapse
I can't speak for others but I have not had success building anything android on 15.10,16.04,16.10... I always end up on a wild goose chase with all the compiling errors. I have consistently compiled without errors using 14.04 with oracle java 8 as that is what many of the manufacturers are using to make their own builds. If or oracle spits errors with 14.04 i try to use the rule of thumb and thats openjdk-6 and jre for LP, openjdk-7 and jre for MM and openjdk-8 for nougat builds but im only working on MM builds at the moment so your results may vary. Hope this helps a bit, just remember you can use sudo update-alternatives --display java to switch versions on the fly if needed and make sure you incorporate Google prebuilts as well. good luck ?
Sent from my LGLS676 using Tapatalk
Sands207 said:
I can't speak for others but I have not had success building anything android on 15.10,16.04,16.10... I always end up on a wild goose chase with all the compiling errors. I have consistently compiled without errors using 14.04 with oracle java 8 as that is what many of the manufacturers are using to make their own builds. If or oracle spits errors with 14.04 i try to use the rule of thumb and thats openjdk-6 and jre for LP, openjdk-7 and jre for MM and openjdk-8 for nougat builds but im only working on MM builds at the moment so your results may vary. Hope this helps a bit, just remember you can use sudo update-alternatives --display java to switch versions on the fly if needed and make sure you incorporate Google prebuilts as well. good luck ?
Click to expand...
Click to collapse
Then I will try 14.04 and see what happens. Thanks for help
@Sands207 Is there by any chance a site where you can learn to do this? Tutorial for noobs of sort.
Sent from my SM-N920P using Tapatalk
ninja_unmatched said:
@Sands207 Is there by any chance a site where you can learn to do this? Tutorial for noobs of sort.
Click to expand...
Click to collapse
Yes, luckily for us xda members we have our own Android college built right into xda https://forum.xda-developers.com/general/xda-university its a great starting point and rom compiling guide is also there. Its all aimed to help new folks find their way ? jump right in ?
If you need TWRP for it I have it. It was built by blaz3r64, but since AA51 is down I can upload it for you. I can confirm that it works on both the ST Galaxy Core Prime and the Boost Prevail LTE.
Sent from my XT1609 using Tapatalk
RealWelder said:
If you need TWRP for it I have it. It was built by blaz3r64, but since AA51 is down I can upload it for you. I can confirm that it works on both the ST Galaxy Core Prime and the Boost Prevail LTE.
Click to expand...
Click to collapse
So I have already downloaded the official TWRP, but thanks for your interest.
I have tried to compile using ubuntu 14.04 (with openjdk-8) as @Sands207, but I get this error:
Code:
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/bison/bison -d --defines=/home/karol/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.h -o /home/karol/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.cpp system/tools/aidl/aidl_language_y.yy"
/bin/bash: prebuilts/misc/linux-x86/bison/bison: No such file or directory
wasowski02 said:
So I have already downloaded the official TWRP, but thanks for your interest.
I have tried to compile using ubuntu 14.04 (with openjdk-8) as @Sands207, but I get this error:
Code:
FAILED: /bin/bash -c "prebuilts/misc/linux-x86/bison/bison -d --defines=/home/karol/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.h -o /home/karol/android/system/out/host/linux-x86/obj/STATIC_LIBRARIES/libaidl-common_intermediates/aidl_language_y.cpp system/tools/aidl/aidl_language_y.yy"
/bin/bash: prebuilts/misc/linux-x86/bison/bison: No such file or directory
Click to expand...
Click to collapse
I recommend trying this keychain as it has full support for what you are attempting https://forum.xda-developers.com/showthread.php?t=3606941 I have tried it myself but Id recommend cleaning your build folder before incorporating them, maybe even a reboot as well. i had forgotten about this but it has far more tools than the normal keychain.
Sent from my LGLS676 using Tapatalk
---------- Post added at 04:29 PM ---------- Previous post was at 04:22 PM ----------
remember to select the right architecture ??
Sent from my LGLS676 using Tapatalk
Sands207 said:
I recommend trying this keychain as it has full support for what you are attempting https://forum.xda-developers.com/showthread.php?t=3606941 I have tried it myself but Id recommend cleaning your build folder before incorporating them, maybe even a reboot as well. i had forgotten about this but it has far more tools than the normal keychain.
Sent from my LGLS676 using Tapatalk
---------- Post added at 04:29 PM ---------- Previous post was at 04:22 PM ----------
remember to select the right architecture ?
Click to expand...
Click to collapse
So I downloaded the new toolchain/keychain/cross compiler (just to make sure - this is the same, yes?), but I cannot find how to choose it to compile android. The official post says:
Code:
# for arm64
export CROSS_COMPILE=$(pwd)/bin/aarch64-linux-gnu-
but as I'm not compiling the kernel I assume it is not what I need (I think) and
Code:
echo $CROSS_COMPILE
does not return anything by default. If I should have used the export function then which file should I choose, because there are many (-strip, -strings, -size, -run, etc.).
There is a directory called toolchain (it contains only binutils) in the folder containing the source code. Should I add a folder called gcc and put the files there? Or maybe I have to run brunch with some options or change an entry in a configuration/make file?
I use the aarch64 version, but not the newest (20170515 not 20170520).
wasowski02 said:
So I downloaded the new toolchain/keychain/cross compiler (just to make sure - this is the same, yes?), but I cannot find how to choose it to compile android. The official post says:
but as I'm not compiling the kernel I assume it is not what I need (I think) and
does not return anything by default. If I should have used the export function then which file should I choose, because there are many (-strip, -strings, -size, -run, etc.).
There is a directory called toolchain (it contains only binutils) in the folder containing the source code. Should I add a folder called gcc and put the files there? Or maybe I have to run brunch with some options or change an entry in a configuration/make file?
I use the aarch64 version, but not the newest (20170515 not 20170520).
Click to expand...
Click to collapse
I do think as you said you will need to run brunch but resetting up your build & source environment to use the new keychain as you attempted to switch from one keychain to the other as well may help if this doesn't work as well take a look at your build configuration. rc file and make sure you don't have double entries or the new keychain missing i usually import the prebuilts i need as I am using arm architecture at the moment but i either download the individual keychain i need and place it in my source folder when i setup my build environment to be added to the build along with my sources before i run lunch because my source folder is untouched by me besides that at that point. I'll be home in an hour or so I'm going to see if i can track down some info to help you get untangled but i do recommend downloading the folder and making a gcc folder with the toolchain folder for arm64 as you said and and adding it to your build ensuring it is clean besides what you need and adding it then attempt to compile again.
I'm​ not sure if I should use aarch64. I have an armv7-a-neon (so 64-bit) and the internet says that aarch64 and arm64 is pretty much the same, but maybe I am wrong and I should use arm instead. But I think that does not matter until I put the new toolchain both to the aarch64 and arm directory (I guess the compilation process will choose the right one automatically). So I've put the compilers into prebuilts/gcc/linux-x86/... folders, but should I delete the old compilers? And then run the environment setup again (all this stuff starts to make sense to me ?)
Sent from my SM-G360F using Tapatalk
wasowski02 said:
I'm​ not sure if I should use aarch64. I have an armv7-a-neon (so 64-bit) and the internet says that aarch64 and arm64 is pretty much the same, but maybe I am wrong and I should use arm instead. But I think that does not matter until I put the new toolchain both to the aarch64 and arm directory (I guess the compilation process will choose the right one automatically). So I've put the compilers into prebuilts/gcc/linux-x86/... folders, but should I delete the old compilers? And then run the environment setup again (all this stuff starts to make sense to me )
Sent from my SM-G360F using Tapatalk
Click to expand...
Click to collapse
Yes you should delete the old ones and set up your enviroment again and it should include them. Also yes the compile proccess should pick the correct one in your case as long as you include them and you have, you are heading in the right direction for sure. :good:
Sands207 said:
Yes you should delete the old ones and set up your enviroment again and it should include them. Also yes the compile proccess should pick the correct one in your case as long as you include them and you have, you are heading in the right direction for sure. :good:
Click to expand...
Click to collapse
So I deleted the old ones and I get this error:
Code:
ninja: error: 'prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-strip', needed by '/home/karol/android/system/out/target/product/coreprimeltexx/obj/lib/libdl.so', missing and no known rule to make it
I guess it's because somewhere in a configuration file there is an entry for the old compiler. I have deleted the out directory and played with the envsetup.sh file (about line 210 there is something about compilers),
Code:
# defined in core/config.mk
targetgccversion=
targetgccversion2=
export TARGET_GCC_VERSION=$targetgccversion
# The gcc toolchain does not exists for windows/cygwin. In this case, do not reference it.
export ANDROID_TOOLCHAIN=
export ANDROID_TOOLCHAIN_2ND_ARCH=
local ARCH=$(get_build_var TARGET_ARCH)
case $ARCH in
x86) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
x86_64) toolchaindir=x86/x86_64-linux-android-$targetgccversion/bin
;;
arm) toolchaindir=arm/arm-linux-androideabi-$targetgccversion/bin
;;
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
;;
mips|mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
;;
esac
but this did not work either. The ninja files don't contain any gcc configuration. So where can I find the right configuration file? (I can't find the suggested configuration.rc file)
wasowski02 said:
So I deleted the old ones and I get this error:
I guess it's because somewhere in a configuration file there is an entry for the old compiler. I have deleted the out directory and played with the envsetup.sh file (about line 210 there is something about compilers),
but this did not work either. The ninja files don't contain any gcc configuration. So where can I find the right configuration file?
Click to expand...
Click to collapse
I usually compile using clang or maven as I only build AOSP atm https://ninja-build.org/manual.html this page includes directions that should assist you. Do you have maven or clang installed on your linux box?
Sands207 said:
I usually compile using clang or maven as I only build AOSP atm https://ninja-build.org/manual.html this page includes directions that should assist you. Do you have maven or clang installed on your linux box?
Click to expand...
Click to collapse
So it seems that nor klang nor maven is installed on my machine (but as my computer claims ninja is not installed either I guess that they may be installed somewhere in the build directories). Should I try them instead of ninja?
wasowski02 said:
So it seems that nor klang nor maven is installed on my machine (but as my computer claims ninja is not installed either I guess that they may be installed somewhere in the build directories). Should I try them instead of ninja?
Click to expand...
Click to collapse
yes absolutely
Sands207 said:
yes absolutely
Click to expand...
Click to collapse
So what I understand is:
(1) Install maven or clang (let's say clang because I found it in the official ubuntu repository)
(2) Configure brunch to use clang instead of ninja
So I checked the internet if there are any options I can use with brunch to run clang, but I didn't find any. Also looked through the envsetup.sh file, but there is nothing there, or I missed it.
wasowski02 said:
So what I understand is:
(1) Install maven or clang (let's say clang because I found it in the official ubuntu repository)
(2) Configure brunch to use clang instead of ninja
So I checked the internet if there are any options I can use with brunch to run clang, but I didn't find any. Also looked through the envsetup.sh file, but there is nothing there, or I missed it.
Click to expand...
Click to collapse
tonight i will try doing some digging to see if i can help you. im away from my computer right now but ill do what i can. i would try would maven. clang assists with aosp primarily but maven should work for you as far as using a custom command to run maven, log out or reboot after you install it and run brunch as you normally would also please read this https://clang.llvm.org/comparison.html

[APKMULTITOOL] Error when signing (sign apk with android market 13 & 7 zip, sign, in)

[APKMULTITOOL] Error when signing (sign apk with android market 13 & 7 zip, sign, in)
Hello folks, I have stumbled upon a small problem using APKMultiTool ...
When I try to sign my apk (It's a unity apk meaning I only edited 1 of the dll files.) It fails.
The error it gives me, even in log (26) is useless.
Code:
--------------------------------------------------------------------------
|26-07-2018 -- 13:55:05,73|
--------------------------------------------------------------------------
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
Press any key to continue . . .
I do have the environment path for system, directed to my JDK java path.
The APKMultiTool is opened with Administrator and it's at root(c:\APKMultiTool) <
Heres the code it gives me at the end of option 7: (zip, sign & install)
Code:
Compressing res\layout\com_facebook_placepickerfragment_list_row.xml
Compressing res\layout\com_facebook_search_bar_layout.xml
Compressing res\layout\com_facebook_tooltip_bubble.xml
Compressing res\layout\com_facebook_usersettingsfragment.xml
Everything is Ok
Signing Apk
Usage: signapk [-w] publickey.x509[.pem] privatekey.pk8 input.jar output.jar
"An Error Occurred, Please Check The Log (option 26)"
The error afterwards in the log file and when using 26, is still the same.
Now I'm going to just try to sign the unsigned apk. First the one that was just zipped.
I do this with option 13: Sign apk with android market
Code:
Please make your decision:13
*Notice this option requires you to have the Java JDK installed before this option will function*
*Notice you need to go into your Environment Variables and set the path to your JAVA_HOME*
*For example define it as C:\Program Files\Java\jdk1.6.0_43 as a system variables slot not the User Variables*
Press any key to continue . . .
Signing Apk
Only one alias can be specified
Please type jarsigner -help for usage
"An Error Occurred, Please Check The Log (option 26)"
I am unable to type jarsigner -help, in CMD it does not exist as a command, and in APKMT it closes the prompt. The log file and 26 gives me the same error text so far, meaning it was not even updated.
(Note: I open ALL prompts as Administator, also APKMT)
I am at a complete loss...
Would be really grateful for input :3 thanks a lot.
-EDIT-
Am unable to install unsigned apk on rooted bluestacks 3n device. :3
... I found out that if I used the new tool
https://forum.xda-developers.com/an...tool-apk-easy-tool-v1-02-windows-gui-t3333960
APK Easy Tool, everything became more organized and much easier to work with. I got it working and are happy to say that my first mod was succesful, yay.
Happy modding everyone
For reference, the apk I modded was Galactic Rush for Android

adb.exe v1.0.40

Ubuntu 20.04 sees phone with Linux adb v28 using 'adb devices'.
I've installed the usb driver for my Blackview A80 phone in VirtualBox Windows 10 VM. However, VirtualBox Windows 10 VM fails to see my phone with adb (v1.0.32 & 1.0.39). I'd like to download adb.exe v1.0.40 (as that's the requirement to run B4A Windows app under Wine in Ubuntu.). But I can't find that version anywhere. Has anyone got adb.exe v1.0.40?
I've followed the instructions on
http://adbcommand.com/articles/How to build adb(1.0.40) for windows on Ubuntu but I get 'fatal: cannot make .repo directory: Permission denied' on the step
repo init -u https://android.googlesource.com/platform/manifest. I know nothing about repo. Anybody have any ideas about this repo problem?
johnaaronrose1 said:
Ubuntu 20.04 sees phone with Linux adb v28 using 'adb devices'.
I've installed the usb driver for my Blackview A80 phone in VirtualBox Windows 10 VM. However, VirtualBox Windows 10 VM fails to see my phone with adb (v1.0.32 & 1.0.39). I'd like to download adb.exe v1.0.40 (as that's the requirement to run B4A Windows app under Wine in Ubuntu.). But I can't find that version anywhere. Has anyone got adb.exe v1.0.40?
I've followed the instructions on
http://adbcommand.com/articles/How to build adb(1.0.40) for windows on Ubuntu but I get 'fatal: cannot make .repo directory: Permission denied' on the step
repo init -u https://android.googlesource.com/platform/manifest. I know nothing about repo. Anybody have any ideas about this repo problem?
Click to expand...
Click to collapse
have you tried using chocolatey on the windows VM, to see if their adb source works for you?
you would need chocolately preinstalled, this thread would explain better.
How To Use Chocolatey
========================= ============================================ HOW TO USE CHOCOLATEY ============== ============= Hi Friends~! This amazing package manager changed my Windoz life
forum.xda-developers.com
after you have chocolatey installed, you would run this command:
choco install adb
essentially, it will dl the latest adb, and wrap all it's variables with the correct permissions, even in a vm. I'm not sure if this will help you, but just wanted to put it out there~!
Have a good day~!
jenneh said:
have you tried using chocolatey on the windows VM, to see if their adb source works for you?
you would need chocolately preinstalled, this thread would explain better.
How To Use Chocolatey
========================= ============================================ HOW TO USE CHOCOLATEY ============== ============= Hi Friends~! This amazing package manager changed my Windoz life
forum.xda-developers.com
after you have chocolatey installed, you would run this command:
choco install adb
essentially, it will dl the latest adb, and wrap all it's variables with the correct permissions, even in a vm. I'm not sure if this will help you, but just wanted to put it out there~!
Have a good day~!
Click to expand...
Click to collapse
The specified link does not AFAIK give instructions on how to install chocolately.
Oh It Does~! As well As a VM demonstration on how to install on an unlisted YT vid. But Okay~! Just trying to help ;-)
The link you supplied with its links to "How to install chocolately" sends me to an advertising site.
johnaaronrose1 said:
Ubuntu 20.04 sees phone with Linux adb v28 using 'adb devices'.
I've installed the usb driver for my Blackview A80 phone in VirtualBox Windows 10 VM. However, VirtualBox Windows 10 VM fails to see my phone with adb (v1.0.32 & 1.0.39). I'd like to download adb.exe v1.0.40 (as that's the requirement to run B4A Windows app under Wine in Ubuntu.). But I can't find that version anywhere. Has anyone got adb.exe v1.0.40?
I've followed the instructions on
http://adbcommand.com/articles/How to build adb(1.0.40) for windows on Ubuntu but I get 'fatal: cannot make .repo directory: Permission denied' on the step
repo init -u https://android.googlesource.com/platform/manifest. I know nothing about repo. Anybody have any ideas about this repo problem?
Click to expand...
Click to collapse
Would this help?
Android SDK Platform Tools for Windows
Android Debug Bridge version 1.0.26 platform-tools_r03-windows.zip (2011-02-23) platform-tools_r04-windows.zip (2011-05-10) platform-to...
cxzstuff.blogspot.com

Categories

Resources