Problems With Installing Tacg Package In Ubuntu
2
0
Entering edit mode
10.6 years ago
Lucas • 0

I was trying to install tacg package in the Ubuntu. And after "make check", I got this message.

gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"tacg\" -DVERSION=\"4.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_LIBM=1 -DHAVE_LIBNSL=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_MMAP=1 -DHAVE_STRFTIME=1 -DHAVE_VPRINTF=1 -DHAVE_PUTENV=1 -DHAVE_RE_COMP=1 -DHAVE_REGCOMP=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSPN=1 -DHAVE_STRSTR=1 -DHAVE_UNAME=1 -I.     -g -O2 -MT Cutting.o -MD -MP -MF .deps/Cutting.Tpo -c -o Cutting.o Cutting.c
In file included from Cutting.c:17:0:
    tacg.h:152:27: error: array type has incomplete element type
    tacg.h:154:28: error: array type has incomplete element type
    tacg.h:635:7: warning: conflicting types for built-in function ‘fmax’ [enabled by default]
    tacg.h:787:28: error: array type has incomplete element type
    make: *** [Cutting.o] Error 1

Can anybody help explain what this means? And how I can install this tacg successfully? Thanks a lot.

ubuntu • 2.3k views
ADD COMMENT
0
Entering edit mode
10.6 years ago
Neilfws 49k

If you search the Web for the phrase "array type has incomplete element type", you'll see that this is quite a common issue. Basically, it means that whoever wrote the C code for this software did not do a very good job.

I note that someone asked the same question 4 years ago, without a response.

You could troubleshoot this issue and edit the source code yourself, but - it seems to me that this is very old, poorly-maintained software. It's been around since at least 1998. There are sure to be newer and better alternatives; I'd look at the EMBOSS suite.

ADD COMMENT
0
Entering edit mode
10.6 years ago
Hamish ★ 3.2k

The current version of tacg (4.1.0) does not support the current version of gcc and fails to compile with the error you observe

However you can build if you apply a set of patches contributed by Charles Plessy to enable builds with gcc 4: http://sourceforge.net/p/tacg/patches/1/

wget http://downloads.sourceforge.net/project/tacg/tacg/tacg-4.1/tacg-4.1.0-src.tar.bz2
tar zjf tacg-4.1.0-src.tar.bz2
cd tacg-4.1.0-src
wget http://sourceforge.net/p/tacg/patches/_discuss/thread/55725c46/3160/attachment/to-build-with-gcc4.patch
patch -p1 < to-build-with-gcc4.patch
./configure
make

You can then test that the build works with something like:

export TACGLIB=`pwd`/Data
./tacg -S -f1 -n3 -o1 -T 1,3 -C0 -c -L -F0 -D1 -w60 < ~/test/data/sequence/nuc_embl_L12345.tfa

In this case the input data file is EMBL:L12345.

On a Ubuntu 12.04 LTS the program generates the expected restriction map of the sequence before triggering a glibc error:

*** glibc detected *** ./tacg: free(): invalid pointer: 0x00007f20a7c33560 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f20a71bbb96]
./tacg[0x403639]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f20a715e76d]
./tacg[0x404cbd]

You may have better luck with the version in CVS, rather than the release build (see http://sourceforge.net/p/tacg/code/?source=navbar).

For what it is worth, the last time I built a working version of tacg it was not the latest version, but instead the older 3.12. This still required a couple of changes (patch set provided below) but does not give the glibc error and accompanying segfault:

diff -Naur tacg-3.12-src/Makefile.in tacg-3.12-src_patched/Makefile.in
--- tacg-3.12-src/Makefile.in    2001-06-12 23:17:06.000000000 +0100
+++ tacg-3.12-src_patched/Makefile.in    2013-10-14 14:45:51.559741916 +0100
@@ -21,7 +21,7 @@
 # Simply edit CFLAGS for your local compiler/system
 #
 # -O2  will work for most systems
-CFLAGS = -O3 -m486  -Wall -fPIC
+CFLAGS = -O3 -Wall -fPIC
 # for gcc on intel, add -m486 to CFLAGS 
 # -fPIC for building Position Independent Code for dynamic lib

diff -Naur tacg-3.12-src/SeqFuncs.c tacg-3.12-src_patched/SeqFuncs.c
--- tacg-3.12-src/SeqFuncs.c    2001-08-20 23:20:21.000000000 +0100
+++ tacg-3.12-src_patched/SeqFuncs.c    2013-10-14 14:44:01.003739835 +0100
@@ -91,7 +91,7 @@
     should have been functionized long ago */

 void LinearMap(long seq_len, int basesPerLine, int NumREs, char *sequence, int max_okline, 
-                char Codons[][][], int codon_Table) {
+                char Codons[MAX_ORGS][N_CODONS][7], int codon_Table) {

     /* Declarations */
    int i, d, k, mm=0, rc, n_letters=0, Xn=0, okline, HTML, spacer, spacermod, nocuts, stanzaspace,
@@ -173,13 +173,13 @@

         /*write the correct numbering in Left margin  */
     if (F.NumStart < 1 && (((block_Cnt-1)*basesPerLine) + 1 + F.NumStart) == 0) {numstart++; tripclick++;}
-    sprintf((char *)s, "%7d",(((block_Cnt-1)*basesPerLine) + 1 + numstart)); /* numstart is just a + offset */
+    sprintf((char *)s, "%7ld",(((block_Cnt-1)*basesPerLine) + 1 + numstart)); /* numstart is just a + offset */
     memcpy(&O_txt[O_SEQ_LINE][0], s, 7);
         /* and in the right margin - combine with the above bit? */
     if (F.NumStart < 0 && (tripclick || (((block_Cnt)*basesPerLine + numstart)) > 0)) {
       if (!tripclick) {tripclick++; numstart++;}
     }
-        sprintf((char *)s, "%7d",(((block_Cnt)*basesPerLine + numstart)));
+        sprintf((char *)s, "%7ld",(((block_Cnt)*basesPerLine + numstart)));
         memcpy(&O_txt[O_SEQ_LINE][O_LMARG+basesPerLine], s, 7);
         /* and drop in the sequence directly after it. */

diff -Naur tacg-3.12-src/tacg.h tacg-3.12-src_patched/tacg.h
--- tacg-3.12-src/tacg.h    2001-09-07 00:57:45.000000000 +0100
+++ tacg-3.12-src_patched/tacg.h    2013-10-14 14:42:06.471737678 +0100
@@ -591,7 +591,7 @@

 /* fmax/imax return the float/int max of 2 values (mainly to save space) - it's another
     1 liner, but should be used relatively infrequently */
-float fmax(float v1, float v2);
+/* float fmax(float v1, float v2); */
 int imax(int v1, int v2);

 /* BitArray() is a 1st pass approx to doing interesting things with bit strings
@@ -740,7 +740,7 @@
     and functional enough to makeinto its own fn().  It takes the DD.Dat struct
    and parses the hit data out of it and composes a Linear Map out of it. */
 void LinearMap(long seq_len, int basesPerLine, int NumREs, char *sequence, 
-                     int max_okline, char Codons[][][], int codon_Table);  
+                     int max_okline, char Codons[MAX_ORGS][N_CODONS][7], int codon_Table);  

 /* Clone() goes thru RE[] and figures out which REs match the conditions of the option flag, where
    --clone '#_#,#x#,#x#,#_#' (up to MAX_NUM_CLONE_RANGES).  '_' indicates that the range cannot be cut;
diff -Naur tacg-3.12-src/udping.c tacg-3.12-src_patched/udping.c
--- tacg-3.12-src/udping.c    2001-08-21 03:56:49.000000000 +0100
+++ tacg-3.12-src_patched/udping.c    2013-10-14 14:38:30.059733637 +0100
@@ -54,7 +54,7 @@

 extern uid_t getuid();
 extern int socket();
-extern int sendto();
+/* extern int sendto(); */
 extern int close();

 int iamhere(char *progname)
ADD COMMENT

Login before adding your answer.

Traffic: 2105 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