[Q]CM9 compilate error OMX... - XPERIA X8 Q&A, Help & Troubleshooting

Hi,
I am building my new CM9 rom for Shakira but on linux mint 14 I have a big problem with this error :
http://pastebin.com/kpprcWcA
I used MiniCM surouces

pastebin not open :S

frameworks/base/media/libstagefright/OMXCodec.cpp:2546: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nEvent(OMX_EVENTTYPE, OMX_U32, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3333: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nCmdComplete(OMX_COMMANDTYPE, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3513: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'bool android:MXCodec::flushPortAsync(OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3828: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec::drainInputBuffers()':
frameworks/base/media/libstagefright/OMXCodec.cpp:3963: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In function 'const char* android::colorFormatString(OMX_COLOR_FORMATTYPE)':
frameworks/base/media/libstagefright/OMXCodec.cpp:5427: warning: comparison between 'enum OMX_COLOR_FORMATTYPE' and 'enum OMX_QCOM_COLOR_FORMATTYPE'
make: *** [out/target/product/shakira/obj/SHARED_LIBRARIES/libstagefright_intermediates/OMXCodec.o] Error 1
make: *** Waiting for unfinished jobs....
[email protected] ~/cm9 $
This is error code

I had a similar problem except that I did not want to load at all
"frameworks / base / media / libstagefright / OMXCodec.cpp: In member function 'bool android :: eek: MXCodec :: flushPortAsync (OMX_U32)'"
and stopped and also used to use Linux, so we tried it on ubuntu and there was no problem with you more, but this is different ...
can do it on ubuntu like me

I do not want to install a new system ...
Everything can be solved without re installation - I know this from experience!
Does anyone else have any other ideas?

Have a look here Soniakos
Try using make -j1

Ubuntu rullez i know it

Yeah Thanks !
I build CM9
surouces for my CM9 is posted on my team github
github.com/MimiTeam

Hey cool,
What solved the error?

Not working yet !
I thinked working but I see this error now :/

Soniakos said:
frameworks/base/media/libstagefright/OMXCodec.cpp:2546: warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs 'OMX_COLOR_FORMATTYPE'
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nEvent(OMX_EVENTTYPE, OMX_U32, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3333: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec:nCmdComplete(OMX_COMMANDTYPE, OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3513: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'bool android:MXCodec::flushPortAsync(OMX_U32)':
frameworks/base/media/libstagefright/OMXCodec.cpp:3828: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In member function 'void android:MXCodec::drainInputBuffers()':
frameworks/base/media/libstagefright/OMXCodec.cpp:3963: warning: comparison between signed and unsigned integer expressions
frameworks/base/media/libstagefright/OMXCodec.cpp: In function 'const char* android::colorFormatString(OMX_COLOR_FORMATTYPE)':
frameworks/base/media/libstagefright/OMXCodec.cpp:5427: warning: comparison between 'enum OMX_COLOR_FORMATTYPE' and 'enum OMX_QCOM_COLOR_FORMATTYPE'
make: *** [out/target/product/shakira/obj/SHARED_LIBRARIES/libstagefright_intermediates/OMXCodec.o] Error 1
make: *** Waiting for unfinished jobs....
[email protected] ~/cm9 $
This is error code
Click to expand...
Click to collapse
No this is not error... This is only warning....
The real error here:
Code:
target thumb C++: libstagefright <= frameworks/base/media/libstagefright/SurfaceMediaSource.cpp
frameworks/base/media/libstagefright/OMXCodec.cpp:2351:2: error: #endif without #if
and here:
Code:
frameworks/base/media/libstagefright/OMXCodec.cpp:2340: error: 'kRequiresStoreMetaDataBeforeIdle' was not declared in this scope
I hope how this help If not, I will see your repos, but first try to fix you..

Ok but now I installed Ubuntu 10.04 (On this I created my first rom Ice Elite CM9) on this Ubuntu I haven't errors...
And now I have some next problems but now with libusbx :/
I installed Ubuntu and I want to install flashtool... but I have a error with libusb, but I installed in termianl is :
[email protected]:/home/zodex/ft# ./FlashTool
Running as root.
JAVA_HOME not set. Using default value : ./x10flasher_lib/linjre64
Libusb not found. Minimum libusb version is 1.0.14
It can be downloaded on http://www.libusbx.org
Can you help me now ?

Soniakos said:
Ok but now I installed Ubuntu 10.04 (On this I created my first rom Ice Elite CM9) on this Ubuntu I haven't errors...
And now I have some next problems but now with libusbx :/
I installed Ubuntu and I want to install flashtool... but I have a error with libusb, but I installed in termianl is :
[email protected]:/home/zodex/ft# ./FlashTool
Running as root.
JAVA_HOME not set. Using default value : ./x10flasher_lib/linjre64
Libusb not found. Minimum libusb version is 1.0.14
It can be downloaded on http://www.libusbx.org
Can you help me now ?
Click to expand...
Click to collapse
http://www.libusbx.org
Visit the site, download the source, then build lubusbx
install it then restart pc...

I installed this :/
But error is :/
And I have next error :
[email protected]:~/cm9$ repo init -u git://github.com/zodex/android.git -b ics
fatal: git 1.7.2 or later required
OMG ! Why errors ?

Soniakos said:
I installed this :/
But error is :/
And I have next error :
[email protected]:~/cm9$ repo init -u git://github.com/zodex/android.git -b ics
fatal: git 1.7.2 or later required
OMG ! Why errors ?
Click to expand...
Click to collapse
needed newer version of git...
sudo apt-get install git-core
if says how the latest version installed:
https://launchpad.net/~git-core/+archive/candidate
install 1.8 from here

I have error !
Bro help me please...
make: *** [out/target/product/shakira/obj/SHARED_LIBRARIES/libstagefright_intermediates/OMXCodec.o] Error 1
make: *** Waiting for unfinished jobs....
This is not like me ...
Can u help me ?

In frameworks/base/media/libstagefright/OMXCodec.cpp find this: (Line 2337-2351)
Code:
#if !defined(QCOM_LEGACY_OMX) && !defined(STE_HARDWARE)
if ((mFlags & kStoreMetaDataInVideoBuffers)
#else
if (!(mQuirks & kRequiresStoreMetaDataBeforeIdle)
&& (mFlags & kStoreMetaDataInVideoBuffers)
#endif
&& portIndex == kPortIndexInput) {
LOGW("Trying to enable metadata mode on encoder");
err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
if (err != OK) {
LOGE("Storing meta data in video buffers is not supported");
return err;
}
}
#endif
Then replace with this:
Code:
#ifndef QCOM_LEGACY_OMX if ((mFlags & kStoreMetaDataInVideoBuffers)
&& portIndex == kPortIndexInput) {
LOGW("Trying to enable metadata mode on encoder");
err = mOMX->storeMetaDataInBuffers(mNode, kPortIndexInput, OMX_TRUE);
if (err != OK) {
LOGE("Storing meta data in video buffers is not supported");
return err;
}
}
#endif

Very Thanks bro !

Sorry bro's but I have new problem :/
in console :
running: java -Xmx512m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/testkey.x509.pem build/target/product/security/testkey.pk8 /tmp/tmpNRP2MT out/target/product/shakira/cm_shakira-ota-eng.zodex.zip
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2798)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:111)
at java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:178)
at java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:135)
at java.util.zip.ZipOutputStream.write(ZipOutputStream.java:289)
at com.android.signapk.SignApk.copyFiles(SignApk.java:422)
at com.android.signapk.SignApk.main(SignApk.java:490)
ERROR: signapk.jar failed: return code 1
make: *** [out/target/product/shakira/cm_shakira-ota-eng.zodex.zip] Error 1
I know... This is java problem but I can't fix it :/
Can you help me ?

