Skip to content

添加编译的Makefile #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

添加编译的Makefile #1

wants to merge 5 commits into from

Conversation

leeonix
Copy link

@leeonix leeonix commented Aug 13, 2014

你需要修改下start.sh

@leeonix
Copy link
Author

leeonix commented Aug 13, 2014

我修改了start.sh了。

@leeonix
Copy link
Author

leeonix commented Aug 13, 2014

pbc编译,想加回去 -fPIC编译。
可以看我的修改记录。

这么修改即可:

$(PBC_LIB): $(SKYNET_PATH)/skynet
cd $(PBC_PATH) && $(MAKE) lib

$(PBC_LIB): $(SKYNET_PATH)/skynet
cd $(PBC_PATH) && $(MAKE) "CFLAGS = -O2 -fPIC" lib

@leeonix
Copy link
Author

leeonix commented Aug 13, 2014

我睡觉了。在require "protobuf.c"的时候说找不到pbc_pattern_close_arrays。pbc-lua.c的编译还是有问题。不过我要睡觉了。你先看看吧,睡醒了再说。

@leeonix
Copy link
Author

leeonix commented Aug 13, 2014

我测试了下。现在这个Makefile直接用:./skynet ../configs/talkbox.cfg启动是没问题的。但用start.sh就不行。我是Ubuntu,脚本提示:
···
start.sh: 17: [: -a: unexpected operator
start.sh: 27: [: -a: unexpected operator
···

@forthxu
Copy link
Owner

forthxu commented Aug 14, 2014

考虑过Makefile,但操作比较多用shell比较方便;
protocbuf问题建议在pbc目录下直接编译测试下。

@leeonix
Copy link
Author

leeonix commented Aug 14, 2014

操作shell一点也不方便。解决不了依赖问题,如果多次执行,你就要多次编译更新。
好了,现在这个Makefile现在这个版本已经基本没问题了。

@leeonix
Copy link
Author

leeonix commented Aug 14, 2014

protocbuf 的问题我已经知道了,是用-l参数没有导出符号表,忘了加-Wl,-E,与其这样,还不如直接把libpbc.a直接加到后面。

@leeonix
Copy link
Author

leeonix commented Aug 14, 2014

编译protobuf.so和p.so。我用了skynet里面的lua,可以不用安装lua就可以执行了。

@leeonix
Copy link
Author

leeonix commented Aug 15, 2014

start.sh的问题找到了,貌似我在用共享方式编辑这个脚本的时候,没注意权限被修改了。所以-a参数失效了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants