Install Plink In Cygwin
2
0
Entering edit mode
13.5 years ago
Zhshqzyc ▴ 520

Can I install PLINK in cygwin? Need steps if so.

Thanks.

plink genetics • 7.5k views
ADD COMMENT
1
Entering edit mode

You need to follow the instructions that David linked to, then if something does not work and you have specific questions you can ask those.

ADD REPLY
2
Entering edit mode
13.5 years ago

Download the source code. Unzip it. Follow the instructions in README.TXT:

COMPILATION: You will need a standard C/C++ compiler such as GNU gcc (version 3). This is likely available on all Linux/Unix platforms. For MS-DOS, DJGPP or MinGW are appropriate choices. To help compiling, see documentation (basically, just be sure to select the correct Makefile and type make -f Makefile.*)

That ought to work.

ADD COMMENT
0
Entering edit mode

Need more advice. I have Visual Studio 2010, can I use it to compile it? I want to use plink in cygwin rather than dos/windows. What is the proper path(/usr/local/bin/)??? Because I downloaded it to c drive.

ADD REPLY
0
Entering edit mode

gcc is included in Cygwin (or at least installable through the menu) - you just need to follow the instructions

ADD REPLY
0
Entering edit mode

Just downloaded a bunch of code and compiled them. Errors: zstream something... My laptop is windows 7 64 bit. There are two versions of plink: Linux (x86_64) and Linux (i686). Which one should I select? By the way, dos version plink works greatly so far.

ADD REPLY
0
Entering edit mode

Please update your question with what exactly you did. Otherwise noone will be able to help you (x86_64 is 64 bit but the source does not have an archtitecture).

ADD REPLY
0
Entering edit mode
12.4 years ago
j.f.quinn • 0

I just figured out how to do this myself: these are the snags a ran into with compiling and how I solved them. I am on windows 7 64bit machine with the latest cygwin standard installation.

  1. you need to edit the makefile so the options are like this:

    Set this variable to either UNIX, MAC or WIN

    SYS = UNIX

    Leave blank after "=" to disable; put "= 1" to enable

    WITHRPLUGINS = WITHWEBCHECK = FORCE32BIT = 1 WITHZLIB = WITHLAPACK = FORCE_DYNAMIC =

  2. compiler for me threw an error because the source code uses a function call to "fopen64" in c++, which wasn't recognized by the compiler (gcc 4.3.4) so just did a find replace like so:

    sed -i *.cpp s/fopen64/fopen/g

  3. compiler then threw another error "ld: cannot find -lgcc_s", which i guess is a known bug which you can read about here: http://cygwin.com/ml/cygwin/2007-06/msg00332.html i fixed this by adding the flag -static-libgcc in the section of the makefile where you can add additional flags to the compiler

    Any other compiler flags here ( -Wall, -g, etc)

    CXXFLAGS = -static-libgcc

then it compiled just fine!

hope this helps someone..

ADD COMMENT

Login before adding your answer.

Traffic: 1588 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6