You can get OOM errors if you don't have a big enough swap partition when compiling.
Use 6GB swap on a build machine..
Your error may be from something else, i'm just pointing out another possible cause..

Related

[Q] Compilation problem on Nexus One build

I am trying to compile Android from the source for my Nexus One. I pretty much followed all instructions from here: http://forum.xda-developers.com/showthread.php?t=899674
Though the instructions are for Gingerbread, I don't really see much of a difference for Froyo. After I do a "make -j4", the following error is thrown:
Code:
Install: out/target/product/passion/system/lib/libmedia.so
target SharedLib: libstagefright_foundation (out/target/product/passion/obj/SHARED_LIBRARIES/libstagefright_foundation_intermediates/LINKED/libstagefright_foundation.so)
target SharedLib: libstagefright_color_conversion (out/target/product/passion/obj/SHARED_LIBRARIES/libstagefright_color_conversion_intermediates/LINKED/libstagefright_color_conversion.so)
target SharedLib: libaudio (out/target/product/passion/obj/SHARED_LIBRARIES/libaudio_intermediates/LINKED/libaudio.so)
target SharedLib: libaudiopolicy (out/target/product/passion/obj/SHARED_LIBRARIES/libaudiopolicy_intermediates/LINKED/libaudiopolicy.so)
target SharedLib: libcameraservice (out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so)
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::getCameraInfo(int, android::CameraInfo*):frameworks/base/services/camera/libcameraservice/CameraService.cpp:109: error: undefined reference to 'HAL_getCameraInfo'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:148: error: undefined reference to 'HAL_openCameraHardware'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:154: error: undefined reference to 'HAL_getCameraInfo'
collect2: ld returned 1 exit status
make: *** [out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so] Error 1
make: *** Waiting for unfinished jobs....
Note: cts/tools/dx-tests/src/dxc/junit/opcodes/invokeinterface/jm/T_invokeinterface_1.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compiling all jasmin (*.j)
compiling all .cfh files into .class files
generating Main_*.java files reading from cts/tools/dx-tests writing to out/host/darwin-x86/obj/EXECUTABLES/dx-tests_intermediates/mainfiles
using java src:cts/tools/dx-tests/src
Collecting all junit tests...
Time: 0.025
OK (0 tests)
Can someone please help me resolve this issue?
If you want to compile Froyo - use a different guide. Either from CM6 page or from Android SDK explanations.
You're failing on library incompatibilities, specifically Camera lib - but since I don't know, what's the source core you're running (Froyo or Gingerbread repo), it's hard to say how to fix it. If you're following the guide in your post completely and compiling GB - you probably missed the "Fix Camera" part.
My bad! You're right.. There was the fix right at the bottom of that article. Thank you for pointing it out. Everything works properly..

AOSP builds for Z5C

