• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Build CyanogenMod7 from source | Development area

I get a whole bunch of errors similar to this:

out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:239: error: 'rpc_uint16' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:349: error: 'rpc_uint32' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:350: error: 'rpc_uint32' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:354: error: 'rpc_uint16' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:398: error: 'rpc_uint16' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:405: error: 'rpc_uint16' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:413: error: 'rpc_uint16' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:452: error: 'rpc_uint16' does not name a type

.
.
pp:45:
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:34: warning: 'loc_eng_callback_log_header' initialized and declared 'extern'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:34: error: 'rpc_loc_client_handle_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:35: error: 'rpc_loc_event_mask_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:36: error: expected primary-expression before 'const'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:37: error: initializer expression list treated as compound expression
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:40: warning: 'loc_eng_callback_log' initialized and declared 'extern'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:40: error: 'rpc_loc_event_mask_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:41: error: expected primary-expression before 'const'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:42: error: initializer expression list treated as compound expression
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:44: warning: 'loc_get_event_name' initialized and declared 'extern'


Looks like a lot of stuff didn't get initialized basically.

Oh my bad. I forgot to change a repo over. There was a missing header for the new qcom gps stuff. Will do that later.

For now, save this (https://raw.github.com/ikarosdev/an...34e6a7c84/librpc-qcom/commondefs_rpcgen_rpc.h) as commondefs_rpcgen_rpc.h in ~/android/system/hardware/msm7k/librpc-qcom and rebuild. It should work then.
 
Upvote 0
Thanks Isaac and Ticker.

I did end up resyncing again and then putting the commondefs_rpcgen_rpc.h in the appropriate folder and then trying another build.

I still get some errors. It doesn't look like the errors are part of the qcom libraries being borked but I could be wrong... Here's some of them.

These are just warnings so probably wasn't stopping the build:

...
out/target/common/obj/APPS/CMWimaxSettings_intermediates/src/com/android/settings/wimax/R.java:128: warning: unmappable character for encoding ascii
<string name="wimax_advanced_signal_strength_db_title">&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; (&#65533;&#65533;&#65533;&#65533;)</string>
^
out/target/common/obj/APPS/CMWimaxSettings_intermediates/src/com/android/settings/wimax/R.java:128: warning: unmappable character for encoding ascii
<string name="wimax_advanced_signal_strength_db_title">&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; &#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533;&#65533; (&#65533;&#65533;&#65533;&#65533;)</string>
...

Later in the process:

target Java: Browser (out/target/common/obj/APPS/Browser_intermediates/classes)
target Java: CMParts (out/target/common/obj/APPS/CMParts_intermediates/classes)
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/LockscreenWidgetsActivity.java:24: cannot find symbol
symbol : class MultiSelectListPreference
location: package android.preference
import android.preference.MultiSelectListPreference;
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/LockscreenWidgetsActivity.java:79: cannot find symbol
symbol : class MultiSelectListPreference
location: class com.cyanogenmod.cmparts.activities.LockscreenWidgetsActivity
private MultiSelectListPreference mCalendarsPref;
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/LockscreenWidgetsActivity.java:135: cannot find symbol
symbol : class MultiSelectListPreference
location: class com.cyanogenmod.cmparts.activities.LockscreenWidgetsActivity
mCalendarsPref = (MultiSelectListPreference) prefSet.findPreference(LOCKSCREEN_CALENDARS);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/LockscreenWidgetsActivity.java:137: cannot find symbol
symbol : variable LOCKSCREEN_CALENDARS
location: class android.provider.Settings.System
Settings.System.LOCKSCREEN_CALENDARS));
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/LockscreenWidgetsActivity.java:153: cannot find symbol
symbol : variable LOCKSCREEN_CALENDAR_LOOKAHEAD
location: class android.provider.Settings.System
Settings.System.LOCKSCREEN_CALENDAR_LOOKAHEAD, 10800000);

...

the final error before the build process stopped:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
11 errors
make: *** [out/target/common/obj/APPS/CMParts_intermediates/classes-full-debug.jar] Error 41

