Меню Рубрики

Gcc arm linux androideabi

Problems compiling object using arm-linux-androideabi-gcc

I am trying to compile the following class using the Android GCC compiler.

I do the with the following command.

So due to a lack of gcc knowledge (but some Google ability) I find this and try it.

Can someone help me with what I am doing wrong? Am I missing a link or something? Android.mk is not an option.

UPDATE this isn’t working either.

5 Answers 5

You must tell GCC where to find the Android system files and headers. Either use:

  1. ndk-build and an Android.mk with BUILD_EXECUTABLE
  2. or, the —sysroot GCC option

/Development/Android/android-ndk-r8c/platforms/android-9/arch-arm – Jackie Jan 13 ’13 at 22:54

So, since I don’t want to use Android.mk file, I went ahead and created a standalone toolchain. this is done using the following.

I would like to know what the «alternative» is in terms of the gcc linking I could do.

This answer adds a bit more details to @deltheil’s answer. I had similar issues as I was trying to compile I2C-tools for debugging I2C bus on Android. Somehow after struggling for more than a day with make files and trying different options including —sysroot & —dynamic-linker options etc., I finally tried to compile it within the Android AOSP tree. I used the Google Nexus-S AOSP to build a binary that I intended to run on Samsung S3 phone. I created a folder called i2c-tools for the sources inside the AOSP/external folder and copied Android.mk, Cleanspec.mk & MODULE_LICENCE from another executable folder (ping) and modified it for i2c-tools as follows:

from the AOSP base folder and voila, I had a working executable in out/target/product/generic/system/bin/ folder. Note that I had to copy all needed source and header files from the original (i2c-tools)/tools & include folders and had to modify some of the #include to remove the extra path for header files that were now in the same place as the c-source.

Источник

Bambuser ffmpeg — “arm-linux-androideabi-gcc is unable to create an executable file.”

I know this may be possible duplicate of some questions. but answers for those threads are not helping me.

I am trying to compile ffmpeg library for android using Bambuser’s ffmpeg.
I downloaded Archive for client versions 1.3.7 to 1.6.0. from bambuser.

I followed instruction given in REAME.
While running ./build.sh i came across following error

Here are last few lines of config.log of ffmpeg

in tmp i do not find any relative folder or file as per config.log says «ffconf.qflVj27Q.c».

I am doing this on
1. Ubuntu 11.10
2. OpenJDK 6
3. android-ndk-r5b

NOte:
I only have API-10 Installed in eclipse. (if it matters :D)

What could be the solution for this?

2 Answers 2

I finally found the problem with my setup when facing this same issue. Looking at the arm-build.sh script, I started following the script. Notice the «TOOLCHAIN=. » path.

