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

[已解决]cygwin 无法编译 #1178

Closed
wxyzh opened this issue Feb 3, 2017 · 15 comments
Closed

[已解决]cygwin 无法编译 #1178

wxyzh opened this issue Feb 3, 2017 · 15 comments

Comments

@wxyzh
Copy link

wxyzh commented Feb 3, 2017

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

a906d0c

What operating system are you using?

windows 10 pro x64 & babun

What did you do?

Get the latest source code
Build and install the latest mbedTLS and libsodium

cd shadowsocks-libev
./autogen.sh
./configure --disable-documentation --with-mbedtls-include=$home/mbedtls-2.4.0/include --with-mbedtls-lib=$home/mbedtls-2.4.0/library
make -j

What did you expect to see?

build pass

What did you see instead?

.......
......
  CC       src/libcork/posix/libcork_la-process.lo
src/libcork/posix/process.c: In function ‘cork_cleanup_at_exit_named’:
src/libcork/posix/process.c:116:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
 }
 ^
  CC       src/libcork/posix/libcork_la-subprocess.lo
src/libcork/posix/subprocess.c:504:2: error: #error "Unknown thread yield implementation"
 #error "Unknown thread yield implementation"
  ^
Makefile:717: recipe for target 'src/libcork/posix/libcork_la-subprocess.lo' failed
make[2]: *** [src/libcork/posix/libcork_la-subprocess.lo] Error 1
make[2]: Leaving directory '$home/shadowsocks-libev/libcork'
Makefile:468: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '$home/shadowsocks-libev'
Makefile:376: recipe for target 'all' failed
make: *** [all] Error 2

What is your config in detail (with all sensitive info masked)?

@wxyzh wxyzh changed the title cygwin 无法编译 [以解决]cygwin 无法编译 Feb 3, 2017
@wxyzh
Copy link
Author

wxyzh commented Feb 3, 2017

已经编译成功,但是运行速度太慢,数据传输速度大概只有不到2MB/s

@testcaoy7
Copy link

@wxyzh 怎么编译的,是编译的git版本还是release 3.0

@Springchendg
Copy link

@wxyzh 遇到同样的错误,请问怎样才能成功编译?

@wxyzh
Copy link
Author

wxyzh commented Feb 3, 2017

修改 libcork的代码
在以下两个位置最后添加|| defined(__CYGWIN__)
libcork\src\libcork\posix\subprocess.c 500行
libcork\src\libcork\posix\env.c 186行

madeye added a commit that referenced this issue Feb 3, 2017
@madeye
Copy link

madeye commented Feb 3, 2017

Please try ce0d6d4

@testcaoy7
Copy link

testcaoy7 commented Feb 3, 2017

babun编译成功
只是udns在babun下没有包还要还要另外下源码编译……

速度主要看VPS的线路了,和新的AEAD加密关系不大

@wxyzh wxyzh changed the title [以解决]cygwin 无法编译 [已解决]cygwin 无法编译 Feb 3, 2017
@wxyzh
Copy link
Author

wxyzh commented Feb 3, 2017

@testcaoy7
确实,我自己编译了libudns,libsodium,mbedtls。
@madeye 可以关闭issue了。
另外,cygwin下的带宽如何,我测试了一段时间,没有超过2MB/s的;相同网络环境 mingw64编译的2.6.1版本大概能跑到3.5MB/s以上

@cokebar
Copy link

cokebar commented Feb 4, 2017

@wxyzh 求助编译步骤 感谢!
话说mbedtls可以从VS编译 不知道和GCC编译出来的会不会速度有差别

@wxyzh
Copy link
Author

wxyzh commented Feb 5, 2017

@cokebar ,和linux下编译一样,cygwin没有libudns,libsodium,mbedtls的包,需要自己编译。

@kimw
Copy link

kimw commented Feb 5, 2017

@wxyzh If this issue was solved, maybe you wish to close it.

@wxyzh wxyzh closed this as completed Feb 5, 2017
@cokebar
Copy link

cokebar commented Feb 6, 2017

@wxyzh 3.0可以用mingw编译么

@testcaoy7
Copy link

@cokebar 我记得mingw好像已经被drop support了吧

@cokebar
Copy link

cokebar commented Feb 6, 2017

@madeye I still got same error with latest src.
cygwin x86 on WIN7 pro x86

@cokebar
Copy link

cokebar commented Feb 6, 2017

@madeye Sorry, I made a mistake. I got same error when I'm building simple-obfs. You should merge this change into simple-obfs also.

@cokebar
Copy link

cokebar commented Feb 6, 2017

@wxyzh 感谢!我已经编译成功了。另:libsodium官方网站上有与编译好的dll,有vs编译的版本也有mingw编译的版本,直接用就行了,省好长时间。

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

6 participants