Can anyone help me to compile a molecular biology program?

I am a Ph. D. student in molecular biology field.
The software that I want to use is glimmer3.02 form NCBI.
The problem is when I use my macbook to compile, it works well without error. But my server is builded by opensuse 11.0, I can not compile that soft on my server.

Could anyone help me to setup that? :frowning:

The release notes for glimmer say that it builds fine on Linux. So what error messages did you get when you tried to compile on Linux? Do you have make and the C development packages installed? Those are not installed by default.

I have make and gcc installed. The problem is that I can not compile glimmer3.02 on my server, but it works well on MacOSX. I am not programer, so I don’t know what happened and differences between MacOSX and OpenSuse.
Based on the error messages,

  • Make Target is all
Making Directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/Common all

make[1]: Entering directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/Common' make[1]: Leaving directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/Common’
make[1]: Entering directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/Common' @@@@@@@@@@@@@@@@@@@ delcher.cc @@@@@@@@@@@@@@@@@@@@@ delcher.cc: In function ‘void Reverse_String(char*)’: delcher.cc:284: error: ‘strlen’ was not declared in this scope delcher.cc: In function ‘char* Strip_Trailing(char*, char)’: delcher.cc:404: error: ‘strlen’ was not declared in this scope make[1]: *** [delcher.o] Error 1 make[1]: Leaving directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/Common’

Making Directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/ICM all

make[1]: Entering directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/ICM' make[1]: Leaving directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/ICM’
make[1]: Entering directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/ICM' @@@@@@@@@@@@@@@@@@@ icm.cc @@@@@@@@@@@@@@@@@@@@@ icm.cc: In member function ‘void ICM_t::Full_Window_Distrib(char*, int, float*)’: icm.cc:525: error: ‘memcpy’ was not declared in this scope icm.cc: In member function ‘void ICM_t::Write_Header(FILE*, bool)’: icm.cc:961: error: ‘strlen’ was not declared in this scope icm.cc: In member function ‘void ICM_Training_t::Count_Char_Pairs_Restricted(const char*, int)’: icm.cc:1175: error: ‘strlen’ was not declared in this scope icm.cc: In member function ‘double Fixed_Length_ICM_t::Score_Window(char*)’: icm.cc:1551: error: ‘strncpy’ was not declared in this scope icm.cc: In member function ‘double Fixed_Length_ICM_t::subrange_score(char*, int, int)’: icm.cc:1599: error: ‘strncpy’ was not declared in this scope icm.cc: In member function ‘void Fixed_Length_ICM_Training_t::Train_Model(std::vector<char*, std::allocator<char*> >&)’: icm.cc:1714: error: ‘strncpy’ was not declared in this scope icm.cc: In member function ‘void Fixed_Length_ICM_Training_t::Write_Header(FILE*, bool)’: icm.cc:1775: error: ‘strcat’ was not declared in this scope icm.cc:1777: error: ‘strcat’ was not declared in this scope icm.cc:1779: error: ‘strlen’ was not declared in this scope icm.cc: In function ‘void Count_Char_Pairs(int (*)[16], char*, int, int)’: icm.cc:1825: error: ‘strlen’ was not declared in this scope icm.cc: In function ‘void Count_Single_Chars(int*, char*, int, int)’: icm.cc:1856: error: ‘strlen’ was not declared in this scope icm.cc: In function ‘void Permute_Data(std::vector<char*, std::allocator<char*> >&, int*)’: icm.cc:1941: error: ‘strlen’ was not declared in this scope icm.cc: In function ‘void Permute_String(char*, int*, int)’: icm.cc:1970: error: ‘strncpy’ was not declared in this scope icm.cc: In function ‘int Subscript(char)’: icm.cc:1986: error: ‘strchr’ was not declared in this scope make[1]: *** [icm.o] Error 1 make[1]: Leaving directory /home/rosewo/Desktop/Linux-SOFT/glimmer3.02/src/ICM’

There is something wrong that I can not fixed.
I use gmake to compile, but it still not work as well

ps. I am not programmer.

Can you help me? :stuck_out_tongue:

I would complain to the program authors. It appears they have missed including a needed include file declaring the prototypes for string functions. The reason it compiled on Mac OS/X may be that an older, less fussy version of g++ was installed there, or the include file was somehow pulled in by other include files and masked the problem. The C++ language has evolved and compilers are getting better at spotting potential problems.

Thank you, But what can I do?
If I can not compile that on my server, it means I need to use my notebook to analyze my data…>:(

Please help me!
Could you try to compile that for me?

Sorry, I don’t have the time to debug the program for you. But you can try this. Open up the problematic C++ files with a text editor and add this line under the other #include lines:

#include <cstring>

Hi,

guess this happens because of the newer gcc compiler in opensuse 11.0. The header dependencies were cleaned up so that the includes in the program must be fixed. For further informations have a look at GCC 4.3 Release Series — Porting to the New Tools - GNU Project - Free Software Foundation (FSF)

To fix your compile problem you have to add the missing includes or inform the author (as already suggested) of that issue. Of course you can try to install an older gcc version or try an older opensuse version as a workaround.

hope this helps

Dear Monex,
Do you mean to remove gcc4.3 and to setup gcc4 or gcc3?
will that kind of move help me? lol!
BTW, I already informed the author in Maryland University Hope they can help me…

Hi,

no I mean install two gcc versions in parallel. There is a repository in the buildservice which contains some older gcc versions and these packages are designed to be parallel installed. (Index of /repositories/devel:/tools:/gcc/openSUSE_11.0)

Have a look at gcc, matlab and opensuse 11 - openSUSE Forums there are some more hints on how to do this (maybe you have to set some environment variables so that the right compiler gets used)

By the way: never remove the default gcc packages because it may damage your system completely.

hope this helps

I got it to compile.

just add:

#include  <string.h>

to the top of every .cc file.

I think with newer gcc versions, like in openSUSE 11.0, compiling is a bit more strict - you have to include everything needed. This should be mentioned to the developers.

g

Hi
It compiles fine if you go through and edit the files adding the
include statement, then there are a couple of files to fix some 4.3
changes and it compiles fine…

Just work through each src directory and run make…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 2 days 2:53, 2 users, load average: 1.03, 1.02, 0.57
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.82

Dear All,
The author replied message to me…
I already set it up on my server.
I post his message below for anyone who has the same problem!! :slight_smile:

The compiler isn’t finding the standard C string functions.

In file delcher.hh (in directory src/Common) try changing

line 33 from

#include<string>

To

#include<cstring>

If that doesn’t work, try changing the same line to

#include<string.h>

–A. Delcher

Arthur L. Delcher

Senior Research Scientist