Jump to content

[solved] Problem Getting Cyanogenmod 7 to compile


Guest StevenHarperUK

Recommended Posts

Guest StevenHarperUK

Hi,

I am trying to get Cyanogenmod 7 to compile on my Ubuntu 10.10 64bit machine.

I am stuck at running the make -j2 bacon (just after running lunch)

I am following these general instructions - http://forum.cyanogenmod.com/topic/16563-i...__gopid__145734

I want to try and get the guide in the Wiki for the blade done (at cyanogenmod), but if I can't get it working then I can't put it up.

I haven't installed adb - but do I need to?

Edit: I have added adb to my PATH - no difference

I get the error

/android/cm7$ make -j2 bacon
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.2
TARGET_PRODUCT=cyanogen_blade
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
build/core/base_rules.mk:475: warning: overriding commands for target `out/target/product/blade/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/blade/recovery/root/sbin/tune2fs'
find: ‘../../libcore/luni/src/main/java/javax’: No such file or directory
find: ‘../../libcore/luni/src/main/java/org/xml/sax’: No such file or directory
find: ‘../../libcore/luni/src/main/java/org/w3c’: No such file or directory
find: ‘../../libcore/xml/src/main/java/org/xmlpull/v1’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
build/core/java.mk:9: *** libcore: Target java module does not define any source or resource files. Stop.[/code]

Anyone got any ideas?

Link to comment
Share on other sites

Guest StevenHarperUK

Same error?

And was this your first time building? or have you done it before?

I have not seen the error anywhere and have spent several hours looking (everywhere).

I know my way round linux/android/coding but there is very little clues on this one

Link to comment
Share on other sites

Guest JimJam707
Same error?

And was this your first time building? or have you done it before?

I have not seen the error anywhere and have spent several hours looking (everywhere).

I know my way round linux/android/coding but there is very little clues on this one

Pretty much the same error. I don't remember as it was at around 6am this morning XD

This was my first time building. I did a fresh repo sync and then did the build commands and then, that happened.

Link to comment
Share on other sites

Guest paulgdp

I have the exact same configuration (Ubuntu 10.10 64 bits) and I don't have any problems compiling cyanogenmod.

Here is my buildlog : http://pastebin.com/JLGUGj0E

and after doing a "make clean" I still don't have any problems...

This doesn't look to be a problem on the cyanogenmod's side nor ubuntu's one.

Link to comment
Share on other sites

Guest StevenHarperUK
Pretty much the same error. I don't remember as it was at around 6am this morning XD

This was my first time building. I did a fresh repo sync and then did the build commands and then, that happened.

Exactly what I tried today - I wanted to put my powers of C and Java to more good, but this is holding me back.

I wounder if someone who has been compiling for the past few days/weeks is seeing the same problem?

EDIT : Tried a make clean - no change - thanks for the tip thou paulgdp

Link to comment
Share on other sites

Guest Simon O

I think it's more to do with the guide you were given. After running

source build/envsetup.sh
I just do
brunch blade -j4 bacon

which builds CM7 for the blade then optimizes the final build (the bacon part).

The guide by fonix isn't applicable to building official CM builds now. You don't use lunch/make.

Edited by flibblesan
Link to comment
Share on other sites

Guest JimJam707
I think it's more to do with the guide you were given. After running

source build/envsetup.sh
I just do
brunch blade -j4 bacon

which builds CM7 for the blade then optimizes the final build (the bacon part).

The guide by fonix isn't applicable to building official CM builds now. You don't use lunch/make.

Oooooh. Thanks :huh:

Link to comment
Share on other sites

Guest StevenHarperUK
source build/envsetup.sh
I just do
brunch blade -j4 bacon
Still get same problem (see below) DO you want me to give you every command I have run to get here (same as the guide - but with nightly 6) EDIT : did it fix it for you JimJam707?
 brunch blade -j2 bacon
including vendor/cyanogen/vendorsetup.sh

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.2
TARGET_PRODUCT=cyanogen_blade
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.2
TARGET_PRODUCT=cyanogen_blade
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
build/core/base_rules.mk:475: warning: overriding commands for target `out/target/product/blade/recovery/root/sbin/tune2fs'
bootable/recovery/Android.mk:87: warning: ignoring old commands for target `out/target/product/blade/recovery/root/sbin/tune2fs'
find: ‘../../libcore/luni/src/main/java/javax’: No such file or directory
find: ‘../../libcore/luni/src/main/java/org/xml/sax’: No such file or directory
find: ‘../../libcore/luni/src/main/java/org/w3c’: No such file or directory
find: ‘../../libcore/xml/src/main/java/org/xmlpull/v1’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
find: ‘out/target/common/docs/gen’: No such file or directory
build/core/java.mk:9: *** libcore: Target java module does not define any source or resource files. Stop.[/code]

Link to comment
Share on other sites

Guest Simon O

Incase it helps this is what I did to setup my build environment and build CM7. Sorry if you already done this.

1) Installed repo

sudo curl http://android.git.kernel.org/repo > /bin/repo
sudo chmod a+x /bin/repo[/code] 2) Install dependances
[code]sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
3) Make folder to hold the CM7 files
mkdir cm7
4) Pull in the code
cd cm7
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16[/code] 5) Do the things to get the vendor files off your phone
[code]cd device/zte/blade
./extract-files.sh
You will need working ADB to do this along with the SDK installed. Or use the unzip-files.sh script instead 6) Grab rommanager
~/cm7/system/vendor/cyanogen/get-rommanage
7) Build
source build/envsetup.sh
brunch blade -j4 bacon[/code]

Link to comment
Share on other sites

Guest StevenHarperUK

the file

/cm7/build/core/java.mk

Is where the error is coming from

# Make sure there's something to build.
# It's possible to build a package that doesn't contain any classes.
ifeq (,$(strip $(LOCAL_SRC_FILES)$(all_res_assets)))
$(error $(LOCAL_PATH): Target java module does not define any source or resource files)
endif[/code]

So according to the error libcore has nothing to build - still doesn't mean much to me.

Can anyone more experience help (flibblesan)?

Link to comment
Share on other sites

Guest StevenHarperUK
Dude, do what he said.

You're probably missing the JDK

I ran the apt-get install and the JDK is there - I am using the ./unzip-files.sh with the files from the latest Nightly image.

which java
/usr/lib/jvm/java-6-sun/bin/java[/code]
[code]java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
sun-java6-jdk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.[/code]

Link to comment
Share on other sites

Guest paulgdp

I tried to clean the source, to use brunch or lunch/make bacon then update ubuntu and then recreate the cyanogenmod source tree from scratch (after doing rm -rf *) and I still don't get any errors.

You probably have a problem with your setup, try to follow on of these official tutorial http://wiki.cyanogenmod.com/index.php?titl...ing_from_source.

And don't forget to add the partner repository (add-apt-repository "deb http://archive.canonical.com/ maverick partner") before installing the java package.

Then please post you java version. Here is mine:

# java -version

java version "1.6.0_24"

Java SE Runtime Environment (build 1.6.0_24-b07)

Java HotSpot 64-Bit Server VM (build 19.1-b02, mixed mode)

Link to comment
Share on other sites

Guest StevenHarperUK
I tried to clean the source, to use brunch or lunch/make bacon then update ubuntu and then recreate the cyanogenmod source tree from scratch (after doing rm -rf *) and I still don't get any errors.

You probably have a problem with your setup, try to follow on of these official tutorial http://wiki.cyanogenmod.com/index.php?titl...ing_from_source.

And don't forget to add the partner repository (add-apt-repository "deb http://archive.canonical.com/ maverick partner") before installing the java package.

Then please post you java version. Here is mine:

# java -version

java version "1.6.0_24"

Java™ SE Runtime Environment (build 1.6.0_24-b07)

Java HotSpot™ 64-Bit Server VM (build 19.1-b02, mixed mode)

Our versions are identical

I was trying to make some "correct" Blade instructions for that Wiki (you linked)

I write instructions as I do it myself - however I did what flibblesan said (except I extracted the files from the nightly)

and I get the same error.

Should I rm -r the lot and start from scratch? (took aaaagggees to download the git tree)

Link to comment
Share on other sites

Guest paulgdp

You can try the rm -rf method without redownload everything:

Go in your source tree and "rm -rf *", it will erase everythings BUT the .repo folder which contain all the clone repositories. Then do again "repo sync" and it will just update the git clones in your .repo folder and then checkout them in your main source tree. The operation will take about 2 minutes instead of 2-3 hours to download everythings.

I also gives you my proprietary folder, just in case:

http://paulgrandperrin.free.fr/android/

Link to comment
Share on other sites

Guest StevenHarperUK
You can try the rm -rf method without redownload everything:

Go in your source tree and "rm -rf *", it will erase everythings BUT the .repo folder which contain all the clone repositories. Then do again "repo sync" and it will just update the git clones in your .repo folder and then checkout them in your main source tree. The operation will take about 2 minutes instead of 2-3 hours to download everythings.

I also gives you my proprietary folder, just in case:

http://paulgrandperrin.free.fr/android/

ta - get back to you soon

Link to comment
Share on other sites

Guest StevenHarperUK

I tried it without your proprietary (thanks thou)

and it's now working

Cheers Guys - great help all of you :huh:

So a Full re-clean

Must have had some problems extracting the first time.

Link to comment
Share on other sites

Guest fonix232

Yes, that's the cause I've asked to close my topic of building CM, because it is no longer proper.

Also, flib, brunch does not need the -j[n] argument. It was created so it automagically detects the number of cores, etc (I want hyperthreading though).

Link to comment
Share on other sites

Guest Simon O
Yes, that's the cause I've asked to close my topic of building CM, because it is no longer proper.

Also, flib, brunch does not need the -j[n] argument. It was created so it automagically detects the number of cores, etc (I want hyperthreading though).

Thank you, good to know it's not needed to specify the number of cores.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.