I'm trying to get some custom code compiled for android, but when I try to make the file, it requires a function called errx in libc -> err.h.
When I use the one I have on my system and try to recompile libc.so, I get the following compilation error:
Code:
In file included from bionic/libc/unistd/getopt_long.c:59:
bionic/libc/include/err.h:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
In file included from bionic/libc/unistd/getopt_long.c:60:
bionic/libc/include/errno.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'
If I try to delete the contents or err.h, I get no errors.
Note that I'm not modifying errno.h in any way.
Is there a workaround for this?
I'd really like a workaround to this.
Related
Hi. I need your help.
Because I need to modify the cost of each instruction, I'm doing a compilation with linaro gcc source code.
Until now I use gcc-linaro-4.7-2013.04 which is in the linaro-toolchain-binaries 4.7 package(linaro hompage-Download-
Binaries-linaro-toolchain-binaries 4.7), and I didn't change anything yet.
I compiled with configure below.
Code:
./configure --prefix=/home/kynic0/workspace/linaro-gcc-built --target=arm-none-eabi
There is an error like this.
Code:
configure:3602: error: in `/home/kynic0/workspace/gcc-linaro-4.7-2013.04/arm-none-eabi/libgcc':
configure:3605: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
It is the contents in config.log file.
I tried re-downloading the source file, compiling several times, cleaning prefixed directory, but I really don't know what is problem.
Some people said that GDB is problem, but I can't catch the right way to solve it.
Please help this n00b.
I attached the log file.
Hello,
I would like to develop on CUDA on my shield tablet.
For the moment I can develop native application but when I try cuda tutorial with cuda_runtime.h file the project send me errors.
Code:
Description Resource Path Location Type
fatal error: cuda_runtime.h: No such file or directory SimpleCuda.cpp /SimpleCuda/jni line 4 C/C++ Problem
[/CODE
And I don't have any cuda_runtime.h file on my computer or on my tabley.
Where can I found this file to fix my error?
Best regard.
So I just started developing a recovery for a phone that has no support from any other developers, and basically I need to do all the stuff from 0. I follow some guides, I read some forums on the internet and hope I can make it (it's my first time developing something for Android). But for now I have this problem and I can't find it anywhere along with the proper solution (maybe I haven't searched enough). Every time I type make recoveryimage in the terminal, it is working for like 30 seconds, and then a error like this appears:
Code:
target SharedLib: libc (/home/cosinus/Workspace/X3_Soul-CM12.1/out/target/product/X3_Soul/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so)
[COLOR="Red"]/home/cosinus/Workspace/X3_Soul-CM12.1/out/target/product/X3_Soul/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a([COLOR="DarkRed"][B]gethnamaddr.o[/B][/COLOR]): error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make: *** [/home/cosinus/Workspace/X3_Soul-CM12.1/out/target/product/X3_Soul/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so] Error 1
#### make failed to build some targets (01:02 (mm:ss)) ####[/COLOR]
(In my noobness) I tried to delete all the files that generates the error, in this case, gethnamaddr.o, but there are too much files, and I don't even know why I need to delete every single file that ends with *.o extension and if it's a good solution. I saw that everytime I delete a file that returns an error, the file is generated again, but after it's generated, it won't return any error. So I tought that maybe the *.o files are corrupt, and "make" generates them correctly.
Now that I told you the story, I'm asking:
Is it normal that I have so many errors because of *.o files?
How can I solve it?
The phone: Allview X3 Soul (I heard it's a clone of Gionee S6)
Chipset: MT6753
Android version: 5.1
I am cross compiling C, C++ code that uses small static libraries to build a single larger shared library.
When it tries to build the shared library I get errors:
bin/ld: error: no archive symbol table (run ranlib)
I dig down to the build directory and the 'link.txt' file has
"gcc-ar ....."
I am using the android.toolchain.cmake file for the CMAKE_TOOLCHAIN_FILE.
When I change the 'link.txt file to have:
arm-...-ar library
arm...-ranlib library.a
the shared library link works.
Any suggestions on how to get cmake to generate the right link.txt file?
Has anyone successfully built Android on Arch?
Seemingly no matter what repo I try to build from, it's never successful.
Here's the output trying to build Evo:
Code:
╭─░▒▓ /scratch/Evolution-X ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ✔ at 13:12:16 ▓▒░─╮
╰─ lunch evolution_cheetah-userdebug ─╯
In file included from build/make/core/config.mk:352:
In file included from build/make/core/envsetup.mk:352:
In file included from device/google/pantah/evolution_cheetah.mk:33:
device/google/gs201/evolution_common.mk:44: error: hardware/google/pixel/touch/device.mk: No such file or directory
13:12:19 dumpvars failed with: exit status 1
Device cheetah not found. Attempting to retrieve device repository from Evolution-X-Devices Github (http://github.com/Evolution-X-Devices).
Found repository: device_google_cheetah
Checking branch info
Calculated revision: tiramisu
already exists: device/google/cheetah
Syncing repository to retrieve project.
Fetching: 100% (1/1), done in 0.271s
repo sync has finished successfully.
Repository synced!
Looking for dependencies
Dependency already present in manifest: device_google_pantah => device/google/pantah
Done
In file included from build/make/core/config.mk:352:
In file included from build/make/core/envsetup.mk:352:
In file included from device/google/pantah/evolution_cheetah.mk:33:
device/google/gs201/evolution_common.mk:44: error: hardware/google/pixel/touch/device.mk: No such file or directory
13:12:21 dumpvars failed with: exit status 1
including vendor/evolution/vendorsetup.sh
In file included from build/make/core/config.mk:352:
In file included from build/make/core/envsetup.mk:352:
In file included from device/google/pantah/evolution_cheetah.mk:33:
device/google/gs201/evolution_common.mk:44: error: hardware/google/pixel/touch/device.mk: No such file or directory
13:12:21 dumpvars failed with: exit status 1
Am I supposed to check out the sources from Google or Lineage and merge them into Evo?
Trying to build AOSP from Google results in a bunch of timeouts and the odd 404.
Lineage wants to pull the blobs from a running phone on Lineage or pull them from a build.zip but that doens't work either.
Python 2 is depreciated for years, but somehow Android still "needs" it? Why?!?!?!
There is no target for python2 in the repos anymore, but I have the last build installed anyway - still no love.
Suggestions?
kodabmx said:
Has anyone successfully built Android on Arch?
Seemingly no matter what repo I try to build from, it's never successful.
Here's the output trying to build Evo:
Code:
╭─░▒▓ /scratch/Evolution-X ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ✔ at 13:12:16 ▓▒░─╮
╰─ lunch evolution_cheetah-userdebug ─╯
In file included from build/make/core/config.mk:352:
In file included from build/make/core/envsetup.mk:352:
In file included from device/google/pantah/evolution_cheetah.mk:33:
device/google/gs201/evolution_common.mk:44: error: hardware/google/pixel/touch/device.mk: No such file or directory
13:12:19 dumpvars failed with: exit status 1
Device cheetah not found. Attempting to retrieve device repository from Evolution-X-Devices Github (http://github.com/Evolution-X-Devices).
Found repository: device_google_cheetah
Checking branch info
Calculated revision: tiramisu
already exists: device/google/cheetah
Syncing repository to retrieve project.
Fetching: 100% (1/1), done in 0.271s
repo sync has finished successfully.
Repository synced!
Looking for dependencies
Dependency already present in manifest: device_google_pantah => device/google/pantah
Done
In file included from build/make/core/config.mk:352:
In file included from build/make/core/envsetup.mk:352:
In file included from device/google/pantah/evolution_cheetah.mk:33:
device/google/gs201/evolution_common.mk:44: error: hardware/google/pixel/touch/device.mk: No such file or directory
13:12:21 dumpvars failed with: exit status 1
including vendor/evolution/vendorsetup.sh
In file included from build/make/core/config.mk:352:
In file included from build/make/core/envsetup.mk:352:
In file included from device/google/pantah/evolution_cheetah.mk:33:
device/google/gs201/evolution_common.mk:44: error: hardware/google/pixel/touch/device.mk: No such file or directory
13:12:21 dumpvars failed with: exit status 1
Am I supposed to check out the sources from Google or Lineage and merge them into Evo?
Trying to build AOSP from Google results in a bunch of timeouts and the odd 404.
Lineage wants to pull the blobs from a running phone on Lineage or pull them from a build.zip but that doens't work either.
Python 2 is depreciated for years, but somehow Android still "needs" it? Why?!?!?!
There is no target for python2 in the repos anymore, but I have the last build installed anyway - still no love.
Suggestions?
Click to expand...
Click to collapse
You are missing at least one repo, if not more, I don't know anything about Evo. I'll provide some input to what's quoted above though, first, this is your current issue:
hardware/google/pixel/touch/device.mk: No such file or directory
Check where that repo is coming from, if it's AOSP, change it
Has anyone successfully built Android on Arch?
The distro used to build isn't relevant, as long as all dependencies are there
Lineage wants to pull the blobs from a running phone on Lineage or pull them from a build.zip but that doens't work either.
My guess is you're doing it wrong, or it's back to making sure you have all the dependencies required, because it does in fact work.
Suggestions?
If you've done this before, like "Back in the day" or whatever, then you'll need to catch up with how things are done "Today".
This was all a lot easier just a few years ago...
Ok so I finally made some progress.
I have a working build environment on Arch for AOSP however trying to build Evolution-X fails because
Code:
. build/envsetup.sh
doesn't work correctly - the path doesn't change for the build aborts because it can't find yaml.h since the build paths don't get set up.
The exact same repo builds on Ubuntu 23.04 though.
Main differences are Ubuntu is using bash, I'm using zsh in Arch (EndeavourOS) but I've tried running it in bash and the same issue is present.
Weird is AOSP's envsetup.sh works properly for AOSP.
Any ideas?
I don't like Ubuntu anywhere near as much as Arch and it's derivatives...
My next idea is to make a new user account with stock config vs my well worked in zsh setup and environment.
EDIT: that didn't work, either.
Another difference is my EndeavousOS install is in French, Ubuntu is installed in English. Would that cause an issue?