반응형

안드로이드 make 버전 때문에 build 안되는 문제.

ubuntu 버전을 올렸더니 make 버전이 따라 올라가서 android 컴파일이 안되네.


$ mm

make: 디렉터리 '/home/lionelj/hoho/work/tcc/v13.05_r1-tcc-android-4.2.2' 들어감

build/core/main.mk:45: ********************************************************************************

build/core/main.mk:46: *  You are using version 4.1 of make.

build/core/main.mk:47: *  Android can only be built by versions 3.81 and 3.82.

build/core/main.mk:48: *  see https://source.android.com/source/download.html

build/core/main.mk:49: ********************************************************************************

build/core/main.mk:50: *** stopping.  멈춤.

make: 디렉터리 '/home/lionelj/hoho/work/tcc/v13.05_r1-tcc-android-4.2.2' 나감


이런 메세지가 나올때는 

make 버전을 추가해주면 됨. 

(alternatives에 make를 추가해야 되나.. make 버전을 몇개 들고 있어야 되나... 고민고민 하다가 파일을 열어봤더니 간단하게 해결가능 하게되어있네..)


$make -v

GNU Make 4.1

x86_64-pc-linux-gnu 빌드

Copyright (C) 1988-2014 Free Software Foundation, Inc.

라이선스 GPLv3+: GNU GPL 버전 3 또는 이후 <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.


4.0 을 쓰고 있으니까 4.1을 추가해준다.

어디다가?

$ vi ./build/core/main.mk

열고 3.81로 찾는다.

 40 # Check for broken versions of make.
 41 # (Allow any version under Cygwin since we don't actually build the platform there.)
 42 ifeq (,$(findstring CYGWIN,$(shell uname -sm)))
 43 ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.81))
 44 ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.82))
 45 ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 4.1))
 46 $(warning ********************************************************************************)
 47 $(warning *  You are using version $(MAKE_VERSION) of make.)
 48 $(warning *  Android can only be built by versions 3.81 and 3.82.)
 49 $(warning *  see https://source.android.com/source/download.html)
 50 $(warning ********************************************************************************)
 51 $(error stopping)
 52 endif
 53 endif
 54 endif
 55 endif

이렇게 추가해주면 됨


반응형
Posted by Real_G