Skip to content
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

当运行 ./sunpinyin-dictgen 时, 提示没有权限. #49

Closed
zw963 opened this issue Sep 6, 2014 · 14 comments
Closed

当运行 ./sunpinyin-dictgen 时, 提示没有权限. #49

zw963 opened this issue Sep 6, 2014 · 14 comments

Comments

@zw963
Copy link

zw963 commented Sep 6, 2014

无法下载词库.

wget 'http://open-gram.googlecode.com/git/'/lm_sc.3gm.arpa-20140820.tar.bz2
--2014-09-06 23:12:52--  http://open-gram.googlecode.com/git//lm_sc.3gm.arpa-20140820.tar.bz2
Connecting to 127.0.0.1:8087... connected.
Proxy request sent, awaiting response... 403 
2014-09-06 23:12:54 ERROR 403: (no description).

make: *** [lm_sc.3gm.arpa-20140820.tar.bz2] Error 8
@zw963
Copy link
Author

zw963 commented Sep 6, 2014

是否考虑将词库资源移到 github ? googlecode 被封杀的厉害.

@zw963
Copy link
Author

zw963 commented Sep 6, 2014

似乎除了 lm_sc.3gm.arpa-20140820.tar.bz2, 其他文件都 OK.

@CasperVector
Copy link
Member

用 https 试试?
DL_ROOT = 'https://open-gram.googlecode.com/git/' sunpinyin-dictgen

以及其实 github 也经常被封,要不我们来个狡兔三窟策略,google code、github、gitorious 都存一份?

@zw963
Copy link
Author

zw963 commented Sep 6, 2014

@CasperVector , 一样不行呀. 甚至通过浏览器 lm_sc.3gm.arpa-20140820.tar.bz2 也不行, 是你没开放匿名访问权限吧.

github 比 googlecode 好多了吧. googlecode 不通过代理根本上不了, github 基本上没事儿,
DANG 对 github 算是很宽容的了, 最近速度也非常好, 真的 github 要是被封了, 码农会ZF的.

@zw963
Copy link
Author

zw963 commented Sep 6, 2014

通过网页:

403. That’s an error.

Your client does not have permission to get URL /git/lm_sc.3gm.arpa-20140820.tar.bz2 from this server. That’s all we know. 

@zw963
Copy link
Author

zw963 commented Sep 6, 2014

@CasperVector , 你可以试试 bitbucket, 不限容量, 而且可以作为私有项目, 唯独限制的就是 TERM 不可以超过一定的人数, 这似乎不是问题.

我的一部分不敢见人的烂代码就是在 bitbucket 上设为私有的, 作为 github 上公开项目的子模块.

@CasperVector
Copy link
Member

我擦泪,才发现 Google Code 居然不让放大文件在 git 里,我的这个文件也是:
https://caspervector-dist.googlecode.com/git/pg-povray/pg-povray-0.1.1.zip
那看来必须迁移了。

@zw963
Copy link
Author

zw963 commented Sep 6, 2014

http://bitbucket.org/ 吧. 貌似没有文件大小限制, 也不限制容量. 比 github 稳定些.

@CasperVector
Copy link
Member

嗯,这两天一有空就把这事办了。

@wengxt
Copy link
Contributor

wengxt commented Sep 6, 2014

放数据我还是推荐 sourceforge。很多项目的 iso 文件都有放在上面下载还能统计下载数,还有很多镜像。

@zw963
Copy link
Author

zw963 commented Sep 19, 2014

还是无权限下载, 啥时候解决呀? : (

@CasperVector
Copy link
Member

抱歉,最近事实在太多 =。=
请看最新 push 的版本(b8ac223e)。

@zw963
Copy link
Author

zw963 commented Oct 5, 2014

嘿, 我在 Slackware 14.1 上编译提示:

scons: done reading SConscript files.
scons: Building targets ...
g++ -o src/portability.os -c -g -Wall -pipe -fPIC -DHAVE_CONFIG_H -DSUNPINYIN_DATA_DIR='"/usr/local/fcitx/share/sunpinyin"' -I. -Isrc -Isrc/ime-core -Isrc/slm -Isrc/slm/slmprune -Isrc/slm/mmseg -Isrc/slm/ids2ngram -Isrc/slm/slmseg -Isrc/slm/thread -Isrc/slm/tools -Isrc/slm/slmbuild -Isrc/slm/getwordfreq -Isrc/slm/tslmendian -Isrc/slm/tslminfo -Isrc/slm/slminfo -Isrc/slm/slmpack -Isrc/pinyin -Isrc/lexicon src/portability.cpp
src/portability.cpp: In function ‘size_t MBSTOWCS(TWCHAR*, const char*, size_t)’:
src/portability.cpp:197:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while (dst - pwcs < n) {
                         ^
src/portability.cpp: In function ‘size_t WCSTOMBS(char*, const TWCHAR*, size_t)’:
src/portability.cpp:228:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while (dst - s < n) {
                      ^
src/portability.cpp:237:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (dst - s > n) return -1;
                       ^
src/portability.cpp: In function ‘char* strndup(const char*, size_t)’:
src/portability.cpp:270:32: error: declaration of ‘char* strndup(const char*, size_t)’ has a different exception specifier
 strndup(const char *s, size_t n)
                                ^
In file included from src/portability.cpp:46:0:
src/portability.h:330:18: error: from previous declaration ‘char* strndup(const char*, size_t) throw ()’
 extern "C" char *strndup(const char *s, size_t n);
                  ^
scons: *** [src/portability.os] Error 1
scons: building terminated because of errors.

我不太确定问题出在那里, 之前更新过一些跟 python 有关的库, 不知傲有没有关系.
不过在虚拟机中, 另一个基于 Slackware 的发布版编译通过了.
也许是某些库不兼容? 希望对你有用.

@CasperVector
Copy link
Member

建议开一个新 issue。

有可能是 scons 错误地没检测到系统提供的 strndup 函数……
config.h 里有没有定义 HAVE_STRNDUP
(参考:https://stackoverflow.com/questions/20463445/)。

tchaikov added a commit that referenced this issue Oct 7, 2014
* src/portablity.{cpp,h}: remove implementation of 'strndup'
* see #49
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

No branches or pull requests

3 participants