Pages

Showing posts with label openssl. Show all posts
Showing posts with label openssl. Show all posts

Wednesday, February 26, 2014

Windows에서 MinGW-builds(MinGW-w64)를 이용하여 libssh를 빌드하는 경우 유 의점

라이브러리 의존성: zlib, openssl

메모

  • zlib: 큰 문제 없음. mingw32-make -f win32/Makefile.gcc 한방으로 해결 가능
  • openssl: www.mingw.org에서 MSYS를 다운로드받은 후, 소스코드를 MSYS의 tar로 풀어낼것. 그렇지 않은 경우 tarball 안에 있는 symlink가 제대로 처리되지 않음
  • libssh: 두가지 유의사항이 있음
    1. 빌드 디렉토리는 소스코드 디렉토리가 아닌 다른 곳이어야 함
    2. 소스코드 직접 수정 필요: return pthread_self().p를 return pthread_self()로 수정해야 함. 이는 MinGW-builds와 www.mingw.org 양쪽 경우에 대해 pthread 드라이버의 구현 방식이 다르기 때문일 것으로 추측함(소스코드를 비교해보지는 않았음)

Monday, February 24, 2014

Memo on building libssh in Windows with MinGW-builds(MinGW-w64)

Requirements: zlib, openssl

Remarks

  • zlib: Just mingw32-make -f win32/Makefile.gcc and that’s all
  • openssl: Install MSYS from www.mingw.org and use tar on that MSYS package to untar the source tarball. If not, the links on the tarballs are not adequately managed
  • libssh: two things
    1. The build directory should be other than the source tree
    2. You’ve got to edit source code to return pthread_self(), rather than pthread_self().p, which is used under #ifdef _WIN32_. This seems to be because of the differences of pthread implementations between mingw.org and mingw-w64 (though not I didn’t compare the source codes)