Originally the path was: TOOLCHAIN= echo $NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/*-x86

When I went to verify this path exists, I noticed that it did not. I think the reason is that I have a 64-bit build.

My path is actually: . /toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64

What I ended up doing was copying the folder, and renaming it to «linux-x86» and now all is compiling.

Источник

arm-linux-androideabi-gcc is unable to create an executable — compile ffmpeg for android armeabi devices

I am trying to compile ffmpeg for android armeabi devices.
I am following tutorial by roman10.net
His given build script builds ffmpeg for armv7-a devices. I want to build it for armeabi.

My ultimate aim is to run ffmpeg commands on android armeabi and armv7-a devices.

So I change the script’s CPU part from

(I thought changing it to armv6 would build ffmpeg compatible with armeabi devices. m I wrong?)

Doubt 1:
Do I also have to change toolchain?
i.e from arm-linux-androideabi-4.4.3 to arm-eabi-4.4.0 .

Doubt 2:

When I try running ./build.sh (without changing toolchain) it gives me following error:

after that I got lot of warnings saying:
‘sub_id’ is deprecated and many other function deprecated warnings.

platform: ubuntu 11.10
ffmpeg version: 0.11.2
NDK : android-ndk-r5b

Here is my build script:

How do I tackle this problem? what is going wrong?

4 Answers 4

I’m not sure if this is what you are looking but I created a script in order to build FFmpeg 0.11.1 for Android. I modified the scripts provided with older Bambuser FFmpeg builds in order to get them working with 0.11.1. I’m currently using this script to build FFmpeg in my own application so I know the build works. The script located at http://servestream.sourceforge.net/build-ffmpeg.sh. I’m using android-ndk-r8b and Ubuntu 12.04 (x64) to do the building. In order to use the script do the following:

1.) Download the script
2.) Open the script and modify the PACKAGE variable to match application’s package
3.) Make it executable: chmod +x build-ffmpeg.sh
4.) Set the NDK variable used by the script, for example: export NDK=/home/user/android-ndk-r8b
5.) Run the script: ./build-ffmpeg.sh

The compiled binaries will be located in the newly created «final-builds» folder in the current working directory. (Note: the script builds binaries for armeabi, armeabi-v7a and x86 architectures)

Источник

linux-x86/bin/arm-linux-androideabi-gcc: Command not found #146

Comments

Copy link Quote reply

smaznet commented Jul 3, 2016

i have this error with ndk 11

and I am using ubuntu 16.04 x86

and linux-x86 for not availiable in prebuilt folder i also coppied and renamed linux-x86_x64
to linux-x86 but i got a new error

Copy link Quote reply

smaznet commented Jul 3, 2016

This is my error in android studio

Copy link Quote reply

DanAlbert commented Jul 6, 2016

and I am using ubuntu 16.04 x86

32-bit Linux is no longer supported. You’ll have the same issue with new versions of the SDK tools as well.

Copy link Quote reply

jk2K commented Sep 2, 2016

I am using Debian 8 x86_64,

I have this error with android-ndk-r12b

I have linux-x86_64 directory

Copy link Quote reply

bertrandmartel commented Oct 3, 2016

I had this issue in a docker container. file command was missing as you can see from the error file: not found .

In android-ndk-root/build/core/init.mk , the architecture is checked with file -L /bin/sh | grep ‘x86[_-]64’ so if file is missing it chooses the default x86

Copy link Quote reply

DanAlbert commented Oct 3, 2016

This comment was marked as off-topic.

Copy link Quote reply

LovableFatty commented Jul 23, 2020

i have this error with ndk 11

and I am using ubuntu 16.04 x86

and linux-x86 for not availiable in prebuilt folder i also coppied and renamed linux-x86_x64
to linux-x86 but i got a new error

Having the same issue with NDK r18b. did you ever fix it?

Copy link Quote reply

stephenhines commented Jul 23, 2020

The issue above is because you’re missing a / in front of the home in your commands. It’s looking for home/. instead of /home/. , which is why it can’t find the tools.

Copy link Quote reply

LovableFatty commented Jul 23, 2020

The issue above is because you’re missing a / in front of the home in your commands. It’s looking for home/. instead of /home/. , which is why it can’t find the tools.



tried /home/ & HOME/ & /HOME/

Copy link Quote reply

stephenhines commented Jul 23, 2020

The errors are actually showing you what is wrong. You need to make this $HOME/Downloads/. or /home/noah/Downloads/. . You keep adjusting it to something else that expands incorrectly.

Copy link Quote reply

LovableFatty commented Jul 23, 2020

The errors are actually showing you what is wrong. You need to make this $HOME/Downloads/. or /home/noah/Downloads/. . You keep adjusting it to something else that expands incorrectly.

Thanks for taking the time to explain it to me.

Any idea what I can do to fix these errors?

Copy link Quote reply

stephenhines commented Jul 23, 2020

I think that those are GCC-specific flags that don’t do anything with Clang. See #111 (comment) for where I’ve answered this before. Somewhere you must be passing these flags to Clang directly (either on purpose or by accident).

Copy link Quote reply

LovableFatty commented Jul 23, 2020

I think that those are GCC-specific flags that don’t do anything with Clang. See #111 (comment) for where I’ve answered this before. Somewhere you must be passing these flags to Clang directly (either on purpose or by accident).

I realized I wrote my make line wrong by having SUB_ARM=arm instead of SUB_ARCH=arm
My current error is the same as before.

Copy link Quote reply

stephenhines commented Jul 24, 2020

You’re working as root in the last message. You want to go back to your regular user account. It’s expanding $HOME to /root/ when you’re running as root, which isn’t where your tools live (back in the noah home dir).

Copy link Quote reply

LovableFatty commented Jul 24, 2020 •

You’re working as root in the last message. You want to go back to your regular user account. It’s expanding $HOME to /root/ when you’re running as root, which isn’t where your tools live (back in the noah home dir).


current problem. resolved the clang input issue by taking out a line according to #111. Tried a solution from where I change the kbuild and kbuild.h http://patchwork.ozlabs.org/project/uboot/patch/1406750096-7281-7-git-send-email-jeroen@myspectrum.nl/
but it resulted in error as well

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Mac os blade and soul
  • Mac os bird process
  • Mac os best apps
  • Mac os battery health
  • Mac os bash profile