PDA

View Full Version : [ubuntu] Make error while installing MCScanX



prasanth_tej_kumar
February 12th, 2014, 01:11 PM
i am unable to install a software

when i give command make

i am getting the following error message

" msa.cc: In function ‘void msa_main(const char*)’:
msa.cc:289:22: error: ‘chdir’ was not declared in this scope
if (chdir(html_fn)<0)
^
make: *** [mcscanx] Error 1"

please tell me a solution

bc.haynes
February 12th, 2014, 04:07 PM
Are you trying to install a program or are you trying to compile (make) one?

What are you trying to install?

What distro are you using (Ubuntu, Xubuntu, Lubuntu, etc.)?

prasanth_tej_kumar
February 13th, 2014, 07:22 AM
i am trying to install a program and i am using ubuntu

i am tring to install MCScanX

vasa1
February 13th, 2014, 08:45 AM
Did you see this: https://github.com/wyp1125/MCScanx ? What did you do before running "make"? You should really give people more information so that they can help you.

prasanth_tej_kumar
February 14th, 2014, 08:09 AM
my comupter is sony E series intel core i3-2310M processor 2.10GHz
64-bit
8GB RAM 320GB HARD DISK
ROOT FILE IN 5GB
SWAP FILE IN 2GB
this is want i have done before doing make
$unzip MCscanx.zip
$cd MCScanx
$make

once i enter after make i get the following response

prasanth@prasanth-VPCEH16EN:~/src/MCScanX$ make
g++ struct.cc mcscan.cc read_data.cc out_utils.cc dagchainer.cc msa.cc permutation.cc -o MCScanX
msa.cc: In function ‘void msa_main(const char*)’:
msa.cc:289:22: error: ‘chdir’ was not declared in this scope
if (chdir(html_fn)<0)
^
make: *** [mcscanx] Error 1
prasanth@prasanth-VPCEH16EN:~/src/MCScanX$

steeldriver
February 14th, 2014, 09:50 AM
If you are building on 64-bit you may need to add


#include <unistd.h>

to msa.h, dissect_multiple_alignment.h, and detect_collinear_tandem_arrays.h

prasanth_tej_kumar
February 14th, 2014, 11:37 AM
thank you so much

but where can i get the unistd.h file?

steeldriver
February 14th, 2014, 12:31 PM
The unistd.h file is a system header file - it should have been installed as part of the libc6-dev package (which in turn is a dependency of the build-essential metapackage). All you need to do is add the include directive that I indicated in my previous post to each of the indicated header files e.g. in msa.h



#include <iostream>
#include <fstream>
#include <sys/stat.h>
#include <unistd.h>

#include "struct.h"

struct New_endpoint
{
Gene_feat *n;

prasanth_tej_kumar
February 15th, 2014, 06:40 AM
thank you so much now i have overcame error1