It looks like these errors are from the apps and cmparts and lockscreen area. I assume this is because you're working on making that rotating lockscreen work?
 
Upvote 0
just an fyi

Code:
curl [URL]http://android.git.kernel.org/repo[/URL] > ~/bin/repo
isnt going to work until kernel.org is back up.

Kernel.org hacked – how to get Android repo? mindexception: out of context

has a working copy:

Code:
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
hope it helps if you did like me and forgot which Hdd had your build env on it and wiped it installing 11.10beta :mad:
 
Upvote 0
I finally got around to fixing it. It *should* be okay now. Let me know.

I'll give it a try now. Thanks!

EDIT: So I repo sync'ed and then tried building.

It stopped with this:

make: *** No rule to make target `device/motorola/triumph/init.qcom.rc', needed by `out/target/product/triumph/root/init.qcom.rc'. Stop.


BTW, thanks a lot for all of the help that both of you have given so far. First time trying to build from source. :)

Edit2: So after looking through everything, it looks like the file `device/motorola/triumph/init.qcom.rc' is missing--at least in my environment. I did a repo and nothing came down. I assume this is one of the files that Tickerguy is still working on for the gps/qcom stuff?
 
Upvote 0
I'll give it a try now. Thanks!

EDIT: So I repo sync'ed and then tried building.

It stopped with this:

make: *** No rule to make target `device/motorola/triumph/init.qcom.rc', needed by `out/target/product/triumph/root/init.qcom.rc'. Stop.


BTW, thanks a lot for all of the help that both of you have given so far. First time trying to build from source. :)

