오랜만에, Mac 업그레이드 후에 처음으로 MacOSX 10.15 Catalina 에서 LibreOffice(리브레오피스) 빌드를 진행하였습니다.

LibreOffice(리브레오피스) 빌드는 문서 재단의 위키 링크 Building LibreOffice on macOS를 보며 따라하였습니다.

빌드를 진행하다 보니, 아래의 오류로 빌드 진행이 안되는 것을 확인하였습니다.

In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/Python.h:139:
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/pythonrun.h:142:5: error: 'TAPI' is not defined, evaluates to 0 [-Werror,-Wundef]
#if TAPI
    ^
[AIN] ooo_images
1 error generated.
/Users/****/dev/lode/dev/core/solenv/gbuild/LinkTarget.mk:239: recipe for target '/Users/****/dev/lode/dev/core/workdir/CObject/pyuno/source/module/pyuno_dlopenwrapper.o' failed
make[1]: *** [/Users/****/dev/lode/dev/core/workdir/CObject/pyuno/source/module/pyuno_dlopenwrapper.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:282: recipe for target 'build' failed
make: *** [build] Error 2

해당 내용에서는 C언어 매크로 TAPI가 정의 안되어서 빌드 에러가 난다는 이야기가 나왔습니다.

해당 내용에 대하여 IRC의 #libreoffice-dev채널에 문의를 하였습니다.

9:28 PM I have a question about build on MacOSX (Catalina 10.15.2)
9:28 PM I get a LibreOffice source from git repository. and try to build, then failed.
9:29 PM message is In file included from ***/dev/core/pyuno/source/module/pyuno_dlopenwrapper.c:22:
9:29 PM In file included from /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/Python.h:139:
9:29 PM /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.7/Headers/pythonrun.h:142:5: error: 'TAPI' is not defined, evaluates to 0 [-Werror,-Wundef]
9:30 PM What is "#if TAPI" ? 
9:41 PM <mikekaganski> dhsung_: a coincidence: https://ask.libreoffice.org/en/question/223751
9:44 PM <ycao> https://ask.libreoffice.org/en/question/223751/error-tapi-is-not-defined-evaluates-to-0-werror-wundef-while-building-on-macos/
9:44 PM Any tips?
9:44 PM <_rene_>  yes, the obvious one
9:44 PM (don't build with -Werror)
9:45 PM and this undefined macro is inside python itself which is clear from the error message... (just that LO bundles python if you let it..)
9:45 PM <mikekaganski>  _rene_: the problem is that this looks like our default in LODE
9:46 PM <ycao>  How can I build without `-Werror`
9:46 PM Using `lode`
9:46 PM <_rene_> mikekaganski: yes, it's a problem. anywhere :)
9:46 PM $ ./configure --help | grep -i werror --enable-werror         Turn warnings to errors. (Has no effect in modules
9:47 PM so --disable-werror, of course ;)
9:48 PM <ycao>  So run `./configure --disable-werror` is ok?
9:48 PM <mikekaganski> ycao: essentially, add --disable-werror which _rene_ mentioned to autogen.input in your core directory

문의 결과

./configure --help | grep -i werror --enable-werror         Turn warnings to errors. 

빌드 '에러 error'를 에러 대신 '경고 warning'로 바꾸어서 빌드하라고 하더군요.

이유는 TAPI라는 정의되지 않은 매크로는 파이썬 자체에 있고, 이 매크로를 무시해도 빌드 후에 실행은 되니 '에러 error'로 빌드 안되는 것에 대하여 '에러 error'레벨을 '경고 warning'으로 바꾸어서 빌드 하면 된다고 하군요.

그래서, 저는 아래의 명령어로 빌드 진행을 하였습니다.

이후, 빌드 후 확인

****@**** core % ./autogen.sh --with-locales="ko"  --with-vendor="DaeHyun Sung, TDF Member"  --disable-werror           
********************************************************************
*
*   Using commandline arguments and ignoring autogen.input!
*
********************************************************************
Running ./configure with '--with-locales=ko --with-vendor=DaeHyun Sung, TDF Member --disable-werror --srcdir=/Users/sungdaehyun/dev/lode/dev/core --enable-option-checking=fatal'
********************************************************************
*
*   Running LibreOffice build configuration.
*
********************************************************************
To build, run:
/Users/****/lode/opt/bin/make

To view some help, run:
/Users/****/lode/opt/bin/make help

After the build of LibreOffice has finished successfully, you can immediately run LibreOffice using the command:
open instdir/LibreOfficeDev.app

If you want to run the smoketest, run:
/Users/****/lode/opt/bin/make check

****@**** core % make build-nocheck
make -j 4  -rs -f /Users/****/lode/dev/core/Makefile.gbuild  build  
[PAT] boost
[DEP] LNK:Library/libuno_salhelpergcc3.dylib.3
[LNK] Library/libuno_salhelpergcc3.dylib.3
[UPK] libgpg-error-1.27.tar.bz2
[PAT] icu
[PAT] nss
[PAT] liblangtag
[DEP] LNK:Executable/bestreversemap
[LNK] Executable/bestreversemap
[PAT] libjpeg-turbo
[PAT] lcms2

(생략)


[BIN] extras
[MOD] extras
[MOD] libreoffice
[BIN] top level modules: libreoffice
[ALL] top level modules: build-non-l10n-only build-l10n-only

빌드 완료 후 실행

****@**** core % open instdir/LibreOfficeDev.app

실행 후 화면

MacOSX mojave(10.14)에서 어플리케이션 빌드를 하기 위해 설정을 해야했음.

checking what macOS SDK to use... configure: error: Could not find an appropriate macOS SDK

Mac위의 메세지가 뜨면서 빌드 설정이 실패시 아래의 명령어를 입력하여 macOS SDK를 설치하면 된다.

이번에 나온 MacOSX mojave(10.14) 부터 헤더파일(headers)이 `/usr/include/`에 기본적으로 설치되지 않습니다.

그래서 헤더파일(header)파일을 설치하려면 아래의 명령어를 입력하여

$ open /Library/Developer/CommandLineTools/Packages/macOS\_SDK\_headers\_for\_macOS\_10.14.pkg

를 실행합니다.

실행이 완료되면 아래의 설치화면이 뜹니다.

설치가 완료되면 어플리케이션 빌드가 가능합니다.

원래 Arm기반CPU에 탑재되는 Android OS를 X86기반의 CPU에도 작동할수 있게 포팅하는 프로젝트인 Android-x86 프로젝트 사이트(http://www.android-x86.org/)에서 x86기반의 안드로이드 소스(여기서는 Gingerbread)를 받고 난 후 빌드 하였다 

make iso_img TARGET_PRODUCT=generic_x86

빌드후에 에러 나는 점을 검색해서 문제 해결한 부분 링크를 붙였다.

결국 빌드는 완료했고 kvm위에서 실행해보았으나 원하는 시험 결과가 나오지 않아 실망했음.

 

dalvik/vm/native/dalvik_system_Zygote.cpp: In function 'int setrlimitsFromArray(ArrayObject*)':
dalvik/vm/native/dalvik_system_Zygote.cpp:194: error: aggregate 'rlimit rlim' has incomplete type and cannot be defined
dalvik/vm/native/dalvik_system_Zygote.cpp:217: error: 'setrlimit' was not declared in this scope
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
make: *** Waiting for unfinished jobs....

 Fix for Dalvik compile error on CyanogenMod 9

 

  CC      arch/x86/kernel/ptrace.o
/home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:1366:17: error: conflicting types for ‘syscall_trace_enter’
In file included from /home/dhsung/android-x86/kernel/arch/x86/include/asm/vm86.h:130:0,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/processor.h:10,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/thread_info.h:22,
                 from /home/dhsung/android-x86/kernel/include/linux/thread_info.h:53,
                 from /home/dhsung/android-x86/kernel/include/linux/preempt.h:9,
                 from /home/dhsung/android-x86/kernel/include/linux/spinlock.h:50,
                 from /home/dhsung/android-x86/kernel/include/linux/seqlock.h:29,
                 from /home/dhsung/android-x86/kernel/include/linux/time.h:8,
                 from /home/dhsung/android-x86/kernel/include/linux/timex.h:56,
                 from /home/dhsung/android-x86/kernel/include/linux/sched.h:57,
                 from /home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:8:
/home/dhsung/android-x86/kernel/arch/x86/include/asm/ptrace.h:146:13: note: previous declaration of ‘syscall_trace_enter’ was here
/home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:1411:17: error: conflicting types for ‘syscall_trace_leave’
In file included from /home/dhsung/android-x86/kernel/arch/x86/include/asm/vm86.h:130:0,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/processor.h:10,
                 from /home/dhsung/android-x86/kernel/arch/x86/include/asm/thread_info.h:22,
                 from /home/dhsung/android-x86/kernel/include/linux/thread_info.h:53,
                 from /home/dhsung/android-x86/kernel/include/linux/preempt.h:9,
                 from /home/dhsung/android-x86/kernel/include/linux/spinlock.h:50,
                 from /home/dhsung/android-x86/kernel/include/linux/seqlock.h:29,
                 from /home/dhsung/android-x86/kernel/include/linux/time.h:8,
                 from /home/dhsung/android-x86/kernel/include/linux/timex.h:56,
                 from /home/dhsung/android-x86/kernel/include/linux/sched.h:57,
                 from /home/dhsung/android-x86/kernel/arch/x86/kernel/ptrace.c:8:
/home/dhsung/android-x86/kernel/arch/x86/include/asm/ptrace.h:147:13: note: previous declaration of ‘syscall_trace_leave’ was here
make[4]: *** [arch/x86/kernel/ptrace.o] 오류 1
make[3]: *** [arch/x86/kernel] 오류 2
make[2]: *** [arch/x86] 오류 2
make[1]: *** [sub-make] 오류 2
make[1]: Leaving directory `/home/dhsung/android-x86/kernel'
make: *** [out/target/product/generic_x86/kernel] 오류 2

https://patchwork.kernel.org/patch/1301031/

 

external/srec/tools/grxmlcompile/grxmlcompile.cpp:938:1:   required from here
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:9: error: ‘SetState’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:9: note: declarations in dependent base ‘fst::VectorFstBaseImpl<fst::CacheState<fst::GallicArc<fst::StdArc, (fst::StringType)0u> > >’ are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:132:9: note: use ‘this->SetState’ instead
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: error: ‘SetState’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: note: declarations in dependent base ‘fst::VectorFstBaseImpl<fst::CacheState<fst::GallicArc<fst::StdArc, (fst::StringType)0u> > >’ are not found by unqualified lookup
external/srec/tools/thirdparty/OpenFst/fst/lib/cache.h:136:11: note: use ‘this->SetState’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/grxmlcompile_intermediates/grxmlcompile.o] 오류 1


http://review.android.git.linaro.org/#/c/1983/

 

frameworks/base/tools/aapt/AaptAssets.cpp:1386:41:   required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptGroup> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
frameworks/base/include/utils/KeyedVector.h: In instantiation of ‘const VALUE& android::DefaultKeyedVector<KEY, VALUE>::valueFor(const KEY&) const [with KEY = android::String8; VALUE = android::sp<AaptDir>]’:
frameworks/base/tools/aapt/AaptAssets.cpp:1445:53:   required from here
frameworks/base/include/utils/KeyedVector.h:193:31: error: ‘indexOfKey’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptDir> >’ are not found by unqualified lookup
frameworks/base/include/utils/KeyedVector.h:193:31: note: use ‘this->indexOfKey’ instead
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] 오류 1


http://stackoverflow.com/questions/10171897/building-android-source-code


target Generated: libwebcore <= external/webkit/WebCore/xml/XMLHttpRequestUpload.idl
target Generated: libwebcore <= external/webkit/WebCore/xml/XMLSerializer.idl
target Generated: libwebcore <= external/webkit/WebCore/xml/XSLTProcessor.idl
target Generated: libwebcore <= external/webkit/WebCore/dom/make_names.pl
Unknown parameter a interfaceName for tags/attrs
make: *** [out/target/product/generic_x86/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h] 오류 255

http://forum.xda-developers.com/showthread.php?t=1610907


https://github.com/CyanogenMod/android_external_webkit/commit/1c88029b864c88cc32767eb8d1ffe13e95445af3


In file included from dalvik/vm/Dalvik.h:87:0,
                 from dalvik/vm/native/dalvik_system_Zygote.c:20:
dalvik/vm/oo/ObjectInlines.h: In function ‘dvmSetObjectArrayElement’:
dalvik/vm/oo/ObjectInlines.h:29:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setgroupsIntarray’:
dalvik/vm/native/dalvik_system_Zygote.c:172:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c: In function ‘setrlimitsFromArray’:
dalvik/vm/native/dalvik_system_Zygote.c:192:19: error: storage size of ‘rlim’ isn’t known
dalvik/vm/native/dalvik_system_Zygote.c:200:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c:204:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
dalvik/vm/native/dalvik_system_Zygote.c:215:9: warning: implicit declaration of function ‘setrlimit’ [-Wimplicit-function-declaration]
dalvik/vm/native/dalvik_system_Zygote.c:192:19: warning: unused variable ‘rlim’ [-Wunused-variable]
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] 오류 1

https://gist.github.com/alanorth/3158845


Notice file: system/core/libmincrypt/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libmincrypt.a.txt
Install: out/host/linux-x86/bin/mkbootimg
host C: mksdcard <= sdk/emulator/mksdcard/mksdcard.c
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
sdk/emulator/mksdcard/mksdcard.c:1:0: note: this is the location of the previous definition
host Executable: mksdcard (out/host/linux-x86/obj/EXECUTABLES/mksdcard_intermediates/mksdcard)
true
Notice file: sdk/emulator/mksdcard/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/mksdcard.txt
Install: out/host/linux-x86/bin/mksdcard
host Prebuilt: mkuserimg.sh (out/host/linux-x86/obj/EXECUTABLES/mkuserimg.sh_intermediates/mkuserimg.sh)
Notice file: system/extras/ext4_utils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//bin/mkuserimg.sh.txt
Install: out/host/linux-x86/bin/mkuserimg.sh
host Prebuilt: monkeyrunner (out/host/linux-x86/obj/EXECUTABLES/monkeyrunner_intermediates/monkeyrunner)
Install: out/host/linux-x86/bin/monkeyrunner
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
frameworks/base/tools/obbtool/Main.cpp:1:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make: *** [out/host/linux-x86/obj/EXECUTABLES/obbtool_intermediates/Main.o] 오류 1



This happens with commit: a5158b31d97e25832d778a41a31df6ece0fc627e[Ubuntu 11.10 x86_64 running Linux 3.0.0-12-generic]Fix is same build/core/combo/HOST_linux-x86.mk:    -HOST_GLOBAL_CFLAGS  = -D_FORTIFY_SOURCE=0     HOST_GLOBAL_CFLAGS  = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0[linenumber 59] ------------There are much of:  warning: _FORTIFY_SOURCE redefinedBut this frameworks/base/tools/obbtool/Main.cpp is compiled with -Werror 


http://codewalkerster.blogspot.kr/2011/11/ubuntu-1110-androidgingerbread-build.html

https://code.google.com/p/android/issues/detail?id=20795

 

위의 빌드 에러 다 처리하고 빌드하는데 하루종일 걸린것 같다. (실은 자기 전에 빌드 돌렸는데, 빌드 에러나서 계속 실행되지 않았던거 -_-; 자고 일어나서 화면을 보니 하루만에 빌드될것이 빌드가 되지 않아 울뻔했었다.

회사에서 빌드 로그 쭉보면서 다른 컴퓨터를 통해 업무보느라 정신이 거의 어질어질했음 -_-

ps. 안드로이드 빌드 완료될때는 기분이 좋으나, 빌드 에러 날때는 짜증 ㅠㅠ

2013년 7월 25일 목요일 저녁즈음


안드로이드 소스를 받았겠다, 컴파일을 하고 책보고 인터넷 서핑을 했습니다.

그리고 잠깐 모니터링을 하다, 안드로이드 소스 빌드중 아래와 같은 에러가 발생하고는 빌드가 중단되었습니다 -_-;;

dalvik/vm/native/dalvik_system_Zygote.cpp: In function 'int setrlimitsFromArray(ArrayObject*)':
dalvik/vm/native/dalvik_system_Zygote.cpp:194: error: aggregate 'rlimit rlim' has incomplete type and cannot be defined
dalvik/vm/native/dalvik_system_Zygote.cpp:217: error: 'setrlimit' was not declared in this scope
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libdvm_intermediates/native/dalvik_system_Zygote.o] Error 1
make: *** Waiting for unfinished jobs....


위의 빌드 중단 해결하는 방법을 구글링하니 헤더파일을 추가하는게 나왔습니다.

위의 링크에서는 에러가 난 dalvil_system_Zagote.cpp파일에 #include <sys/resource.h>를 추가해주면 빌드가 잘 된다고 나왔습니다.

위의 글을 믿고 cpp파일에

#include <sys/resource.h>

헤더파일 추가를 했습니다.    

아래는 헤더파일 추가된 소스파일 캡쳐화면.



위의 링크에 나온것 처럼 헤더파일 포함을 했더니 빌드가 잘됩니다~



저의 지인이며 비밀 스터디의 주도권을 가지고 계신 ganadist님께서 안드로이드 빌드 툴을 GTK와 Python기반으로 개발하셨다고 합니다.

아래는 저의 컴퓨터에서 실행한 화면으로 아직 Android Source kit을 받지 않았기 때문에 설정화면이 이상하게 되었군요.


(제대로 동작하는 화면의 경우는 그분의 동의를 받지 못해서 올리지 못하고, 주말 쯤 제가직접 프로그램 돌리는 스크린샷을 올리겠습니다.)


소스는 https://github.com/ganadist/abuild 에서 받을 수 있습니다.

안드로이드(Android)를 처음 접하는 초보자들도 쉽게 빌드 할수 있도록 GTK기반으로 UI를 구성한 후, 작성하였다고 합니다.


이 프로그램의 요구사항은 GNOME 3.0 개발환경에 맞게 만들어졌기 때문에 GTK+-3.0 이상이 설치되어야 한다고 나와 있군요. (GTK+-2.0과 GTK+-3.0간 호환성이 없다보니..)


* Requirements
	- python 2.6 or higher
	- pygobject 2.90 or higher
	- gtk 3.0 or higher with gobject-introspection
	- vte 2.90 or higher with gobject-introspection


실행방법

git으로 소스트리(참고 - https://github.com/ganadist/abuild  )를 받은 후 ./abuild를 실행하면 됩니다. 단 안드로이드 커널 소스를 미리 받으셔야 합니다.


* How to run?
	- change directory to source
	- run ./abuild
	 . need to fix for deployment
	- click "Source Top" button and select android source directory
	- if source directory has valid contents, "Build", "Product",
	  "Variant" button will be enabled
	  . TIP: If you set TOP shell environment and that is android
	    source directory, it will be set as "Source Top" directory
	- select check buttons and press "Build" button


ps. 제대로 빌드하는 모습을 다음 일요일에 제대로 된 실행화면을 블로그로 업로드할 예정입니다.


HTC Desire에 커스텀 롬을 계속 설치하고 엎어버리고를 반복하다.. 심심했습니다.

명색이 컴퓨터공학과 4년공부하고 대학원 수료한 학생인데, Android Source를 빌드해서 휴대폰에 올려볼까란 생각에 갑자기 안드로이드 소스를 XDA-Developers 에서 찾기 시작하였습니다.


여러가지 안드로이드 소스들 중에서 저는 CyanogenMod 를 선택하여 컴파일 하기로 하였습니다.

저는 Ubuntu 10.10 32bit 컴퓨터(구입한지 6년된 ThinkPad R52)에서 CyanogenMod컴파일을 하게 성공하였습니다.


처음에 맥북프로에서 컴파일 하다보니 아래와 같은 에러로 인하여 포기하였습니다. 아 SnowLeopad 가 64비트라서 32비트로 컴파일하다 Linking문제가 생겼나 봅니다 -ㅁ-

Install: out/host/darwin-x86/bin/dictTest

host Executable: emulator (out/host/darwin-x86/obj/EXECUTABLES/emulator_intermediates/emulator)

ld: illegal text reloc to DwarfCUImpl<Dwarf_CUHdr<Dwarf32_SizeHdr, unsigned int>, unsigned int>::get_pc_address_file_info(unsigned long long, Dwarf_AddressInfo*)from out/host/darwin-x86/obj/STATIC_LIBRARIES/emulator-elff_intermediates/emulator-elff.a(dwarf_cu.o) in anon for architecture i386

collect2: ld returned 1 exit status

make: *** [out/host/darwin-x86/obj/EXECUTABLES/emulator_intermediates/emulator] Error 1


Ubuntu에서 Android 2.3.3. Gingerbread OS탑재된 CyanogenMod 컴파일 하여 아래와 같은 결과를 만들었고, 에뮬레이터에서 실행해보니 잘 돌아갑니다.

Generated: (out/target/product/generic/android-info.txt)

Target system fs image: out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img

Install system fs image: out/target/product/generic/system.img

Target ram disk: out/target/product/generic/ramdisk.img

Target userdata fs image: out/target/product/generic/userdata.img

Installed file list: out/target/product/generic/installed-files.txt

studioego@studioego-laptop:~/android/system$ 

컴파일 성공하면 위의 메시지가 나옵니다 ㅎㅎ

아래는 컴파일 후 에뮬레이터를 이용하여 결과물을 실행한 화면입니다. 잘 돌아갑니다.

Emulator 실행 화면


Gingerbread가 탑재된 CyanogenMod

에뮬레이터에 볼수 있는 Android 2.3.3 정보 1

에뮬레이터에 볼수 있는 Android 2.3.3 정보 2


본인이 빌드를 했으면 빌드 번호에 본인 이름의 컴퓨터와 컴파일 한 날짜가 들어갔을겁니다. ㅎㅎ

Cyanogen_generic-eng 2.3.3. GINGERBREAD eng.studioego.20110327.012445 test-keys


Android Source컴파일하여 에뮬레이터로 올리는 방법을 알았으니 이제 HTC Desire에 CyanogenMod 소스코드를 올리는 것도 올리겠습니다. 

이후에 저만의 커스텀롬 올리는 방법과 Android Source분석도 올릴예정입니다.

  1. 이전 댓글 더보기
  2. Favicon of http://www.houstonoverheaddoors.com/ BlogIcon Garage Doors in Houston 2012.03.24 19:54

    great points altogether, you just gained a new reader. What would you suggest in regards to your post that you made some days ago? Any positive?

  3. Favicon of http://www.houstonoverheaddoors.com/ BlogIcon Garage Doors in Houston 2012.03.24 19:55

    Provide information as requested on the petition including the names of both parties and any involved children, address of both households and date of marriage and separation. Indicate any issues that require a temporary order from the judge such as spousal or child support, custody and residence of marital property. Thanks.

  4. Favicon of http://www.ideserveavacation.com BlogIcon Walt Disney World holidays 2012.03.25 14:39

    Very informative article regarding renting an apartment..Amazing execution of the blog..Keep up the good work..

  5. Favicon of http://www.xbroshost.com/ BlogIcon vps hosting 2012.03.26 11:02

    Interesting post and thanks for sharing. Some things in here I have not thought about before.Thanks for making such a cool post which is really very well written.will be referring a lot of friends about this.Keep blogging.

  6. Favicon of http://www.xbroshost.com/ BlogIcon alertpay hosting 2012.03.26 13:24

    I declare that we have of visitors are actually quite blessed to live in a great community with so many people with perfectly precious plans. I feel really happy to have found web pages and hope that many minutes more pleasant to read here

  7. Favicon of http://www.xbroshost.com/ BlogIcon linux shared hosting 2012.03.26 15:47

    Except Jeremy Smith played for the Storm until 2008 and Mason was actually apart of the Roosters loss, unlike he was with the Bulldogs and Cowboys. Not much of a coincidence.

  8. Favicon of http://inflatabledrivein.com/ BlogIcon inflatable movie screen 2012.03.26 17:02

    Post is nicely written and it contains many good things for me. I am glad to find your impressive way of writing the post. Now it become easy for me to understand and implement the concept. Thanks for sharing the post.

  9. Favicon of http://inflatabledrivein.com/ BlogIcon inflatable screen rental 2012.03.26 19:52

    Other items included with these handbags are the serial numbers and a dust bag to store the bag. In possession of professional technocrat team, sales executives and personnel, we strive to working collectively towards the goal of taking

  10. Favicon of http://inflatabledrivein.com/ BlogIcon outdoor movie screen rental 2012.03.26 21:46

    I have just started going to a gym and my instructor is asking me to take protein supplements. I am not sure whether they are steroids or not. And secondly, I am a strict vegetarian so i was hoping if you could give me any details on what to eat. Without the meat and eggs of course

  11. Favicon of http://onlinediscountelectronicsstore.com BlogIcon Buying electronics online 2012.03.27 19:38

    Connect with Samsung Smart TV for a wealth of added entertainment options. The UN32D6000features Samsung's Smart Hub, a simple menu system for connected features. Easily search for movies, shows and videos via online services and across connected devices, chat with friends, and access a wide variety of apps from Samsung Apps.

  12. Favicon of http://www.pharmonnet.com/ BlogIcon viagraonline 2012.03.28 12:38

    This is purely a business if you want to earn something you will have to reduce the price of the product to sell it and offer some attractive discount or gift cards to the consumer...so that long-term profit can be gained...

  13. Favicon of http://www.pharmonnet.com/ BlogIcon viagraonline 2012.03.28 12:38

    This is purely a business if you want to earn something you will have to reduce the price of the product to sell it and offer some attractive discount or gift cards to the consumer...so that long-term profit can be gained...

  14. The thing is that if I cosplay Mad Moxxi, I would have to make it as non slutty as possible cuz, well.

  15. Favicon of http://www.lovemessage.org/ BlogIcon love message 2012.03.28 16:19

    the first chapter or so is pretty decent. The case for a 'brand bubble' is presented effectively. After that, the book seemed to lose traction.

  16. Favicon of http://www.government-grant.biz/community-grant BlogIcon federal government grants 2012.03.28 17:30

    Your Post is very useful, I am truly happy to post my note on this blog..

  17. Favicon of http://www.helpmykneepain.com BlogIcon Dallas Knee Doctor 2012.03.28 19:26

    An interesting blog. I'm not mistaken of thinking that Korea has its path in technology. Koreans are great.

  18. Favicon of http://www.internet-marketingservice.com BlogIcon Internet Marketing Service 2012.03.29 14:29

    I love Android phones. These have great features.

  19. Favicon of http://www.gradshop.com/academic-regalia/masters-degree/gowns.html BlogIcon Masters robe 2012.12.29 11:23

    I am student with no real income, at least till i graduate, and eBay is the sole reason I can accomplish anything. eBay is an excellent source for everything, pretty much, and especially robotic parts. Given you know what you are looking for, your very likely to find the best prices on eBay.

  20. Favicon of http://www.gradshop.com/college-graduation.html BlogIcon university regalia 2012.12.29 13:51

    I have learn this submit and if I may just I wish to suggest you some fascinating things or tips. Perhaps you could write subsequent articles referring to this article. I wish to read even more things about it!

  21. Favicon of http://www.gradshop.com/college-graduation/bachelors/gowns.html BlogIcon college graduation gowns 2012.12.29 16:32

    if the robot believes he has the right to kill the man then he does have the right and if the man feels he has the right to kill the robot then he too has the right.Other people on the outside of the fight can argue until they are blue in the face about it

Android 프로그래밍을 하다 C코드를 Java코드와 연동해야하는 일이 생겼습니다.

Android NDK를 이용해 빌드하다보니 ant를 사용하여 안드로이드 프로그램을 빌드하였습니다.

Linux에서 빌드할때와 Mac OSX에서 빌드할때 미묘한 차이가 생기더군요.


Java로 된 안드로이드 소스코드는 UTF-8로 분명히 저장되어 있는데, Ant가 Linux에서 돌릴때엔 ascii로 인식해서 컴파일을 하더군요. 결국엔 안드로이드 어플에 한글이 깨져 나오는 문제가 있습니다.

Mac에서는 아무런 문제없이 빌드되고 안드로이더 어플에 한글이 깨져나오는 일이 없습니다. 참 미묘하기도 하지요?


참고로 CentOS5에 설치한 Ant 버전은 아래와 같습니다.

[studioego@localhost ~]$ ant -version

Apache Ant version 1.7.1 compiled on June 27 2008

[studioego@localhost ~]$ 



그리고 Mac  OSX 10.6에 설치된 Ant버전은 아래와 같다.

Dae-Hyun-Sung-ui-MacBook-Pro:~ studioego$ ant -version

Apache Ant version 1.8.1 compiled on September 21 2010

Dae-Hyun-Sung-ui-MacBook-Pro:~ studioego$


CentOS5 에서 Ant를 실행했을때


$ ant debug

Buildfile: build.xml

    [setup] Android SDK Tools Revision 8

    [setup] Project Target: Android 2.2

    [setup] API level: 8

    [setup] 

    [setup] ------------------

    [setup] Resolving library dependencies:

    [setup] No library dependencies.

    [setup] 

    [setup] ------------------

    [setup] 

    [setup] 

    [setup] Importing rules file: tools/ant/main_rules.xml


-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-dirs:

     [echo] Creating output directories if needed...

    [mkdir] Created dir: /******/bin/classes

-pre-build:

-resource-src:

     [echo] Generating R.java / Manifest.java from the resources...

     [null] /home/studioego/android/platform-tools/aapt: /usr/lib/libz.so.1: no version information available (required by /home/studioego/android/platform-tools/aapt)

-aidl:

     [echo] Compiling aidl files into Java classes...

-pre-compile:

compile:

    [javac] Compiling 5 source files to /******/bin/classes

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]            ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]             ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]              ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]               ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]                ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]                 ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]                  ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]                   ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]                    ^

    [javac] /******/src/org/ccl/mobile/student/AnnoLine.java:4: warning: unmappable character for encoding ascii

    [javac] // 시작점 좌표

    [javac]                      ^

(생략)

    [javac] 100 warnings

(생략)



이후 소스코드는 UTF-8로 분명히 저장했는데도 안드로이드 어플에서 글씨가 깨져 나옵니다.


Mac OSX 10.6 Snow Leopard 에 탑재된 Ant를 실행했을때

$ ant debug

Buildfile: /******/build.xml

    [setup] Android SDK Tools Revision 10

    [setup] Project Target: Android 2.2

    [setup] API level: 8

    [setup] 

    [setup] ------------------

    [setup] Resolving library dependencies:

    [setup] No library dependencies.

    [setup] 

    [setup] ------------------

    [setup] 

    [setup] 

    [setup] Importing rules file: tools/ant/main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-pre-build:

-dirs:

     [echo] Creating output directories if needed...

-aidl:

     [echo] Compiling aidl files into Java classes...

-renderscript:

     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...

-resource-src:

     [echo] Generating R.java / Manifest.java from the resources...

-pre-compile:

...

(생략)

BUILD SUCCESSFUL

Total time: 10 seconds


소스코드도 UTF-8로 저장되었고 안드로이드 어플에서 한글이 깨지는 일이 없이 문제 없이 돌아갑니다. 


ant의 버전 차이때문에 그런건가요?


이 문제 때문에 Linux용 최신 ant binary 버전을 다운 받아서 사용했어도 똑같은 일이 발생하더군요.

버전문제는 아는 것 같고.. Linux용 ant를 직접 빌드해서 사용해야 문제가 해결될까요?


한글이 깨지는 문제때문에 구글링 한 결과 android-sdk폴더안의 파일을 수정해야되더군요

android-sdk디렉토리 안에 있는 tools/ant/main_rules.xml 을 열고 나서 

<property name="java.encoding" value="ascii" /> 부분을 찾습니다. 

 120     <!-- compilation options -->

 121     <property name="java.encoding" value="ascii" />

 122     <property name="java.target" value="1.5" />

 123     <property name="java.source" value="1.5" />

이후 ascii를 UTF-8로 수정후 저장합니다.

 <property name="java.encoding" value="UTF-8" />

이후에 다시 ant로 안드로이드 어플 컴파일 하면 한글이 깨지는 문제가 사라집니다.

참조: android: getting rid of “warning: unmappable character for encoding ascii”

(역시 구글링하면 모든 문제가 대부분 해결 되더군요 ㅎㅎ)


참고로 Mac OSX에선 기본적으로 UTF-8로 설정되어서 위와 같이 한글이 깨지는 문제가 없더군요.

아래는 맥의 ant 설정파일의 내용입니다.

/Users/studioego/android-sdk-mac_86/tools/ant/main_rules.xml

124     <!-- compilation options -->

125     <property name="java.encoding" value="UTF-8" />

126     <property name="java.target" value="1.5" />

127     <property name="java.source" value="1.5" />


Autoconf 로 Makefile만들기 예제 링크

 autotut: Using GNU auto{conf,make,header}

http://www.seul.org/docs/autotut/ 


2010년 6월 24일 오전 0시 21분경 모님과 IRC채널에서 대화하다


<blueguy^> OddEgo / htc 갔더니..
<blueguy^> OddEgo / desire 커널 소스 공개 되어 있더군요.
<OddEgo> 우와
<OddEgo> 커널 소스 공개되어서 xda 분들이 롬을 올리군요... ㅎㄸ
<blueguy^> OddEgo / 이미지 새로 올리는데 만족하지 말고..
<blueguy^> 직접 한번 빌드해서 올려 보는 것이..
<blueguy^> 흐흐.
<OddEgo> virtualbox에 올리면 능력자가 되는건가요?!
<OddEgo> 이미지 새로 올리는데 만족하지 말고.. // 어떻게 정곡을 잘 찌르십니까? ㅎㅎ
<blueguy^> OddEgo / 버박에 올리면 능력자가. 될 듯.
<blueguy^> 흐흐.
<blueguy^> qemu에는 그냥 올릴 수 있어요.


htc에서 공개된 안드로이드 소스코드를 x86용으로 포팅해서 올리면 엄청난 굇수가 되어 있겠지?

+ Recent posts