在dell380上装了fedora14后,发现编译不了android(nvidia)的源码:
1) JDK版本问题:
f14上的JDK默认版本是1.6,我们需要1.5的版本,可以用下面的方法修改:
$ alternatives --config java
然后输入‘2’。就可以了。这样就将JDK的版本改为1.5了。但是,还是我编译的时候还是出错了,我怀疑是f14自带的JDK的问题,只能手动从java网站下载、配置JDK了。
2) make版本问题:
JDK配置好了以后,编译,出现了如下错误:
[linux@ source]$ m
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2
TARGET_PRODUCT=pbj40
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=FRF91
============================================
make: 进入目录“/home/meego-go/nfs-tegra-10.8.3”
build/core/base_rules.mk:108: user tag on app CSRBluetooth at packages/apps/CSRBluetooth - add your app to core.mk instead
build/core/base_rules.mk:108: user tag on app Music at packages/apps/Music - add your app to core.mk instead
*** glibc detected *** make: free(): invalid next size (fast): 0x0dc7a4c0 ***
======= Backtrace: =========
/lib/libc.so.6[0x2a6ee4]
make[0x80509c8]
make[0x804feb2]
make[0x8052956]
make[0x804d327]
make[0x804d862]
make[0x804ce55]
make[0x804cee7]
make[0x8052920]
make[0x804d327]
make[0x804d862]
make[0x804ce55]
make[0x804d028]
make[0x804d7b8]
make[0x805024f]
make[0x804feb2]
make[0x8052956]
make[0x804d327]
make[0x804d862]
make[0x804ce55]
make[0x8065930]
make[0x8065fc6]
make[0x805dfff]
make[0x805f50e]
make[0x805e719]
make[0x805f50e]
make[0x805f912]
make[0x8059621]
/lib/libc.so.6(__libc_start_main+0xe6)[0x24be16]
make[0x8049a01]
======= Memory map: ========
00211000-00231000 r-xp 00000000 08:01 2495033 /lib/ld-2.12.90.so
00231000-00232000 r--p 0001f000 08:01 2495033 /lib/ld-2.12.90.so
00232000-00233000 rw-p 00020000 08:01 2495033 /lib/ld-2.12.90.so
00235000-003c2000 r-xp 00000000 08:01 2495074 /lib/libc-2.12.90.so
003c2000-003c4000 r--p 0018c000 08:01 2495074 /lib/libc-2.12.90.so
003c4000-003c5000 rw-p 0018e000 08:01 2495074 /lib/libc-2.12.90.so
003c5000-003c8000 rw-p 00000000 00:00 0
0041b000-00437000 r-xp 00000000 08:01 2495086 /lib/libgcc_s-4.5.1-20100924.so.1
00437000-00438000 rw-p 0001b000 08:01 2495086 /lib/libgcc_s-4.5.1-20100924.so.1
00732000-00733000 r-xp 00000000 00:00 0 [vdso]
08047000-08071000 r-xp 00000000 08:01 2763239 /usr/bin/make
08071000-08072000 rw-p 00029000 08:01 2763239 /usr/bin/make
08072000-08073000 rw-p 00000000 00:00 0
097e6000-0dd34000 rw-p 00000000 00:00 0 [heap]
b718e000-b7255000 rw-p 00000000 00:00 0
b731c000-b741e000 rw-p 00000000 00:00 0
b741e000-b7425000 r--s 00000000 08:01 2756953 /usr/lib/gconv/gconv-modules.cache
b7425000-b742d000 r--p 00000000 08:01 3020844 /usr/share/locale/zh_CN/LC_MESSAGES/make.mo
b7430000-b7432000 rw-p 00000000 00:00 0
b7432000-b7586000 r--p 03270000 08:01 2756697 /usr/lib/locale/locale-archive
b7586000-b75c6000 r--p 02eb6000 08:01 2756697 /usr/lib/locale/locale-archive
b75c6000-b77c6000 r--p 00000000 08:01 2756697 /usr/lib/locale/locale-archive
b77c6000-b77c7000 rw-p 00000000 00:00 0
b77e7000-b77e8000 rw-p 00000000 00:00 0
b77e9000-b77ea000 rw-p 00000000 00:00 0
bf9b3000-bf9f0000 rw-p 00000000 00:00 0 [stack]
已放弃 (core dumped)
[linux@ source]$ repo -qa glic
Usage: repo [-p|--paginate|--no-pager] COMMAND [ARGS]
main.py: error: no such option: -q
表面上看起来好像是内存溢出之类的问题,但其实是因为make的版本不匹配:
[linux@ source]$ make --version
GNU Make 3.82
Built for i386-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
我们需要将make的版本降到3.81:
[linux@ source] $ wget https://fedoraproject.org/static/E8E40FDE.txt
[linux@ source] $ sudo rpm --import E8E40FDE.txt
[linux@ source] $ sudo yum downgrade make --releasever=13
[linux@ source] $ make -version
GNU Make 3.81
[linux@ source] $ sudo vim /etc/yum.conf //为了防止升级,我们添加下面的语句
exclude=make*