2017-02-10 1 views
0

내가하는 ARMv7에 대한 nodejs를 컴파일하려고 ~/cross-compiler-shell.sh and ./configure && make install을 수행하기 전에, 나는이 스크립트를 패치해야하지만, 나에게 오류를 git apply wscript 반환 nodejs부패 패치 오류가

치명적인 : 라인에 손상 패치 49

여기 내 패치는 다음과 같습니다.

--- a/deps/libev/wscript 
+++ b/deps/libev/wscript 
@@ -41,6 +41,7 @@ def configure(conf): 
conf.check_cc(header_name="sys/eventfd.h", function_name="eventfd") 


+ ''' Can't run cross-binary code 
code = """ 
    #include <syscall.h> 
    #include <time.h> 
@@ -54,6 +55,8 @@ def configure(conf): 
""" 
conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=True, 
      msg="Checking for SYS_clock_gettime") 
+ ''' 
+ conf.define('HAVE_CLOCK_SYSCALL', 1) 

have_librt = conf.check(lib='rt', uselib_store='RT') 
if have_librt: 


vim wscript 

--- a/wscript 
+++ b/wscript 
@@ -319,11 +319,15 @@ def v8_cmd(bld, variant): 
if bld.env['DEST_CPU'] == 'x86_64': 
arch = "arch=x64" 

+ cross_arch = False 
+ # TODO would use -1 != str.find('linux-gnueabi'), but this is sometimes a string and other times an array 
+ # if bld.env['AR'] == 'arm-angstrom-linux-gnueabi-ar': 
+ # arch = "arch=arm" 
+ # cross_arch = True 
+ # 
+ arch = "arch=arm" 
+ cross_arch = True 

if variant == "default": 
mode = "release" 
else: 
mode = "debug" 

+ snapshot = 'snapshot=on' 
+ if cross_arch: 
+ snapshot = '' 
- cmd_R = 'python "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static snapshot=on' 
+ cmd_R = 'python "%s" -j %d -C "%s" -Y "%s" visibility=default mode=%s %s library=static ' + snapshot 

끝에 빈 줄을 넣으려고했으나 여기에 오류가 있습니다. 당신은 아마 수동으로 패치를 엉망으로

+0

전체 패치 파일입니까? 그것은 심지어 51 라인을 가지고 있지 않다 – Vampire

+0

미안하지만, 나는 49를 잘못 입력했다. 나는 수정했다. –

+0

또한 49 라인이 아니라 단지 48 – Vampire

답변

1

귀하의 패치 메타 데이터가 잘못된 도와

감사합니다. @@ -319,11 +319,15 @@ def v8_cmd(bld, variant):은 실제로 @@ -319,10 +319,20 @@ def v8_cmd(bld, variant):이어야합니다.

+0

고마워, 오류 disapear하지만 난 그게 다른 문제의 원인이 될지도 모르겠지만 그 전에도 make.configure를 실행하기 전에 './configure'명령을 실행하면이 스크립트의 3 행에 @@ –

+0

이라는 구문 오류가 발생합니다. 미안하지만, 영어가 너무 무서워서 네가하는 말을 모른다. 그러나 이것은 다른 질문처럼 들리지만 손상된 패치 파일을 적용하는 것과 관련이 있습니다. – Vampire