error: C compiler cannot create executables while installing fastStrucutre

260 views
Skip to first unread message

Navin Shrestha

unread,
Dec 26, 2023, 6:00:48 PM12/26/23
to structure-software
I am following this youtube video (https://www.youtube.com/watch?v=tAScTlKW60w) from Jash Banta to install fastSTRCUTURE.  

When doing the ./configure step. The error says : checking for C compiler default output file name... configure: error: C compiler cannot create executables. I then ran the following codes:
     sudo apt-get install build-essential
     sudo apt install libc6-dev
     sudo apt-get install

Despite running these codes, I am still getting the same error (C compiler cannot create executables).

Could anybody share his/her experience to resolve this issue?

Regards,
Navin Shrestha

Kris van der Gaag

unread,
Dec 27, 2023, 9:01:45 AM12/27/23
to structure-software
Hi Navin,

Instead of FastSTRUCTURE you might want to try ezstructure (basically a python3 version of fastSTRUCTURE) which can be installed via the python package index using 'pip install ezstructure'.It's been a while that I used it, but the installation was way more smooth than the earlier version that was not maintained.

Regards,
Kris

Francisco Pina Martins

unread,
Dec 27, 2023, 9:33:20 PM12/27/23
to structure-software
Hello Navin,

fastStructure is *really* hard to install these days, since python2 is mostly gone from every remotely recent GNU/Linux distribution.
ezstructure is a nice alternative, unless you are using the `prior=logistic` option, where it gets kind of slow. If that is not working for you, you can try to generate a faststructure binary using an older Ubuntu image on docker (18.04 will work) - you can follow the instructions here: https://gitlab.com/StuntsPT/Structure_threader/-/blob/master/helper_scripts/install_faststructure.sh?ref_type=heads (or just runt he whole script). I haven't used it in a while, so some things might have changed and need some tweaking.
Alternatively, you can just do `python3 -m pip install structure_threader` which will also install a pre-built faststructure binary for you on `~/.local/bin/faststructure`, or on the appropriate PATH if you are using conda.
Best,

Francisco

Navin Shrestha

unread,
Dec 27, 2023, 10:44:05 PM12/27/23
to kris.v...@gmail.com, structure...@googlegroups.com
Hi Kris,

Thank you for your response and for letting me know about ezstructure as an alternative to fastStructure. I tried to work with ezstructure, and while installing pip in ubuntu linux 22.04, I got an error message when I ran $ pip3 --version trying to know the pip3 version installed. The error message is:

Command 'pip3' not found, but can be installed with:
sudo apt install python3-pip

I re-ran the code $ sudo apt install python3-pip, and still got the same error message. I have attached the screenshot below:

Screenshot 2023-12-27 180500.png

I also tried to install the ezstructure in Google Colab, I got following error message:
Error: Could not build wheels for ezstructure, which is required to install pyproject.toml-based projects. Screenshot from Google Colab is attached below:

GC.png

Would you please not mind in walking me through the steps of ezstructure to install?


Regards,
Navin 

--
You received this message because you are subscribed to the Google Groups "structure-software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/structure-software/350fa2f8-a6e2-4f61-a41d-19661be5964en%40googlegroups.com.


--
Sincerely,
Navin Shrestha

Navin Shrestha

unread,
Dec 27, 2023, 10:50:56 PM12/27/23
to f.pina...@gmail.com, structure...@googlegroups.com
Hi Francisco,

Thank you for making my head clear about the utility of fastStructure in the current scenario where python2 is almost obsolete. I will play with Structure Threader and see if I can grasp the steps and make it worth. I am a very beginner in the field of coding. I will reach out to you if I have any questions.

I really appreciate your concern regarding my queries on fastStrcutre and leading me toward the alternative solution.

Regards,
Navin

Navin Shrestha

unread,
Dec 29, 2023, 6:53:39 PM12/29/23
to structure...@googlegroups.com
Hello,

I was able to setup Python2 environment in Ubuntu Linux 20.04 and install fastStructure. I already ran my analysis through STRUCTURE software. And want to run through fastStructure as well. However, I am not being able to convert the files to .bed, .fam and .bim file format. How could I convert them in right format so that I can run it into fastStructure. 

I have attached the input file for STRUCTURE software that I used.

By the way, does fastStructure has the provision of including the name of genotypes on the x-axis?

Regards.
Navin 
STRdata.txt

Francisco Pina Martins

unread,
Dec 30, 2023, 9:36:46 PM12/30/23
to structure-software
Hi Navin,
You don't have to convert the file to Plink format. You can just modify your STRUCTURE input file to fastStructure. The Structure_threader manual has an entry on how it should look like. Hope this helps.

Best,
Francisco

Navin Shrestha

unread,
Dec 31, 2023, 11:12:32 AM12/31/23
to f.pina...@gmail.com, structure...@googlegroups.com
Hi  Francisco,

Thank you for your response. 

I have the output file from GAPIT where the allele dosage is in 0 1 2 format. however looks like fastStructure takes 1 2 3 4 -9 format. Will 0 1 2 be compatible with fastStructure? 

Francisco Pina Martins

unread,
Jan 1, 2024, 7:05:45 PM1/1/24
to Navin Shrestha, structure...@googlegroups.com

Hi again Navin,

As far as I can tell, STRUCTURE also requires the 1 2 3 4 -9 format. I’m not sure how (if) STRUCTURE handles the Homozygous1, Heterozygous, Homozygous2 format. I suppose this is the format you are referring to. Did you run this file through STRUCTURE?

Francisco

Reply all
Reply to author
Forward
0 new messages