Hi guys
Thought I should start a thread for various AOSP builds people are doing for their Sony Z5Compact. We can trouble shoot errors and generally take advantage of the way Sony encourage open source development for their devices.
Ill get the ball rolling. (see below)
AOSP NOUGAT 7.1
https://mega.nz/#!Jh5WxSYS!DkYHgBjtR...V6Vdxq11xMplcg
TWRP3.0.3
https://mega.nz/#!QhoBESZI!XzXzHvosc...X57GnZvRBEPoR4
AOSP NOUGAT
Installable .zip compiled with mm binaries: https://mega.nz/#!h8530CLS!vmwYkb4JBdx8YtOaqkETq84bFeR9wiz2KYIlNOWnFBM (as sony has not published N binaries yet.)
Nougat .img files for z5c: https://mega.nz/#!5h5gxYKI!AuCFTO6MV4J5rfMBK_A1Q4eOBr5ZoXQIG2wEW9Fffxg
AOSP MM BUILD for Z5C.
Android 6.1
New Build with Julys/Android N compatible binaries Build # MOB30W
Installable .zip: https://mega.nz/#!80BlACKS!hefd26xN36UPcgnGEfdp9BkPsZvjS3k4Bvzo3dmU9I8
Raw .img files: https://mega.nz/#!FoYTGQbT!8ifDpGlZSaXgsHo1_gLm-67YIdDo0-BW85hra5ZToVY
New Build as of 29/04/16 (untested as of yet) Ignore below list of what works as I havent flashed this to my phone yet.
https://mega.nz/#!MwJ3wSJb!6ALDvaSIPQK0kc8R6MU5mVhUmKKCzVovE54tLcNxTx0
Older MM build (.img files)
https://mega.nz/#!B5hhyYhT!Z1lMcwxHc3KC9lDRCwOcyImBXXLuHgqROZ76J5xArew
RECOMMENDED DO A FULL WIPE OF DATA AND SYSTEM BEFORE FLASHING. Have your old/stock system, recovery,boot.img saved on your pc, as TWRP is not supported in AOSP kernel.
Boots fine.
will load and use previous userdata from rooted sony stock. (but not recommended to dirty flash!)
Data connection was patchy
Camera works but is awful.
External and internal sd card detection/mounts fine, but the rom wants to re format your external sd card before it mounts.
Regards
Joeisgood99
@Joeisgood99, your links are missing the Mega decryption key.
Anyway, I compiled 5.1.1_r24 (latest Lollipop) from source and uploaded here:
https://mega.nz/#!1hZlFCoT!UIEBo9CjaYu0Eg-4CeVdRijchRqNwbErUZPL4qbhzRo
I have no Z5C so consider it fully UNtested.
Still no luck with my 6.0.0_r1 build
nilezon said:
@Joeisgood99, your links are missing the Mega decryption key.
Anyway, I compiled 5.1.1_r24 (latest Lollipop) from source and uploaded here:
https://mega.nz/#!1hZlFCoT!UIEBo9CjaYu0Eg-4CeVdRijchRqNwbErUZPL4qbhzRo
I have no Z5C so consider it fully UNtested.
Still no luck with my 6.0.0_r1 build
Click to expand...
Click to collapse
Thanks for that!
I have only made it about 19 mins in to 6.0.0_r1 build before it fails.
target thumb C: libmmcamera_interface_32 <= hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_thread.c
In file included from hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera.c:44:0:
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/../common/mm_camera_interface.h:98:21: error: 'MSM_CAMERA_MAX_USER_BUFF_CNT' undeclared here (not in a function)
int32_t buf_idx[MSM_CAMERA_MAX_USER_BUFF_CNT];
^
In file included from hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_interface.c:44:0:
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/../common/mm_camera_interface.h:98:21: error: 'MSM_CAMERA_MAX_USER_BUFF_CNT' undeclared here (not in a function)
int32_t buf_idx[MSM_CAMERA_MAX_USER_BUFF_CNT];
^
In file included from hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_channel.c:40:0:
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/../common/mm_camera_interface.h:98:21: error: 'MSM_CAMERA_MAX_USER_BUFF_CNT' undeclared here (not in a function)
int32_t buf_idx[MSM_CAMERA_MAX_USER_BUFF_CNT];
^
In file included from hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_thread.c:41:0:
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/../common/mm_camera_interface.h:98:21: error: 'MSM_CAMERA_MAX_USER_BUFF_CNT' undeclared here (not in a function)
int32_t buf_idx[MSM_CAMERA_MAX_USER_BUFF_CNT];
^
build/core/binary.mk:801: recipe for target 'out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera.o' failed
target thumb C: libmmcamera_interface_32 <= hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_sock.c
make: *** [out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:45:0:
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/../common/mm_camera_interface.h:98:21: error: 'MSM_CAMERA_MAX_USER_BUFF_CNT' undeclared here (not in a function)
int32_t buf_idx[MSM_CAMERA_MAX_USER_BUFF_CNT];
^
build/core/binary.mk:801: recipe for target 'out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_thread.o' failed
make: *** [out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_thread.o] Error 1
build/core/binary.mk:801: recipe for target 'out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_interface.o' failed
make: *** [out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_interface.o] Error 1
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c: In function 'mm_stream_write_user_buf':
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1046:21: error: dereferencing pointer to incomplete type
cont_buf->buf_cnt = my_obj->buf[buf->buf_idx].user_buf.bufs_used;
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1047:46: error: dereferencing pointer to incomplete type
for (i = 0; i < (int32_t)cont_buf->buf_cnt; i++) {
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1048:25: error: dereferencing pointer to incomplete type
cont_buf->buf_idx = my_obj->buf[buf->buf_idx].user_buf.buf_idx;
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1055:50: error: dereferencing pointer to incomplete type
for (i = 0; i < (int32_t)cont_buf->buf_cnt; i++) {
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1103:21: error: dereferencing pointer to incomplete type
cont_buf->buf_cnt = my_obj->buf[index].user_buf.bufs_used;
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1104:46: error: dereferencing pointer to incomplete type
for (i = 0; i < (int32_t)cont_buf->buf_cnt; i++) {
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1105:25: error: dereferencing pointer to incomplete type
cont_buf->buf_idx = my_obj->buf[index].user_buf.buf_idx;
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1112:50: error: dereferencing pointer to incomplete type
for (i = 0; i < (int32_t)cont_buf->buf_cnt; i++) {
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c: In function 'mm_stream_read_user_buf':
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1163:60: error: dereferencing pointer to incomplete type
frameID = (buf_info->buf->frame_idx - 1) * user_buf->buf_cnt;
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1177:65: error: dereferencing pointer to incomplete type
my_obj->prev_timestamp = (timeStamp - (nsecs_t)(user_buf->buf_cnt * interval_nsec));
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1180:54: error: dereferencing pointer to incomplete type
interval_nsec = (nsecs_t)(ts_delta / user_buf->buf_cnt);
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1184:38: error: dereferencing pointer to incomplete type
for (i = 0; i < (int32_t)user_buf->buf_cnt; i++) {
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1185:54: error: dereferencing pointer to incomplete type
buf_info->buf->user_buf.buf_idx = user_buf->buf_idx;
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1186:49: error: dereferencing pointer to incomplete type
stream_buf = &my_obj->plane_buf[user_buf->buf_idx];
^
hardware/qcom/camera/QCamera2/stack/mm-camera-interface/src/mm_camera_stream.c:1204:49: error: dereferencing pointer to incomplete type
buf_info->buf->user_buf.bufs_used = user_buf->buf_cnt;
^
build/core/binary.mk:801: recipe for target 'out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_channel.o' failed
make: *** [out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_channel.o] Error 1
build/core/binary.mk:801: recipe for target 'out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_stream.o' failed
make: *** [out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/libmmcamera_interface_intermediates/src/mm_camera_stream.o] Error 1
#### make failed to build some targets (19:09 (mm:ss)) ####
Tried to fix it with this
https://git.geekli.st/pirej/kernel/commit/3b7ca4571409e0e38ae45afedf77afbf3099d801?view=parallel
or similar but didn’t work.
Thanks for your contribution!:good:
Joeisgood99 said:
Thanks for that!
I have only made it about 19 mins in to 6.0.0_r1 build before it fails.
Tried to fix it with this ... or similar but didn’t work.
Thanks for your contribution!:good:
Click to expand...
Click to collapse
I got similar errors.
You need to update the files in ./device/sony/kitakami/kernel-headers/ with files from the Sony kernel source code.
For example, replace:
https://github.com/sonyxperiadev/device-sony-kitakami/blob/master/kernel-headers/media/msmb_camera.h
with
https://github.com/Tommy-Geenexus/a...n_5.x/blob/master/include/media/msmb_camera.h
to get correct MSM_CAMERA_MAX_USER_BUFF_CNT definition.
You also need to add an header include to macaddrsetup.c to make it compile. See this pull request:
https://github.com/sonyxperiadev/macaddrsetup/pull/1
That's all I've got for now.
Edit:
This is the error I end up with:
Code:
No private recovery resources for TARGET_DEVICE suzuran
target Symbolic: init (out/target/product/suzuran/symbols/init)
target Unpacked: adbd (out/target/product/suzuran/obj/EXECUTABLES/adbd_intermediates/PACKED/adbd)
target StaticExecutable: healthd (out/target/product/suzuran/obj/EXECUTABLES/healthd_intermediates/LINKED/healthd)
out/host/linux-x86/bin/checkpolicy: loading policy configuration from out/target/product/suzuran/obj/ETC/sepolicy_intermediates/policy.conf
device/qcom/sepolicy/common/init_shell.te:3:ERROR 'unknown type init_shell' at token ';' on line 16010:
#for accessing fmradio device node
allow init_shell fm_radio_device:chr_file { open read ioctl };
checkpolicy: error(s) encountered while parsing configuration
make: *** [out/target/product/suzuran/obj/ETC/sepolicy_intermediates/sepolicy] Error 1
Edit2:
Possibly solution for sepolicy error:
https://github.com/alviteri/device-qcom-sepolicy/tree/test-m
Source: https://github.com/sonyxperiadev/device-qcom-sepolicy/pull/8
Edit3:
I got past the sepolicy errors, but face new problems.
Some definitions are missing:
Code:
target thumb C++: camera.msm8994_32 <= hardware/qcom/camera/QCamera2/HAL/QCamera2HWI.cpp
hardware/qcom/camera/QCamera2/HAL/QCamera2HWI.cpp: In member function 'int qcamera::QCamera2HardwareInterface::sendCommand(int32_t, int32_t&, int32_t&)':
hardware/qcom/camera/QCamera2/HAL/QCamera2HWI.cpp:3928:10: error: 'CAMERA_CMD_LONGSHOT_ON' was not declared in this scope
case CAMERA_CMD_LONGSHOT_ON:
^
hardware/qcom/camera/QCamera2/HAL/QCamera2HWI.cpp:3970:10: error: 'CAMERA_CMD_LONGSHOT_OFF' was not declared in this scope
case CAMERA_CMD_LONGSHOT_OFF:
^
etc ...
Awesome work @nilezon.
This thread is becoming a build diary for Sony aosp 6.0.0_r1.
I used the commits you pointed out. They fixed the issue, the build stooped 3 mins later with this error
target thumb C++: liboverlay_32 <= hardware/qcom/display/msm8994/liboverlay/overlayRotator.cpp
hardware/qcom/display/msm8994/liboverlay/overlayUtils.cpp: In function 'int overlay::utils::getMdpFormat(int, int)':
hardware/qcom/display/msm8994/liboverlay/overlayUtils.cpp:153:24: error: 'MDP_RGBA_8888_UBWC' was not declared in this scope
return MDP_RGBA_8888_UBWC;
^
hardware/qcom/display/msm8994/liboverlay/overlayUtils.cpp:155:24: error: 'MDP_RGB_565_UBWC' was not declared in this scope
return MDP_RGB_565_UBWC;
^
hardware/qcom/display/msm8994/liboverlay/overlayUtils.cpp:159:24: error: 'MDP_Y_CBCR_H2V2_UBWC' was not declared in this scope
return MDP_Y_CBCR_H2V2_UBWC;
^
target thumb C++: liboverlay_32 <= hardware/qcom/display/msm8994/liboverlay/overlayMdpRot.cpp
build/core/binary.mk:706: recipe for target 'out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/liboverlay_intermediates/overlayUtils.o' failed
make: *** [out/target/product/suzuran/obj_arm/SHARED_LIBRARIES/liboverlay_intermediates/overlayUtils.o] Error 1
make: *** Waiting for unfinished jobs....
target thumb C++: liboverlay_32 <= hardware/qcom/display/msm8994/liboverlay/overlayMdssRot.cpp
#### make failed to build some targets (21:25 (mm:ss)) ####
All these undeclared formats are declared in /devices/sony/kitakami/kernel-headers/linux/msm_mdp.h
but haven’t had a chance to even look at why info isn’t getting passed along yet. Has been a big family oriented weekend. Just sat down. Ill look in to your errors.
Thanks again!
Seems to be a problem with a broken make config, the kitakami settings are not being applied or reverting. The source is also missing a few defines, mainly around the camera it seems.
thx for your great work!
has anyone tested the 5.1.1. builds? are there any known issues?
can't use my phone without root and bloatware instead.
M!tch said:
thx for your great work!
has anyone tested the 5.1.1. builds? are there any known issues?
can't use my phone without root and bloatware instead.
Click to expand...
Click to collapse
Most are holding out for a way to keep DRM keys I think, slows down the trial and error process a bit.
M!tch said:
thx for your great work!
has anyone tested the 5.1.1. builds? are there any known issues?
can't use my phone without root and bloatware instead.
Click to expand...
Click to collapse
I compiled AOSP but couldn't get it to boot. Most likely something wrong with the pre-compiled kernel image.
does the build from the op work?
M!tch said:
does the build from the op work?
Click to expand...
Click to collapse
Don't know. I didn't test.
BUT, FreeXperia has published suzuran (Z5C) build for 5.1.1:
http://fxpblog.co/aosp/aosp-5-1/
http://uploaded.net/file/rg3ocwy3/from/ub0dtu
I don't know if they work either, but I guess they usually does?
I've tried flashing the images in the OP and it just hangs when sending system. Have waited 30 minutes and still nothing.
creebefu said:
I've tried flashing the images in the OP and it just hangs when sending system. Have waited 30 minutes and still nothing.
Click to expand...
Click to collapse
Did you flash with the sparse flag?
Code:
fastboot -S 256M flash system system.img
nilezon said:
Did you flash with the sparse flag?
Code:
fastboot -S 256M flash system system.img
Click to expand...
Click to collapse
That flashed okay, but rebooted and it ended up turning itself off after the Sony - Xperia screen.
For the others I'm literally just doing:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
etc.
Any other commands I should try?
creebefu said:
That flashed okay, but rebooted and it ended up turning itself off after the Sony - Xperia screen.
For the others I'm literally just doing:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
etc.
Any other commands I should try?
Click to expand...
Click to collapse
Hmm, I didn't know that you could flash a recovery image to an Xperia phone:
Code:
fastboot flash recovery recovery.img
I don't think there is any recovery partition.
nilezon said:
Hmm, I didn't know that you could flash a recovery image to an Xperia phone:
Code:
fastboot flash recovery recovery.img
I don't think there is any recovery partition.
Click to expand...
Click to collapse
That's strange as it was flashing fine, and says success.
I'll reset back to stock firmware, then try again without flashing recovery.
creebefu said:
That's strange as it was flashing fine, and says success.
I'll reset back to stock firmware, then try again without flashing recovery.
Click to expand...
Click to collapse
You do that, but I am sure it will not boot anyway.
I think it's something wrong with the pre-built kernel, but I'm not sure.
M!tch said:
does the build from the op work?
Click to expand...
Click to collapse
creebefu said:
I've tried flashing the images in the OP and it just hangs when sending system. Have waited 30 minutes and still nothing.
Click to expand...
Click to collapse
nilezon said:
You do that, but I am sure it will not boot anyway.
I think it's something wrong with the pre-built kernel, but I'm not sure.
Click to expand...
Click to collapse
Thanks for testing guys. I STILL don’t have a Z5C so Im kind of useless atm. I did nothing to alter the code for my build, just sync and make.
Maybe try flashing zombie boot.img (I’m assuming ramdisk is from 32.0.A.5.32/R4B or similar? ) to get aosp to build.
Ill change the op with update that building straight from source produces non bootable rom/or kernel.
Also re the recovery partition: This is new to me as I’m coming from HTC where there was a designated recovery partition however I’m sure that when you flash a recovery.img to a Sony phone
Code:
fastboot flash recovery fotatwrp.img
for example, you are flashing it to the FOTAKernel partition, which is empty on an unlocked xperia because it used to handle the OEM OTA's, but is wiped upon unlocking the phone. The only way you can boot from this partition is to have extract-elf-ramdisk compiled in your ramdisk.cpio (source code) https://github.com/Dees-Troy/extract_elf_ramdisk. Or you can just have the recovery in the boot.img and boot in to recovery via fastboot.
Sony veterans please correct me if I’m wrong.
Some info.
https://twrp.me/devices/sonyxperiaz.html
Joeisgood99 said:
Sony veterans please correct me if I’m wrong.
Some info.
https://twrp.me/devices/sonyxperiaz.html
Click to expand...
Click to collapse
Thats untrue for Xperia Z5C ... It already has new bootloader and here is your recovery partition:
/dev/block/bootdevice/by-name/recovery
See Z5C official sourcecode
Sent from my mint using XDA Free mobile app
nilezon said:
Don't know. I didn't test.
BUT, FreeXperia has published suzuran (Z5C) build for 5.1.1:
http://fxpblog.co/aosp/aosp-5-1/
http://uploaded.net/file/rg3ocwy3/from/ub0dtu
I don't know if they work either, but I guess they usually does?
Click to expand...
Click to collapse
the op says, the build is working. but i guess it's not confirmed yet because it refers to you.
is there any other source to get information about the builds from fxp?

[Help][Q] Compiling Magisk from source errors

UPDATE: ISSUE HAS BEEN FIXED, THANK YOU
Hi all,
I am trying to compile Magisk after cloning it from the Github repository (https://github.com/topjohnwu/Magisk).
I cloned it via
Code:
git clone [B]-recursive[/B] https://github.com/topjohnwu/Magisk.git
in order to download the proper submodules as well.
After running
Code:
python3 build.py all 14.3 143
(btw, I am simply guessing the versioncode argument. Does it matter?)
the error I get is the following:
pastebin: https://pastebin.com/eVwGhvXa
Code:
* Building Magisk binaries
[x86] Compile : b64xz <= b64xz.c
[x86] Compile : magisk <= magisk.c
[x86] Compile : magisk <= daemon.c
[x86] Compile : magisk <= socket_trans.c
[x86] Compile : magisk <= log_monitor.c
[x86] Compile : magisk <= bootstages.c
[x86] Compile : magisk <= misc.c
[x86] Compile : magisk <= vector.c
[x86] Compile : magisk <= xwrap.c
[x86] Compile : magisk <= list.c
[x86] Compile : magisk <= img.c
[x86] Compile : magisk <= file.c
[x86] Compile : magisk <= magiskhide.c
[x86] Compile : magisk <= proc_monitor.c
[x86] Compile : magisk <= hide_utils.c
[x86] Compile : magisk <= magiskpolicy.c
[x86] Compile : magisk <= rules.c
[x86] Compile : magisk <= sepolicy.c
[x86] Compile : magisk <= api.c
[x86] Compile++ : magisk <= resetprop.cpp
[x86] Compile++ : magisk <= system_properties.cpp
In file included from jni/resetprop/resetprop.cpp:63:
In file included from jni/resetprop/_system_properties.h:40:
jni/resetprop/system_properties.h:46:64: error: expected function body after function declarator
int __system_property_set2(const char* key, const char* value) __INTRODUCED_IN(12);
^
jni/resetprop/system_properties.h:61:19: error: expected function body after function declarator
void* cookie) __INTRODUCED_IN(26);
^
jni/resetprop/system_properties.h:70:3: error: expected function body after function declarator
__INTRODUCED_IN(19);
^
jni/resetprop/system_properties.h:89:5: error: expected function body after function declarator
__INTRODUCED_IN(26);
^
jni/resetprop/resetprop.cpp:177:3: error: use of undeclared identifier '__system_property_read_callback2'; did you mean
'__system_property_read2'?
__system_property_read_callback2(pi, read_prop_info, value);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__system_property_read2
jni/resetprop/system_properties.h:94:5: note: '__system_property_read2' declared here
int __system_property_read2(const prop_info* pi, char* name, char* value);
^
jni/resetprop/resetprop.cpp:177:40: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'void (void *, const
char *, const char *, uint32_t)' (aka 'void (void *, const char *, const char *, unsigned int)')
__system_property_read_callback2(pi, read_prop_info, value);
^~~~~~~~~~~~~~
jni/resetprop/system_properties.h:94:56: note: passing argument to parameter 'name' here
int __system_property_read2(const prop_info* pi, char* name, char* value);
^
jni/resetprop/resetprop.cpp:192:2: error: use of undeclared identifier '__system_property_read_callback2'; did you mean
'__system_property_read2'?
__system_property_read_callback2(pi, cb_wrapper, cookie);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__system_property_read2
jni/resetprop/system_properties.h:94:5: note: '__system_property_read2' declared here
int __system_property_read2(const prop_info* pi, char* name, char* value);
^
jni/resetprop/resetprop.cpp:192:39: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'void (void *, const
char *, const char *, uint32_t)' (aka 'void (void *, const char *, const char *, unsigned int)')
__system_property_read_callback2(pi, cb_wrapper, cookie);
^~~~~~~~~~
jni/resetprop/system_properties.h:94:56: note: passing argument to parameter 'name' here
int __system_property_read2(const prop_info* pi, char* name, char* value);
^
In file included from jni/resetprop/system_properties.cpp:54:
In file included from jni/resetprop/_system_properties.h:40:
jni/resetprop/system_properties.h:46:64: error: expected function body after function declarator
int __system_property_set2(const char* key, const char* value) __INTRODUCED_IN(12);
^
jni/resetprop/system_properties.h:61:19: error: expected function body after function declarator
void* cookie) __INTRODUCED_IN(26);
^
jni/resetprop/system_properties.h:70:3: error: expected function body after function declarator
__INTRODUCED_IN(19);
^
jni/resetprop/system_properties.h:89:5: error: expected function body after function declarator
__INTRODUCED_IN(26);
^
jni/resetprop/resetprop.cpp:254:2: error: use of undeclared identifier '__system_property_foreach2'; did you mean
'__system_property_get2'?
__system_property_foreach2(prop_foreach_cb, &wrap);
^~~~~~~~~~~~~~~~~~~~~~~~~~
__system_property_get2
jni/resetprop/system_properties.h:96:5: note: '__system_property_get2' declared here
int __system_property_get2(const char* name, char* value);
^
jni/resetprop/resetprop.cpp:254:29: error: cannot initialize a parameter of type 'const char *' with an lvalue of type
'void (const prop_info *, void *)'
__system_property_foreach2(prop_foreach_cb, &wrap);
^~~~~~~~~~~~~~~
jni/resetprop/system_properties.h:96:40: note: passing argument to parameter 'name' here
int __system_property_get2(const char* name, char* value);
^
jni/resetprop/resetprop.cpp:271:10: error: use of undeclared identifier '__system_property_set2'; did you mean
'__system_property_get2'?
ret = __system_property_set2(name, value);
^~~~~~~~~~~~~~~~~~~~~~
__system_property_get2
jni/resetprop/system_properties.h:96:5: note: '__system_property_get2' declared herejni/resetprop/system_properties.cpp:97:3: error: unknown type name 'va_list'; did you mean '__va_list'?
va_list vl;
^~~~~~~
__va_list
/home/solar/Android/Sdk/ndk-bundle/platforms/android-21/arch-x86/usr/include/sys/types.h:129:27: note: '__va_list' declared here
int __system_property_get2(const char* name, char* value);
^
typedef __builtin_va_list __va_list;
^
jni/resetprop/resetprop.cpp:271:39: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
ret = __system_property_set2(name, value);
^~~~~
jni/resetprop/system_properties.h:96:52: note: passing argument to parameter 'value' here
int __system_property_get2(const char* name, char* value);
^
jni/resetprop/system_properties.cpp:98:3: error: use of undeclared identifier 'va_start'
va_start(vl, format);
^
jni/resetprop/system_properties.cpp:99:13: error: use of undeclared identifier 'vsnprintf'
int ret = vsnprintf(s, n, format, vl);
^
jni/resetprop/system_properties.cpp:100:3: error: use of undeclared identifier 'va_end'
va_end(vl);
^
jni/resetprop/resetprop.cpp:278:10: error: use of undeclared identifier '__system_property_set2'; did you mean
'__system_property_get2'?
ret = __system_property_set2(name, value);
^~~~~~~~~~~~~~~~~~~~~~
__system_property_get2
jni/resetprop/system_properties.h:96:5: note: '__system_property_get2' declared here
int __system_property_get2(const char* name, char* value);
^
jni/resetprop/resetprop.cpp:278:39: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
ret = __system_property_set2(name, value);
^~~~~
jni/resetprop/system_properties.h:96:52: note: passing argument to parameter 'value' here
int __system_property_get2(const char* name, char* value);
^
14 errors generated.
make: *** [obj/local/x86/objs/magisk/resetprop/resetprop.o] Error 1
make: *** Waiting for unfinished jobs....
jni/resetprop/system_properties.cpp:1012:3: error: unknown type name 'va_list'; did you mean '__va_list'?
va_list ap;
^~~~~~~
__va_list
/home/solar/Android/Sdk/ndk-bundle/platforms/android-21/arch-x86/usr/include/sys/types.h:129:27: note: '__va_list' declared here
typedef __builtin_va_list __va_list;
^
jni/resetprop/system_properties.cpp:1030:3: error: use of undeclared identifier 'va_start'
va_start(ap, num_args);
^
jni/resetprop/system_properties.cpp:1034:33: error: expected '(' for function-style cast or type construction
spec_entry = va_arg(ap, char**);
~~~~^
jni/resetprop/system_properties.cpp:1034:35: error: expected expression
spec_entry = va_arg(ap, char**);
^
jni/resetprop/system_properties.cpp:1037:7: error: use of undeclared identifier 'va_end'
va_end(ap);
^
jni/resetprop/system_properties.cpp:1043:7: error: use of undeclared identifier 'va_end'
va_end(ap);
^
jni/resetprop/system_properties.cpp:1048:3: error: use of undeclared identifier 'va_end'
va_end(ap);
^
jni/resetprop/system_properties.cpp:1053:3: error: unknown type name 'FILE'
FILE* file = fopen(filename, "re");
^
jni/resetprop/system_properties.cpp:1053:16: error: use of undeclared identifier 'fopen'; did you mean 'open'?
FILE* file = fopen(filename, "re");
^~~~~
open
/home/solar/Android/Sdk/ndk-bundle/platforms/android-21/arch-x86/usr/include/fcntl.h:73:12: note: 'open' declared here
extern int open(const char*, int, ...);
^
jni/resetprop/system_properties.cpp:1053:32: error: cannot initialize a parameter of type 'int' with an lvalue of type
'const char [3]'
FILE* file = fopen(filename, "re");
^~~~
/home/solar/Android/Sdk/ndk-bundle/platforms/android-21/arch-x86/usr/include/fcntl.h:73:33: note: passing argument to parameter here
extern int open(const char*, int, ...);
^
jni/resetprop/system_properties.cpp:1497:3: error: use of undeclared identifier '__system_property_wait2'; did you mean
'__system_property_add2'?
__system_property_wait2(nullptr, old_serial, &new_serial, nullptr);
^~~~~~~~~~~~~~~~~~~~~~~
__system_property_add2
jni/resetprop/system_properties.cpp:1449:5: note: '__system_property_add2' declared here
int __system_property_add2(const char* name, unsigned int namelen, const char* value,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [obj/local/x86/objs/magisk/resetprop/system_properties.o] Error 1
Build Magisk binary failed!
I'm building on Ubuntu 16.04 Xenial 64 bits.
It seems like the cmake or C libraries I have are older or not compatible with the one required by Magisk.
I'm out of ideas and I can't find any tutorials on compiling Magisk or any info on the errors above via Google.
Could you please help me out with some tips on what am I missing? I'd really appreciate it.
Thank you.
@easytotype Have you made sure that you're using the latest Android NDK?
Also, have you tried "sudo apt-get update && sudo apt-get upgrade"?
And, versionString and versionCode should be 14.4 and 1440, instead of 14.3 and 143 (it isn't related to this error, though)
Sent from my Samsung Galaxy Trend Plus using XDA Labs
DodoGTA said:
@easytotype Have you made sure that you're using the latest Android NDK? (...)
Click to expand...
Click to collapse
ndk was the problem indeed!
I had NDK v14,
installing the latest v15 solved the issue.
The facepalm was huge, but without your help I would have been for stuck much much longer.
Thank you very much @DodoGTA :good::good::good::good::good:

Magisk 18.1 build environment issues

Hi everyone, I'm having issues with compiling Magisk from a fresh environment. Has anyone had success building the latest Magisk, if so, what did your environment look like? Here is what I did...
Fresh Docker Ubuntu Instance
Installed Python3.7
Installed Android SDK Tools
Installed "ndk-bundle" "platform-tools" from sdkmanager
Downloaded/Extracted latest FrankeNDK
Set ANDROID_HOME to sdk path, and ANDROID_NDK_HOME to FrankeNDK path
Full clone w/submodule of Magisk Repo
Setup config.prop
python3 build.py -v binary
However this always produces the same linker error:
Code:
[armeabi-v7a] Executable : busybox
[armeabi-v7a] SharedLibrary : libsqlite.so
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/.[x86] SharedLibrary : libsqlite.so
./../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o:1:3: invalid character
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o:1:3: syntax error, unexpected $end
/root/dev/android/FrankeNDK/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: ./obj/local/armeabi-v7a/objs/sqlite/stubs/sqlite3_stub.o: not an object or archive
collect2: error: ld returned 1 exit status
make: *** [obj/local/armeabi-v7a/libsqlite.so] Error 1
make: *** Waiting for unfinished jobs....
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o:1:3: invalid character
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o:1:3: syntax error, unexpected $end
/root/dev/android/FrankeNDK/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: error: ./obj/local/x86/objs/sqlite/stubs/sqlite3_stub.o: not an object or archive
collect2: error: ld returned 1 exit status
make: *** [obj/local/x86/libsqlite.so] Error 1
make: Leaving directory `/root/dev/android/Magisk/native'
Build binary failed!
I opened an issue on GitHub:1167 and TJW indicated that the linker is missing flags -flto. However, I didn't mess with anything and the default file of /native/jni/Application.mk:APP_LDFLAGS := -flto contains those flags. Is there anything else I could try to get the build to work? Thanks

How to compile Samsung S10 kernel for Exynos 9820?

I tried the following:
Download toolchain from https://android.googlesource.com/pl....9/+/e54105c9f893a376232e0fc539c0e7c01c829b1e
Download clang-4639204
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
sudo apt-get install flex bison
sudo apt-get install libelf-dev
export CROSS_COMPILE=/home/gilius/Desktop/tool/bin/aarch64-linux-android-
export ARCH=arm64
enter the 9820 directory
sudo -i
make xynos9820-beyond2lte_defconfig
make -j10
Am getting the following errors:
Code:
arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
arch/arm64/Makefile:57: Detected assembler with broken .inst; disassembly will be unreliable
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
CHK include/config/kernel.release
../PLATFORM/prebuilts/clang/host/linux-x86/clang-4639204/bin/clang.real: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make: *** [Makefile:1244: prepare-compiler-check] Error 1
make: *** Waiting for unfinished jobs....
Hi,
for me : sudo ln -s /usr/lib/libtinfo.so /usr/lib/libtinfo.so.5 did the trick but I am now stuck with some assembly instructions "not existing" errors when compiling arch/arm64/kernel/vdso/gettimeofday.S
did you made any progress?
Update : linking libtinfo.so.6 to libtinfo.so.5 solved it but also failed with :
scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:251:2: erreur: #error New address family defined, please update secclass_map.
251 | #error New address family defined, please update secclass_map.
| ^~~~~
make[3]: *** [scripts/Makefile.host:102: scripts/selinux/genheaders/genheaders] Error 1
make[2]: *** [scripts/Makefile.build:673: scripts/selinux/genheaders] Error 2
make[1]: *** [scripts/Makefile.build:673: scripts/selinux] Error 2
make: *** [Makefile:607: scripts] Error 2
I am currently trying it on archlinux and the ncurses5-compat-libs package didn't put a new library in my path I will try later on another distro see if it's just a library error.
Update 2 :
Compiled fine using rhel 8, I had to install ncurses compat libs and create a symbolic link from python2 to python in my $PATH.
Does it boot?
Does your kernel boot?
Mine, keep stuck at Samsung logo
Akugila said:
Does your kernel boot?
Mine, keep stuck at Samsung logo
Click to expand...
Click to collapse
Non, I can't even go further the unlocked warning screen, but my repacking of the image is wrong, my new image is always lighter than the original, I am using magiskboot to do it. How are you doing it ?
try AIK
shmsh9 said:
Non, I can't even go further the unlocked warning screen, but my repacking of the image is wrong, my new image is always lighter than the original, I am using magiskboot to do it. How are you doing it ?
Click to expand...
Click to collapse
Ahh, fool me. it's stuck at warning screen too (forgot there are another samsung logo during boot)
I use AIK [https://forum.xda-developers.com/showthread.php?t=2073775] for packing, the size is the same with original (I use "Image" file)
kernel build error: expected parameter declarator
Did you get these compilation errors?
In file included from kernel/bounds.c:10:
In file included from ./include/linux/page-flags.h:10:
In file included from ./include/linux/bug.h:5:
In file included from ./arch/arm64/include/asm/bug.h:37:
In file included from ./include/asm-generic/bug.h:16:
In file included from ./include/linux/kernel.h:14:
./include/linux/printk.h:149:24: error: expected parameter declarator
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:24: error: expected ')'
./include/linux/printk.h:149:23: note: to match this '('
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
static inline __printf(1, 2) __cold
^
void
./include/linux/printk.h:149:29: error: expected ';' after top level declarator
static inline __printf(1, 2) __cold
^
Linaro 4.9.4 aarch64-linux-gnu compiler tools for S10 5G kernel build
floor51 said:
Did you get these compilation errors?
In file included from kernel/bounds.c:10:
In file included from ./include/linux/page-flags.h:10:
In file included from ./include/linux/bug.h:5:
In file included from ./arch/arm64/include/asm/bug.h:37:
In file included from ./include/asm-generic/bug.h:16:
In file included from ./include/linux/kernel.h:14:
./include/linux/printk.h:149:24: error: expected parameter declarator
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:24: error: expected ')'
./include/linux/printk.h:149:23: note: to match this '('
static inline __printf(1, 2) __cold
^
./include/linux/printk.h:149:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
static inline __printf(1, 2) __cold
^
void
./include/linux/printk.h:149:29: error: expected ';' after top level declarator
static inline __printf(1, 2) __cold
^
Click to expand...
Click to collapse
I found that using the Linaro 4.9.4 aarch64-linux-gnu compiler tools solved this:
https://releases.linaro.org/compone...4.9.4-2017.01-x86_64_aarch64-linux-gnu.tar.xz
I was previously using the toolchain that is in ianmacd's github repo here:
https://github.com/ianmacd/beyond2l...p/gcc-cfp-jopp-only/aarch64-linux-android-4.9
I changed this:
#CROSS_COMPILE ?= $(srctree)/toolchain/gcc-cfp/gcc-cfp-jopp-only/aarch64-linux-android-4.9/bin/aarch64-linux-android-
...to:
CROSS_COMPILE ?= ~/dev/projects/android/kernel/gcc-linaro-4.9.4-2017.01-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
I also used Linaro for CLANG_TRIPLE.
And I used clang for CC:
CC = ~/dev/projects/android/kernel/clang-4639204/bin/clang
...from here:
https://android.googlesource.com/pl...archive/android-9.0.0_r1/clang-4639204.tar.gz
All that info would have helped me a lot anyway. Hope it helps someone. Not that I've tried the image on device yet.
Hey,
I have managed to build the kernel by following the instructions in the samsung readme.
Code:
$ export ANDROID_MAJOR_VERSION=p
$ make ARCH=arm64 exynos9820-d2s_defconfig
$ make ARCH=arm64
I end up with an Image file and Image.gz with the same Image file inside. I'm not sure if this has built correctly as people talk about being able to use Android kitchen or similar unpacker to unpack and repack the img file. With the Image file I receive it is incompatible with Android Kitchen and another Perl unpacker I have tried.
When you compile your kernel do you get an Image.img file? Or the same as me, just Image, and if so, how do you make it usable?
JPNZ4 said:
Hey,
I have managed to build the kernel by following the instructions in the samsung readme.
Code:
$ export ANDROID_MAJOR_VERSION=p
$ make ARCH=arm64 exynos9820-d2s_defconfig
$ make ARCH=arm64
I end up with an Image file and Image.gz with the same Image file inside. I'm not sure if this has built correctly as people talk about being able to use Android kitchen or similar unpacker to unpack and repack the img file. With the Image file I receive it is incompatible with Android Kitchen and another Perl unpacker I have tried.
When you compile your kernel do you get an Image.img file? Or the same as me, just Image, and if so, how do you make it usable?
Click to expand...
Click to collapse
glad to hear that you could build the kernel.
could you please elaborate which build env you used and which version?
make clean destroys my build env and i needed some patches to make it even compile in the first place.
could you run the kernel successfully on the device?

Categories

Resources