Home

zhangyiqun

Thoughts, stories and ideas.

2014年以前 About Feed

05 Aug 2010
在MAC OS下编译安装LFTP

因为我本人很喜欢LINUX下的小工具,所以很是花了一些时间把我常用的全部搬到MAC上.确实,MAC下也有一些不错的包管理程序(类似于yum和apt-get),但听macfans的版主说会把系统搞乱,所以还是用最古老的编译安装吧:)

1.解决各种依赖关系

首先要安装xcode,之后下载这些包安装,在图中我已经按安装先后顺序排列好了

屏幕快照 2010-08-06 下午08.23.23.png

在安装libgcrypt-1.4.5的过程中如果make时报了以下错误

/bin/sh ../libtool   –mode=compile gcc -DHAVE_CONFIG_H -I. -I..

-I../src -I../src   -g -O2 -MT mpih-add1-asm.lo -MD -MP -MF

.deps/mpih-add1-asm.Tpo -c -o mpih-add1-asm.lo mpih-add1-asm.S

gcc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -g -O2 -MT

mpih-add1-asm.lo -MD -MP -MF .deps/mpih-add1-asm.Tpo -c mpih-add1-asm.S

-fno-common -DPIC -o .libs/mpih-add1-asm.o

mpih-add1-asm.S:47:suffix or operands invalid for `push’

mpih-add1-asm.S:48:suffix or operands invalid for `push’

mpih-add1-asm.S:78:suffix or operands invalid for `jmp’

mpih-add1-asm.S:113:suffix or operands invalid for `pop’

mpih-add1-asm.S:114:suffix or operands invalid for `pop’

make[2]: *** [mpih-add1-asm.lo] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

请加入这个条件后再来编译

–disable-asm

2.这些都部署好后就可以安装lftp了

编译LFTP时没有遇到任何问题,但是make时会报错,如下

gcc -DHAVE_CONFIG_H -I. -I../lib -I../lib -I../trio -O2 -Wall -Wwrite-strings -Woverloaded-virtual -fno-exceptions -fno-rtti -fno-implement-inlines -Winline -MT complete.o -MD -MP -MF .deps/complete.Tpo -c -o complete.o complete.cc

In file included from CmdExec.h:28,

from complete.cc:34:

Job.h: In member function ‘void Job::ClearStatus()’:

Job.h:79: warning: format not a string literal and no format arguments

complete.cc: In function ‘char** lftp_completion(const char*, int, int)’:

complete.cc:623: error: ‘rl_ignore_some_completions_function’ was not declared in this scope

complete.cc:765: error: ‘rl_save_prompt’ was not declared in this scope

complete.cc:793: error: ‘rl_restore_prompt’ was not declared in this scope

complete.cc:794: error: ‘rl_clear_message’ was not declared in this scope

complete.cc:808: error: ‘rl_message’ was not declared in this scope

complete.cc:819: error: ‘rl_restore_prompt’ was not declared in this scope

complete.cc:820: error: ‘rl_clear_message’ was not declared in this scope

complete.cc: In function ‘char* bash_quote_filename(char*, int, char*)’:

complete.cc:1178: error: ‘MULT_MATCH’ was not declared in this scope

complete.cc: In function ‘int lftp_rl_getc(FILE*)’:

complete.cc:1257: error: ‘rl_kill_full_line’ was not declared in this scope

make[1]: *** [complete.o] Error 1

make: *** [all-recursive] Error 1

我自己google了一些时间,但是没有找到任何解决办法,期间看到一个老外的发帖,他认为这是一个BUG并且已经提交给官方了.

这次折腾费了不少时间,也让我看清了macOS确实不如一些比较开放的LINUX发行版舒服,虽然大部分软件也都可以移植到MAC中,但花费的时间较长,不如安心的用发行版了.


zhangyiqun

scribble

2014年以前 About Feed