Edit2: So after looking through everything, it looks like the file `device/motorola/triumph/init.qcom.rc' is missing--at least in my environment. I did a repo and nothing came down. I assume this is one of the files that Tickerguy is still working on for the gps/qcom stuff?

No, it was a goof on my part. Fixed. :)

https://github.com/ikarosdev/androi...mmit/7c3cef1a7fe9c7ff5d38a45f443f27ee46d03e7a

A repo sync should fix it.
 
Upvote 0
Ok, so I resynced and now the build has errors like this:
rpc.h:106: error: 'rpc_loc_position_valid_mask_type' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:109: error: 'rpc_uint64' does not name a type

out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:568: error: 'rpc_loc_server_connection_handle' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:574: error: 'rpc_loc_server_connection_handle' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:604: error: 'rpc_uint16' does not name a type

<text removed>

hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:441: error: 'struct loc_eng_data_s_type' has no member named 'client_handle'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:441: error: 'loc_start_fix' cannot be used as a function
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp: In function 'int loc_eng_stop()':

<text removed>

hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:37: error: initializer expression list treated as compound expression
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:40: warning: 'loc_eng_callback_log' initialized and declared 'extern'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:40: error: 'rpc_loc_event_mask_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:41: error: expected primary-expression before 'const'

<text removed>

hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:973: error: 'rpc_loc_client_handle_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:974: error: 'rpc_loc_event_mask_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:975: error: expected primary-expression before 'const'
make: *** [out/target/product/triumph/obj/SHARED_LIBRARIES/gps.triumph_intermediates/loc_eng.o] Error 1
 
Upvote 0
Ok, so I resynced and now the build has errors like this:

rpc.h:528: error: 'rpc_uint32' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:529: error: 'rpc_uint64' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:549: error: 'rpc_uint32' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:568: error: 'rpc_loc_server_connection_handle' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:574: error: 'rpc_loc_server_connection_handle' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:604: error: 'rpc_uint16' does not name a type

<text removed>

hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:973: error: 'rpc_loc_client_handle_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:974: error: 'rpc_loc_event_mask_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:975: error: expected primary-expression before 'const'
make: *** [out/target/product/triumph/obj/SHARED_LIBRARIES/gps.triumph_intermediates/loc_eng.o] Error 1

Haha, damn it. Alright, I forgot something again. ;) Will fix.
 
Upvote 0
Ok, so I resynced and now the build has errors like this:
rpc.h:106: error: 'rpc_loc_position_valid_mask_type' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:109: error: 'rpc_uint64' does not name a type

out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:568: error: 'rpc_loc_server_connection_handle' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:574: error: 'rpc_loc_server_connection_handle' does not name a type
out/target/product/triumph/obj/include/loc_api/rpcgen/inc/loc_api_rpcgen_common_rpc.h:604: error: 'rpc_uint16' does not name a type

<text removed>

hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:441: error: 'struct loc_eng_data_s_type' has no member named 'client_handle'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:441: error: 'loc_start_fix' cannot be used as a function
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp: In function 'int loc_eng_stop()':

<text removed>

hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:37: error: initializer expression list treated as compound expression
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:40: warning: 'loc_eng_callback_log' initialized and declared 'extern'
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:40: error: 'rpc_loc_event_mask_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng_log.h:41: error: expected primary-expression before 'const'

<text removed>

hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:973: error: 'rpc_loc_client_handle_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:974: error: 'rpc_loc_event_mask_type' was not declared in this scope
hardware/qcom/gps/loc_api/libloc_api_50001/loc_eng.cpp:975: error: expected primary-expression before 'const'
make: *** [out/target/product/triumph/obj/SHARED_LIBRARIES/gps.triumph_intermediates/loc_eng.o] Error 1

Alright, repo sync and give it another go.
 
Upvote 0
hey guys when i get another computer for development im gonna try to build from source.... how hard is it to setup and do?

Isaac's instructions are pretty good. The only hitch in setting up the environment atm is that kernel.org is down until further notice so you need to get repo from a different location for now. Which you can download from Code Aurora by googling or using the link posted by ducky12432 earlier in this thread or by manually downloading from

repo-1.12 - git-repo - repo Launcher 1.12 - repo - The multiple repository tool - Google Project Hosting

@isaac: And trying to build again now.
 
Upvote 0
Well the build was finally successful and I got an update.zip file! Thanks...

Now, to figure out why the build doesn't boot up...

Edit: So I did a compare with Tickerguy's 10/2 build that he just uploaded and my build from your github and there's a whole bunch of stuff different... Seems that the build on github was updated to the latest cm7 (2.3.7) compared to the 2.3.5 in Tickerguy's 10/2 build.
 
Upvote 0
Well the build was finally successful and I got an update.zip file! Thanks...

Now, to figure out why the build doesn't boot up...

Edit: So I did a compare with Tickerguy's 10/2 build that he just uploaded and my build from your github and there's a whole bunch of stuff different... Seems that the build on github was updated to the latest cm7 (2.3.7) compared to the 2.3.5 in Tickerguy's 10/2 build.

It doesn't boot? That's odd. Do you have ADB setup? Let me see what's in the logcat. Admittedly, I haven't built CM7 for almost 2 weeks now so I'm not up-to-date myself.
 
Upvote 0
I do have adb and I tried doing a "adb logcat" but it just stays at "waiting for device" and never actually syncs up to my phone to start outputting stuff.

My phone just stays at the first motorola M splash screen and doesn't go beyond that.

Oh and I cleared everything data, cache, system, dalvik, etc, before flashing.
 
Upvote 0
I do have adb and I tried doing a "adb logcat" but it just stays at "waiting for device" and never actually syncs up to my phone to start outputting stuff.

My phone just stays at the first motorola M splash screen and doesn't go beyond that.

Oh and I cleared everything data, cache, system, dalvik, etc, before flashing.

That means it's not booting AT ALL. Hmm, weird. I'm about to run a build myself, so I'll let you know what's up.
 
Upvote 0
That means it's not booting AT ALL. Hmm, weird. I'm about to run a build myself, so I'll let you know what's up.

I just resynced and then rebuilt again. This time the build is still stuck at the M logo but adb logcat was able to get some stuff. I've attached the text file I made if that will give us a little hint of what's going on.

Looks like this is the problem:

I/dalvikvm( 885): System server process 888 has been created
I/Zygote ( 885): Accepting command socket connections
D/AndroidRuntime( 888): Shutting down VM
W/dalvikvm( 888): threadid=1: thread exiting with uncaught exception (group=0x2aac0560)
I/Process ( 888): Sending signal. PID: 888 SIG: 9
E/AndroidRuntime( 888): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
E/AndroidRuntime( 888): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1962]: 885 could not load needed library 'libsystem_server.so' for 'libandroid_servers.so' (link_image[1962]: 885 could not load needed library 'libcameraservice.so' for 'libsystem_server.so' (reloc_library[1311]: 885 cannot locate 'HAL_getCameraInfo'...
E/AndroidRuntime( 888): ))
E/AndroidRuntime( 888): at java.lang.Runtime.loadLibrary(Runtime.java:455)
E/AndroidRuntime( 888): at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 888): at com.android.server.SystemServer.main(SystemServer.java:712)
E/AndroidRuntime( 888): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 888): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 888): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
E/AndroidRuntime( 888): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
E/AndroidRuntime( 888): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 888): Error reporting crash
E/AndroidRuntime( 888): java.lang.NullPointerException
E/AndroidRuntime( 888): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
E/AndroidRuntime( 888): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
E/AndroidRuntime( 888): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)
E/AndroidRuntime( 888): at dalvik.system.NativeStart.main(Native Method)
I/Zygote ( 885): Exit zygote because system server (888) has terminated
I/Netd ( 898): Netd 1.0 starting
D/AndroidRuntime( 902):
D/AndroidRuntime( 902): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
I/AndroidRuntime( 902): Heap size: -Xmx32m
D/AndroidRuntime( 902): CheckJNI is OFF
D/dalvikvm( 902): creating instr width table
I/SamplingProfilerIntegration( 902): Profiler is disabled.
I/Zygote ( 902): Preloading classes...
D/dalvikvm( 902): GC_EXPLICIT freed 47K, 77% free 236K/1024K, external 0K/0K, paused
 

Attachments

  • file.zip
    22 KB · Views: 50
Upvote 0
I just resynced and then rebuilt again. This time the build is still stuck at the M logo but adb logcat was able to get some stuff. I've attached the text file I made if that will give us a little hint of what's going on.

Looks like this is the problem:

I/dalvikvm( 885): System server process 888 has been created
I/Zygote ( 885): Accepting command socket connections
D/AndroidRuntime( 888): Shutting down VM
W/dalvikvm( 888): threadid=1: thread exiting with uncaught exception (group=0x2aac0560)
I/Process ( 888): Sending signal. PID: 888 SIG: 9
E/AndroidRuntime( 888): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
E/AndroidRuntime( 888): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1962]: 885 could not load needed library 'libsystem_server.so' for 'libandroid_servers.so' (link_image[1962]: 885 could not load needed library 'libcameraservice.so' for 'libsystem_server.so' (reloc_library[1311]: 885 cannot locate 'HAL_getCameraInfo'...
E/AndroidRuntime( 888): ))
E/AndroidRuntime( 888): at java.lang.Runtime.loadLibrary(Runtime.java:455)
E/AndroidRuntime( 888): at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 888): at com.android.server.SystemServer.main(SystemServer.java:712)
E/AndroidRuntime( 888): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 888): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 888): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
E/AndroidRuntime( 888): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
E/AndroidRuntime( 888): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 888): Error reporting crash
E/AndroidRuntime( 888): java.lang.NullPointerException
E/AndroidRuntime( 888): at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
E/AndroidRuntime( 888): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
E/AndroidRuntime( 888): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)
E/AndroidRuntime( 888): at dalvik.system.NativeStart.main(Native Method)
I/Zygote ( 885): Exit zygote because system server (888) has terminated
I/Netd ( 898): Netd 1.0 starting
D/AndroidRuntime( 902):
D/AndroidRuntime( 902): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<<
I/AndroidRuntime( 902): Heap size: -Xmx32m
D/AndroidRuntime( 902): CheckJNI is OFF
D/dalvikvm( 902): creating instr width table
I/SamplingProfilerIntegration( 902): Profiler is disabled.
I/Zygote ( 902): Preloading classes...
D/dalvikvm( 902): GC_EXPLICIT freed 47K, 77% free 236K/1024K, external 0K/0K, paused

Ah, okay I think I know what's going on. I'll try and fix it.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones