FORUMS

OnePlus Addresses Reservation List Cheating

Jake Cooper figured out how to bump his place up on OnePlus’ reservation list and … more

OnePlus 2 Benchmark Scores Show Its Muscle

This video by FoneArena contains all the popular benchmarks being tested on the OnePlus 2, … more

Sony’s Emergence in The Middle: Is The Price Right?

Sony’s Electronics Division is not in its best days, and its smartphone … more

HTC Delivering Ads Straight to Sense Home

HTC’s 2015 has been a year marked by a desperate search for revenue.The HTC One M9 … more

[DEV] Docker template for building CyanogenMod

160 posts
Thanks Meter: 148
 
By michael_ch, Senior Member on 16th February 2014, 01:03 PM
Post Reply Subscribe to Thread Email Thread
1st March 2015, 01:43 PM |#61  
OP Senior Member
Thanks Meter: 148
 
More
Post
Quote:
Originally Posted by todivefor

Finger slip, jfltespr. It is the Sprint variant for the Samsung Galaxy S4. Haven't tried any others. I plan to try grouper next.

Let me know if it fails there as well.
 
 
1st March 2015, 06:45 PM |#62  
todivefor's Avatar
Senior Member
Pittsburgh, PA
Thanks Meter: 98
 
More
Got the same result with grouper:

collect2: error: ld terminated with signal 9 [Killed]
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol '__system_property_get' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/base_base_gyp_intermediates/base_base_gyp.a(sys_info_android.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libcutils.so
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::lockPixels() const' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libjnigraphics.so
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::unlockPixels() const' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libjnigraphics.so
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::notifyPixelsChanged() const' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libjnigraphics.so
make: *** [/home/cmbuild/android/out/target/product/grouper/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
root@e4de81b8f6a5:/home/cmbuild/android#
1st March 2015, 08:53 PM |#63  
todivefor's Avatar
Senior Member
Pittsburgh, PA
Thanks Meter: 98
 
More
Quote:
Originally Posted by todivefor

Got the same result with grouper:

collect2: error: ld terminated with signal 9 [Killed]
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol '__system_property_get' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/base_base_gyp_intermediates/base_base_gyp.a(sys_info_android.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libcutils.so
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::lockPixels() const' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libjnigraphics.so
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::unlockPixels() const' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libjnigraphics.so
/home/cmbuild/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::notifyPixelsChanged() const' in /home/cmbuild/android/out/target/product/grouper/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO /home/cmbuild/android/out/target/product/grouper/obj/lib/libjnigraphics.so
make: *** [/home/cmbuild/android/out/target/product/grouper/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
root@e4de81b8f6a5:/home/cmbuild/android#

@michael_ch What is a known working build that I can try?
1st March 2015, 11:18 PM |#64  
OP Senior Member
Thanks Meter: 148
 
More
Post
Quote:
Originally Posted by todivefor

@michael_ch What is a known working build that I can try?

After searching about your problem, I don't think it has to do with the target device.

It just seems like your Docker container doesn't have enough memory (RAM) available. Check these links about the collect2 error which seems to be the starting point of your problems:

- http://stackoverflow.com/questions/5...-i-build-clang
- http://stackoverflow.com/questions/2...r-to-liblto-so

Docker uses all available memory so it seems like your computer can't provide enough of it. What you can do though, is to use more swap space and use that explicitely by running "docker run -m=<n>" (eg. "4g"). However, I'm pretty sure this will terribly slow down your build time... For more on "docker run", check https://docs.docker.com/reference/ru...cpu-and-memory.
4th March 2015, 12:37 PM |#65  
todivefor's Avatar
Senior Member
Pittsburgh, PA
Thanks Meter: 98
 
More
@michael_ch finally got this to work. The links you provided me were spot on. I have a ubuntu VM I use to try to learn a little about linux. I tried all this as an exercise to learn more about linux and docker and less about compiling CM. My VM was initially set at 1G, didn't work. I tried 4G and 8G, neither worked. I bumped it it up to 12G and set swap to 10G, which worked. I will try to boot my built CM12, but not my intended goal. Several years ago, I setup a build environment for CM, maybe CM9, but this is much slicker. It was a good learning experience. Thank you.
4th March 2015, 12:39 PM |#66  
OP Senior Member
Thanks Meter: 148
 
More
Smile
Quote:
Originally Posted by todivefor

@michael_ch finally got this to work. The links you provided me were spot on. I have a ubuntu VM I use to try to learn a little about linux. I tried all this as an exercise to learn more about linux and docker and less about compiling CM. My VM was initially set at 1G, didn't work. I tried 4G and 8G, neither worked. I bumped it it up to 12G and set swap to 10G, which worked. I will try to boot my built CM12, but not my intended goal. Several years ago, I setup a build environment for CM, maybe CM9, but this is much slicker. It was a good learning experience. Thank you.

Thanks for the feedback, you're welcome!
31st March 2015, 10:36 PM |#67  
OP Senior Member
Thanks Meter: 148
 
More
Post New Release v0.3.0
Hey folks! I just published a new release of the box. Now is a good time to create your own build of the upcoming CyanogenMod 12.1:

Code:
repo init -u git://github.com/CyanogenMod/android.git -b staging/cm-12.1
repo sync -j 16
source build/envsetup.sh
make clean
brunch <device codename>      # example: brunch grouper
Have fun!
The Following User Says Thank You to michael_ch For This Useful Post: [ View ]
1st May 2015, 11:10 PM |#68  
Senior Member
Thanks Meter: 43
 
More
Prompt Help!
Hi, I am using ubuntu 14.04 (32bit) in a virtual box, docker was installed using apt-get.
me@alderaan:~/docker-cyanogenmod$ sudo docker version
Client version: 1.0.1
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 990021a
Server version: 1.0.1
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 990021a

After git clone, I could not find the mentioned build .sh skript. I ran run.sh instead, which fails after a few seconds with this message:
me@alderaan:~/docker-cyanogenmod$ sudo ./run.sh
Building Docker image stucki/cyanogenmod:cm-12.1...
Sending build context to Docker daemon 97.79 kB
Sending build context to Docker daemon
Step 0 : FROM ubuntu:14.04
---> 07f8e8c5e660
Step 1 : MAINTAINER Michael Stucki <mundaun@gmx.ch>
---> Using cache
---> b91b62d5475c
Step 2 : ENV DEBIAN_FRONTEND noninteractive
---> Using cache
---> 9f32d4a8e6cb
Step 3 : RUN sed -i 's/main$/main universe/' /etc/apt/sources.list
---> Running in 6e9bab42861a
2015/05/01 22:07:23 exec format error
2015/05/02 00:07:25 The command [/bin/sh -c sed -i 's/main$/main universe/' /etc/apt/sources.list] returned a non-zero code: 1
Unable to find image 'stucki/cyanogenmod:cm-12.1' locally
Pulling repository stucki/cyanogenmod
2015/05/02 00:07:26 HTTP code: 404

Could anyone pooint me into a direction how to move on?

Is the fact that I am trying on a 32bit guest system the reason for this error?

UPDATE: Nevermind, my machine (Intel Core2Quad 8200) does not support hardware virtualization, so I'm not able to emulate 64bit OS and thus wont be able to build CM. I'm still not sure if thats the cause for the above error, but I guess I'll stop trying until I get a new pc ...
Last edited by muff99; 1st May 2015 at 11:41 PM.
3rd May 2015, 03:05 PM |#69  
OP Senior Member
Thanks Meter: 148
 
More
Lightbulb
Hi!
Quote:
Originally Posted by muff99

Hi, I am using ubuntu 14.04 (32bit) in a virtual box, docker was installed using apt-get.
me@alderaan:~/docker-cyanogenmod$ sudo docker version
Client version: 1.0.1

That's a really old Docker version. However I understand it's the version which is shipped with stock Ubuntu. Please try again using the repository provided by Docker:
https://get.docker.io/ubuntu/ / https://docs.docker.com/installation/ubuntulinux/

Quote:
Originally Posted by muff99

After git clone, I could not find the mentioned build .sh skript. I ran run.sh instead, which fails after a few seconds with this message:
me@alderaan:~/docker-cyanogenmod$ sudo ./run.sh
Building Docker image stucki/cyanogenmod:cm-12.1...
...
Step 3 : RUN sed -i 's/main$/main universe/' /etc/apt/sources.list
---> Running in 6e9bab42861a
2015/05/01 22:07:23 exec format error
2015/05/02 00:07:25 The command [/bin/sh -c sed -i 's/main$/main universe/' /etc/apt/sources.list] returned a non-zero code: 1

I will update the OP and fix the wrong reference on build.sh. Running run.sh is fine (it includes the "docker build" functionality now).
I wonder why step 3 fails on your system. It shouldn't occur with the latest Docker ubuntu:14.04 image. Please try to update it:
Code:
docker pull ubuntu:14.04
After that, edit run.sh and set "FORCE_BUILD=1". Then run the script again. (Make sure to set it back to 0 after your Docker image is built.)

Quote:
Originally Posted by muff99

Could anyone pooint me into a direction how to move on?

Is the fact that I am trying on a 32bit guest system the reason for this error?

UPDATE: Nevermind, my machine (Intel Core2Quad 8200) does not support hardware virtualization, so I'm not able to emulate 64bit OS and thus wont be able to build CM. I'm still not sure if thats the cause for the above error, but I guess I'll stop trying until I get a new pc ...

Never mind. I hope these answers can help someone else who has a similar problem...
18th May 2015, 11:34 PM |#70  
xdajog's Avatar
Senior Member
Thanks Meter: 434
 
Donate to Me
More
Talking
Quote:
Originally Posted by michael_ch

Hey folks! I just published a new release of the box. Now is a good time to create your own build of the upcoming CyanogenMod 12.1:

Code:
repo init -u git://github.com/CyanogenMod/android.git -b staging/cm-12.1
repo sync -j 16
source build/envsetup.sh
make clean
brunch <device codename>      # example: brunch grouper
Have fun!



This is so great. Thanks for doing this and keeping it updated!!!
Highly appreciated!
Post Reply Subscribe to Thread

Tags
build, compile, cyanogenmod, docker
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes