Hi,
so I've build ROM before (LineageOS and more recently Pixel Experience) but am running into an error which might be just a syntax problem in one of the source files. Before messing things up by editing these files myself, wanted to ask here which best course of action to take. (target phone: Redmi Note 10 Pro)
My build setup is a Proxmox 7 server hosting an Ubuntu 20.04 VM which has a Nvidia vGPU installed.
Bash:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0
The build starts, but after completing the kernel compilation the following error occurs.
Bash:
In file included from ../../../../../../kernel/xiaomi/sm6150/init/version.c:9:
./include/generated/compile.h:7:24: warning: missing terminating '"' character [-Winvalid-pp-token]
#define LINUX_COMPILER "Android (6877366 based on r383902b1) clang version 11.0.2 (https://android.googlesource.com/toolchai
n/llvm-project b397f81060ce6d701042b782172ed13bee898b79)
^
./include/generated/compile.h:8:1: error: unknown type name 'Found'
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
./include/generated/compile.h:8:11: error: expected ';' after top level declarator
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
;
./include/generated/compile.h:8:103: warning: missing terminating '"' character [-Winvalid-pp-token]
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
In file included from ../../../../../../kernel/xiaomi/sm6150/init/version.c:10:
In file included from ../../../../../../kernel/xiaomi/sm6150/include/linux/module.h:9:
In file included from ../../../../../../kernel/xiaomi/sm6150/include/linux/list.h:5:
../../../../../../kernel/xiaomi/sm6150/include/linux/types.h:102:10: error: unknown type name '__s8'; did you mean '__u8'?
typedef __s8 int8_t;
^~~~
__u8
../../../../../../kernel/xiaomi/sm6150/include/uapi/asm-generic/int-ll64.h:21:23: note: '__u8' declared here
typedef unsigned char __u8;
^
../../../../../../kernel/xiaomi/sm6150/init/version.c:46:26: error: expected ';' after top level declarator
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
^
;
../../../../../../kernel/xiaomi/sm6150/init/version.c:51:6: error: expected ';' after top level declarator
" (" LINUX_COMPILER ") %s\n";
^
;
2 warnings and 5 errors generated.
make[2]: *** [/home/wvthoog/android/pixel-experience/kernel/xiaomi/sm6150/scripts/Makefile.build:361: init/version.o] Error
1
make[2]: *** Waiting for unfinished jobs....
Like i said before, it looks like there are some syntax errors somewhere in one of the sourcefiles but at this point have no clue which files to edit to remedy this error.
Also, if i compile the same ROM for my Redmi Note 10 Pro (sweet) on another VM (Ubuntu 20.04) without a Nvidia GPU the build succeeds .
This sounds like a bug somewhere in one of the source files of Pixel Experience. Tried filing an issue on their Github page but their bot is fairly aggressive in closing issues if they don't meet their posting requirements.
So my question drills down to.... do other experience the same problem when using CUDA during the build process of Pixel Experience and possibly have a solution ?
Secondly, is there an option to disable CUDA during the build process ?
Thanks
populus_ said:
Hi,
so I've build ROM before (LineageOS and more recently Pixel Experience) but am running into an error which might be just a syntax problem in one of the source files. Before messing things up by editing these files myself, wanted to ask here which best course of action to take. (target phone: Redmi Note 10 Pro)
My build setup is a Proxmox 7 server hosting an Ubuntu 20.04 VM which has a Nvidia vGPU installed.
Bash:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0
The build starts, but after completing the kernel compilation the following error occurs.
Bash:
In file included from ../../../../../../kernel/xiaomi/sm6150/init/version.c:9:
./include/generated/compile.h:7:24: warning: missing terminating '"' character [-Winvalid-pp-token]
#define LINUX_COMPILER "Android (6877366 based on r383902b1) clang version 11.0.2 (https://android.googlesource.com/toolchai
n/llvm-project b397f81060ce6d701042b782172ed13bee898b79)
^
./include/generated/compile.h:8:1: error: unknown type name 'Found'
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
./include/generated/compile.h:8:11: error: expected ';' after top level declarator
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
;
./include/generated/compile.h:8:103: warning: missing terminating '"' character [-Winvalid-pp-token]
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
In file included from ../../../../../../kernel/xiaomi/sm6150/init/version.c:10:
In file included from ../../../../../../kernel/xiaomi/sm6150/include/linux/module.h:9:
In file included from ../../../../../../kernel/xiaomi/sm6150/include/linux/list.h:5:
../../../../../../kernel/xiaomi/sm6150/include/linux/types.h:102:10: error: unknown type name '__s8'; did you mean '__u8'?
typedef __s8 int8_t;
^~~~
__u8
../../../../../../kernel/xiaomi/sm6150/include/uapi/asm-generic/int-ll64.h:21:23: note: '__u8' declared here
typedef unsigned char __u8;
^
../../../../../../kernel/xiaomi/sm6150/init/version.c:46:26: error: expected ';' after top level declarator
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
^
;
../../../../../../kernel/xiaomi/sm6150/init/version.c:51:6: error: expected ';' after top level declarator
" (" LINUX_COMPILER ") %s\n";
^
;
2 warnings and 5 errors generated.
make[2]: *** [/home/wvthoog/android/pixel-experience/kernel/xiaomi/sm6150/scripts/Makefile.build:361: init/version.o] Error
1
make[2]: *** Waiting for unfinished jobs....
Like i said before, it looks like there are some syntax errors somewhere in one of the sourcefiles but at this point have no clue which files to edit to remedy this error.
Also, if i compile the same ROM for my Redmi Note 10 Pro (sweet) on another VM (Ubuntu 20.04) without a Nvidia GPU the build succeeds .
This sounds like a bug somewhere in one of the source files of Pixel Experience. Tried filing an issue on their Github page but their bot is fairly aggressive in closing issues if they don't meet their posting requirements.
So my question drills down to.... do other experience the same problem when using CUDA during the build process of Pixel Experience and possibly have a solution ?
Secondly, is there an option to disable CUDA during the build process ?
Thanks
Click to expand...
Click to collapse
Just bumped to your question, yes it happens with me too, Pcoco F3 Lineage, what I have done is to have a ubuntu (separate SSD) to boot from when I need to build, and use the other system for all other uses including cuda transcoding.
You're in the wrong forum. This is exclusively about the Xiaomi Redmi Note 10. No other version.
populus_ said:
Hi,
so I've build ROM before (LineageOS and more recently Pixel Experience) but am running into an error which might be just a syntax problem in one of the source files. Before messing things up by editing these files myself, wanted to ask here which best course of action to take. (target phone: Redmi Note 10 Pro)
My build setup is a Proxmox 7 server hosting an Ubuntu 20.04 VM which has a Nvidia vGPU installed.
Bash:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0
The build starts, but after completing the kernel compilation the following error occurs.
Bash:
In file included from ../../../../../../kernel/xiaomi/sm6150/init/version.c:9:
./include/generated/compile.h:7:24: warning: missing terminating '"' character [-Winvalid-pp-token]
#define LINUX_COMPILER "Android (6877366 based on r383902b1) clang version 11.0.2 (https://android.googlesource.com/toolchai
n/llvm-project b397f81060ce6d701042b782172ed13bee898b79)
^
./include/generated/compile.h:8:1: error: unknown type name 'Found'
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
./include/generated/compile.h:8:11: error: expected ';' after top level declarator
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
;
./include/generated/compile.h:8:103: warning: missing terminating '"' character [-Winvalid-pp-token]
Found CUDA installation: /usr/local/cuda, version 7.0, GNU ld (binutils-2.27-bd24d23f) 2.27.0.20170315"
^
In file included from ../../../../../../kernel/xiaomi/sm6150/init/version.c:10:
In file included from ../../../../../../kernel/xiaomi/sm6150/include/linux/module.h:9:
In file included from ../../../../../../kernel/xiaomi/sm6150/include/linux/list.h:5:
../../../../../../kernel/xiaomi/sm6150/include/linux/types.h:102:10: error: unknown type name '__s8'; did you mean '__u8'?
typedef __s8 int8_t;
^~~~
__u8
../../../../../../kernel/xiaomi/sm6150/include/uapi/asm-generic/int-ll64.h:21:23: note: '__u8' declared here
typedef unsigned char __u8;
^
../../../../../../kernel/xiaomi/sm6150/init/version.c:46:26: error: expected ';' after top level declarator
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
^
;
../../../../../../kernel/xiaomi/sm6150/init/version.c:51:6: error: expected ';' after top level declarator
" (" LINUX_COMPILER ") %s\n";
^
;
2 warnings and 5 errors generated.
make[2]: *** [/home/wvthoog/android/pixel-experience/kernel/xiaomi/sm6150/scripts/Makefile.build:361: init/version.o] Error
1
make[2]: *** Waiting for unfinished jobs....
Like i said before, it looks like there are some syntax errors somewhere in one of the sourcefiles but at this point have no clue which files to edit to remedy this error.
Also, if i compile the same ROM for my Redmi Note 10 Pro (sweet) on another VM (Ubuntu 20.04) without a Nvidia GPU the build succeeds .
This sounds like a bug somewhere in one of the source files of Pixel Experience. Tried filing an issue on their Github page but their bot is fairly aggressive in closing issues if they don't meet their posting requirements.
So my question drills down to.... do other experience the same problem when using CUDA during the build process of Pixel Experience and possibly have a solution ?
Secondly, is there an option to disable CUDA during the build process ?
Thanks
Click to expand...
Click to collapse
Face the same problem, How did you solved the error?
Ended up removing the Cuda Toolkit altogether since i couldn't find a solution.
populus_ said:
Ended up removing the Cuda Toolkit altogether since i couldn't find a solution.
Click to expand...
Click to collapse
Hi populus_:
Have you tried to disable the cuda toolkit detection when compiling the rom? Just romving the cuda tookit may be not a pretty solution. besuase i have install multi cuda tookit.
That was my initial question. How do i disable CUDA from building a ROM. Haven't found an answer yet.
Related
I am attempting to compile Python along with the modules "openssl pil zope2" for Android using the "Python-for-android" project (https://github.com/kivy/python-for-android).
However it is not successful and errors out with the below error:
Code:
Getting distribution for 'zope.security==3.7.4'.
In file included from
/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/Python.h:58:0,
from src/zope/security/_proxy.c:19:
/home/zac/Documents/Projects/Apps/python-for-android/build/hostpython/Python-2.7.2/Include/pyport.h:849:2:
error: #error "LONG_BIT definition appears wrong for platform (bad
gcc/glibc config?)."
[B]#error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
config?)."[/B]
^
src/zope/security/_proxy.c: In function 'init_proxy':
src/zope/security/_proxy.c:1006:3: warning: dereferencing type-punned
pointer will break strict-aliasing rules [-Wstrict-aliasing]
Py_INCREF(&SecurityProxyType);
^
error: Setup script exited with error: command
'arm-linux-androideabi-gcc' failed with exit status 1
An error occurred when trying to install zope.security 3.7.4. Look
above this message for any errors that were output by easy_install.
While:
Installing test.
Getting distribution for 'zope.security==3.7.4'.
Error: Couldn't install: zope.security 3.7.4
What I am wondering is if anyone else has ever had a similar issue when trying to use the Android gcc, I have build zope.security just fine using the ARM gcc so it is not a platform issue but some bug/issue with the provided Android gcc in the NDK
Hi Everyone
I am fairly new to android customisation, rooting, etc. and have been playing around with creating a custom CyanogenMod kernel to support a TP-Link USB wifi dongle.
The primary reference article for this can be found here - http://forum.xda-developers.com/showthread.php?t=2338179. However I have made some changes as listed below.
Keen to hack this further and any advice or guidance will be greatly appreciated.
Technical Spec:
Ubuntu 12.04 (32 Bit)
Samsung S3 (Cyanogenmod ROM)
Kernel = https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
.config = https://github.com/CyanogenMod/andr.../arch/arm/configs/cyanogenmod_i9300_defconfig
Note - There is no /proc/config.gz on my device, hence the above use of the config.
gcc-arm-linux-gnueabi libstdc++6 libncurses5 libncurses5-dev - exports correctly setup.
Objective
Getting an TP-Link TL-WN821N USB Wifi Dongle to work.
The relevant drivers are already available in mac80211 - http://www.aircrack-ng.org/doku.php?id=mac80211
Error Message
CC net/mac80211/agg-rx.o
CC net/mac80211/ibss.o
CC net/mac80211/mlme.o
net/mac80211/mlme.c: In function ‘ieee80211_mgd_auth’:
net/mac80211/mlme.c:2317:9: error: ‘struct cfg80211_auth_request’ has no member named ‘local_state_change’
net/mac80211/mlme.c: In function ‘ieee80211_assoc_done’:
net/mac80211/mlme.c:2419:2: warning: passing argument 2 of ‘cfg80211_send_rx_assoc’ from incompatible pointer type [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘struct cfg80211_bss *’ but argument is of type ‘unsigned char *’
net/mac80211/mlme.c:2419:2: warning: passing argument 3 of ‘cfg80211_send_rx_assoc’ makes pointer from integer without a cast [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘const u8 *’ but argument is of type ‘unsigned int’
net/mac80211/mlme.c:2419:2: error: too few arguments to function ‘cfg80211_send_rx_assoc’
include/net/cfg80211.h:2802:6: note: declared here
net/mac80211/mlme.c: In function ‘ieee80211_mgd_deauth’:
net/mac80211/mlme.c:2560:19: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2561:30: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2581:18: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2600:4: error: implicit declaration of function ‘__cfg80211_auth_canceled’ [-Werror=implicit-function-declaration]
net/mac80211/mlme.c:2610:16: error: ‘struct cfg80211_deauth_request’ has no member named ‘local_state_change’
cc1: some warnings being treated as errors
make[2]: *** [net/mac80211/mlme.o] Error 1
make[1]: *** [net/mac80211] Error 2
make: *** [net] Error 2
franna81 said:
Hi Everyone
I am fairly new to android customisation, rooting, etc. and have been playing around with creating a custom CyanogenMod kernel to support a TP-Link USB wifi dongle.
The primary reference article for this can be found here - http://forum.xda-developers.com/showthread.php?t=2338179. However I have made some changes as listed below.
Keen to hack this further and any advice or guidance will be greatly appreciated.
Technical Spec:
Ubuntu 12.04 (32 Bit)
Samsung S3 (Cyanogenmod ROM)
Kernel = https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
.config = https://github.com/CyanogenMod/andr.../arch/arm/configs/cyanogenmod_i9300_defconfig
Note - There is no /proc/config.gz on my device, hence the above use of the config.
gcc-arm-linux-gnueabi libstdc++6 libncurses5 libncurses5-dev - exports correctly setup.
Objective
Getting an TP-Link TL-WN821N USB Wifi Dongle to work.
The relevant drivers are already available in mac80211 - http://www.aircrack-ng.org/doku.php?id=mac80211
Error Message
CC net/mac80211/agg-rx.o
CC net/mac80211/ibss.o
CC net/mac80211/mlme.o
net/mac80211/mlme.c: In function ‘ieee80211_mgd_auth’:
net/mac80211/mlme.c:2317:9: error: ‘struct cfg80211_auth_request’ has no member named ‘local_state_change’
net/mac80211/mlme.c: In function ‘ieee80211_assoc_done’:
net/mac80211/mlme.c:2419:2: warning: passing argument 2 of ‘cfg80211_send_rx_assoc’ from incompatible pointer type [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘struct cfg80211_bss *’ but argument is of type ‘unsigned char *’
net/mac80211/mlme.c:2419:2: warning: passing argument 3 of ‘cfg80211_send_rx_assoc’ makes pointer from integer without a cast [enabled by default]
include/net/cfg80211.h:2802:6: note: expected ‘const u8 *’ but argument is of type ‘unsigned int’
net/mac80211/mlme.c:2419:2: error: too few arguments to function ‘cfg80211_send_rx_assoc’
include/net/cfg80211.h:2802:6: note: declared here
net/mac80211/mlme.c: In function ‘ieee80211_mgd_deauth’:
net/mac80211/mlme.c:2560:19: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2561:30: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2581:18: error: ‘struct cfg80211_deauth_request’ has no member named ‘bss’
net/mac80211/mlme.c:2600:4: error: implicit declaration of function ‘__cfg80211_auth_canceled’ [-Werror=implicit-function-declaration]
net/mac80211/mlme.c:2610:16: error: ‘struct cfg80211_deauth_request’ has no member named ‘local_state_change’
cc1: some warnings being treated as errors
make[2]: *** [net/mac80211/mlme.o] Error 1
make[1]: *** [net/mac80211] Error 2
make: *** [net] Error 2
Click to expand...
Click to collapse
Exactly the same issue here, bump :/
When I had to build a mac80211 driver (rt2800usb), I had to apply the following changes on top of cm-10.2.0 (d6f2f4ae4e593067dc59e2ac63f022434199f673):
Code:
# Depends on 3.4 backport that breaks mac80211.
git revert d6f2f4ae4e593067dc59e2ac63f022434199f673 # "Add support for Note 8 (N5100 and N5110)"
git revert c421809918b7106b40a81134f9fb5103146fc715 # "update bcmdhd driver from GT-9505 Source"
git revert 44655588a0b361afa15761b5c58f5a558c1c181c # "WIFI: Use kernel version 3.4 ifdef's."
git revert 3cedbff33e9884fdf3f7aaaa83ab9774d8145d1f # "wireless backport from 3.4"
# Another build fix:
Date: Sun Nov 24 12:04:33 2013 +0100
lib: fix compile of lib/genalloc.c
Taken from commit 3cedbff ("wireless backport from 3.4").
lib/genalloc.c | 54 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 22 deletions(-)
After that I was able to build rt2x00 from 3.4.70 (after enabling MAC80211 in config).. Note: these patches do not seem to revert cleanly on cm-11.0
For cm-11.0 (HEAD was 22cbf2cfb211cef2e493c5984d237d0509bf98ce, "otg: when removing ED from readyQ also set flag"), I now do:
Code:
# v--- 2014-11-06 (CM 11.0)
- revert c421809 # update bcmdhd driver from GT-9505 Source
Conflict in drivers/net/wireless/bcmdhd/Makefile, remove -DPASS_IPV4_SUSPEND
and DEBUGFS_CFG80211 (unused), all that remains is:
DHDCFLAGS += -DBLOCK_IPV6_PACKET
Conflict in drivers/net/wireless/bcmdhd/dhd_sec_feature.h, remove:
CONFIG_MACH_KONA
.config:
BCMDHD=M (was =Y, but this allows debugging)
DHD_USE_STATIC_BUF=N
DHD_USE_SCHED_SCAN=N
- revert 4465558 # WIFI: Use kernel version 3.4 ifdef's.
- revert 3cedbff # wireless backport from 3.4
- git checkout 3cedbff -- include/linux/{export,module}.h lib/genalloc.c
git commit -m 'Build fixes from 3cedbff'
Compile fixes, also used by d90b43b "mali: add r3p1 for devices that need it"
This compiles (with CONFIG_MAC80211=M), I have yet to try the newer rt2x00 for my purposes.
Hi!
I have been scratching my head over this for 3 days now, no amount of googling and searching here has given me any results.
Build environment is MAC OS X Yosemite with xcode 6 and 5.1.1 command tools installed, 100 gb sparse image file to work on.
Here is the error:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c: In function ‘load_dtqc_block’:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:170: error: ‘fname’ undeclared (first use in this function)
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:170: error: (Each undeclared identifier is reported only once
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:170: error: for each function it appears in.)
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c: In function ‘write_padding’:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:382: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c: In function ‘main’:
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:491: warning: pointer targets in passing argument 1 of ‘__builtin___strcpy_chk’ differ in signedness
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:491: warning: pointer targets in passing argument 1 of ‘__inline_strcpy_chk’ differ in signedness
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:559: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:562: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:566: warning: comparison between signed and unsigned
vendor/sony/system/mkqcdtbootimg/mkqcdtbootimg.c:571: warning: comparison between signed and unsigned
make: *** [out/host/darwin-x86/obj32/EXECUTABLES/mkqcdtbootimg_intermediates/mkqcdtbootimg.o] Error 1
make: *** Waiting for unfinished jobs....
Any help is appretiated
I'm still completely lost on this matter and is driving me crazy
I hit a similar error, but with PATH_MAX as undefined. Basically what it is complaining is that fname is not defined anywhere, which is weird. Try installing Brew (for Mac) and install automake (brew install automake).
To solve my error, I had to edit the file mkqcdtbootimg.c and add these lines after all the C variable defines (right after #include "bootimg.h", in new lines):
#ifndef PATH_MAX
#define PATH_MAX 4096
I used this as a reference: http://serverfault.com/questions/9546/filename-length-limits-on-linux
dferreira said:
I hit a similar error, but with PATH_MAX as undefined. Basically what it is complaining is that fname is not defined anywhere, which is weird. Try installing Brew (for Mac) and install automake (brew install automake).
To solve my error, I had to edit the file mkqcdtbootimg.c and add these lines after all the C variable defines (right after #include "bootimg.h", in new lines):
#ifndef PATH_MAX
#define PATH_MAX 4096
I used this as a reference: http://serverfault.com/questions/9546/filename-length-limits-on-linux
Click to expand...
Click to collapse
Thanks, I´m going to test that brew thing
Cross-compile error when building kernel (nexus9 memory forensics)
I'm currently following the AndroidMemoryForensics guide (I cannot post a link) on how to extract memory from an android device using LiME. I'm using the flounder_defconfig build configuration and create the .config file using
Code:
make flounder_defconfig
. In order to be able to load the LiME module to the kernel I need to add the following lines to the .config file:
CONFIG_MODULES=y
CONFIG_MODULES_UNLOAD=y
CONFIG_MODULES_FORCE_UNLOAD=y
When I compile the kernel I set the architecture to arm64 (ARCH=arm64) and use the aarch64-linux-android-4.9 toolchain (CROSS_COMPILE=aarch64-linux-android-4.9/aarch64-linux-android-).
When running
Code:
make
I get compile errors saying that "battery_voltage_monitor_on" is undeclared (see below).
If I try to compile the kernel without making the changes to the .config file I get no compile errors.
Am I missing something here, e.g. some package, or have I done something wrong to cause this compile error?
I tried to search for a solution online but have had little success so far so I hope I have better success here
Thanks in advance!
Jonas
Output:
CC drivers/htc_debug/stability/reboot_params.o
LD drivers/htc_debug/stability/built-in.o
CC drivers/hwmon/hwmon.o
CC drivers/hwmon/battery_system_voltage_monitor.o
In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/sched.h:31,
from /home/jonas/android/Nexus9_Volantis_source/test2/flounder-kernel/tegra/arch/arm64/include/asm/compat.h:25,
from /home/jonas/android/Nexus9_Volantis_source/test2/flounder-kernel/tegra/arch/arm64/include/asm/stat.h:23,
from include/linux/stat.h:5,
from include/linux/module.h:10,
from drivers/hwmon/battery_system_voltage_monitor.c:15:
drivers/hwmon/battery_system_voltage_monitor.c:151:19: error: 'battery_voltage_monitor_on' undeclared here (not in a function)
EXPORT_SYMBOL_GPL(battery_voltage_monitor_on);
^
include/linux/export.h:57:16: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/hwmon/battery_system_voltage_monitor.c:151:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(battery_voltage_monitor_on);
^
drivers/hwmon/battery_system_voltage_monitor.c:183:19: error: 'system_voltage_monitor_on' undeclared here (not in a function)
EXPORT_SYMBOL_GPL(system_voltage_monitor_on);
^
include/linux/export.h:57:16: note: in definition of macro '__EXPORT_SYMBOL'
extern typeof(sym) sym; \
^
drivers/hwmon/battery_system_voltage_monitor.c:183:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
EXPORT_SYMBOL_GPL(system_voltage_monitor_on);
^
make[2]: *** [drivers/hwmon/battery_system_voltage_monitor.o] Error 1
make[1]: *** [drivers/hwmon] Error 2
make: *** [drivers] Error 2
I'm having same issue on my build. Fine without modules but throws linker errors when enabled.
https://github.com/binkybear/flounder/commit/06781f20ea737f6b52a4589827d5d52688d20728
I have add the elf.h. Build failed to build the vdso.
CC arch/arm64/kernel/signal.o
In file included from arch/arm64/kernel/signal.c:36:0:
arch/arm64/kernel/signal.c: In function 'setup_return':
./arch/arm64/include/asm/vdso.h:34:11: error: 'vdso_offset_sigtramp' undeclared (first use in this function)
(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \
^
arch/arm64/kernel/signal.c:245:14: note: in expansion of macro 'VDSO_SYMBOL'
sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);
^
./arch/arm64/include/asm/vdso.h:34:11: note: each undeclared identifier is reported only once for each function it appears in
(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \
^
arch/arm64/kernel/signal.c:245:14: note: in expansion of macro 'VDSO_SYMBOL'
sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);
^
make[1]: *** [arch/arm64/kernel/signal.o] Error 1
make: *** [arch/arm64/kernel] Error 2
I have solved the problem.
The vdso_offset_sigtramp is defined in include/generated/vdso-offsets.h
#define vdso_offset_sigtramp 0x04e0
But in my code this line is "#define vdso_offset_sigtrampt0x04e0". What the ****! I don't modify any things. Why this file changed?
Have the same problem and solved
I've got the same error message but the cause is somewhat different. My include/generated/vdso-offsets.h is empty. The reason is that arch/arm64/kernel/vdso/gen_vdso_offsets.h does not have the eXecute permission. This script is very simple, so I guess you were hit by a Mac sh or make bug.
I'm building Z00E (ASUS Zenfone 2 ZE500KL) kernel on Arch Linux x86_64.
clangllvm said:
I have add the elf.h. Build failed to build the vdso.
CC arch/arm64/kernel/signal.o
In file included from arch/arm64/kernel/signal.c:36:0:
arch/arm64/kernel/signal.c: In function 'setup_return':
./arch/arm64/include/asm/vdso.h:34:11: error: 'vdso_offset_sigtramp' undeclared (first use in this function)
(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \
^
arch/arm64/kernel/signal.c:245:14: note: in expansion of macro 'VDSO_SYMBOL'
sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);
^
./arch/arm64/include/asm/vdso.h:34:11: note: each undeclared identifier is reported only once for each function it appears in
(void *)(vdso_offset_##name - VDSO_LBASE + (unsigned long)(base)); \
^
arch/arm64/kernel/signal.c:245:14: note: in expansion of macro 'VDSO_SYMBOL'
sigtramp = VDSO_SYMBOL(current->mm->context.vdso, sigtramp);
^
make[1]: *** [arch/arm64/kernel/signal.o] Error 1
make: *** [arch/arm64/kernel] Error 2
Click to expand...
Click to collapse
Hey i know it's too late but i found out solution we have to change last line of this file : arch/arm64/kernel/vdso/gen_vdso_offsets.sh
to :
<code>
's/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2 0x\1/p'
</code>
actually i replaced "\t" to " "(black space)
tested on sierra :fingers-crossed:
erfanoabdi said:
Hey i know it's too late but i found out solution we have to change last line of this file : arch/arm64/kernel/vdso/gen_vdso_offsets.sh
to :
<code>
's/^\([0-9a-fA-F]*\) . VDSO_\([a-zA-Z0-9_]*\)$/\#define vdso_offset_\2 0x\1/p'
</code>
actually i replaced "\t" to " "(black space)
tested on sierra :fingers-crossed:
Click to expand...
Click to collapse
I know it's late but thx fixed my problem.