Benson-Genomics-Lab / TRF

Tandem Repeats Finder: a program to analyze DNA sequences
https://tandem.bu.edu/trf/trf.html
GNU Affero General Public License v3.0
152 stars 26 forks source link

Installation issue #2

Open RobBarringer opened 3 years ago

RobBarringer commented 3 years ago

Hi, I'm having some trouble installing TRF to use with RepeatModeller, and I'm hoping you might be able to give some advice on how to fix this. I'm running macOS High Sierra v10.13.6 on my MacBook Pro.

In the terminal I cloned the repository using:

git clone https://github.com/Benson-Genomics-Lab/TRF.git

Then I moved to the directory, made a build subdirectory and within that, compiled:

cd trf-4.10.0 mkdir build cd build ../configure

This didn't throw up any warnings or errors, the output was:

checking build system type... x86_64-apple-darwin17.7.0 checking host system type... x86_64-apple-darwin17.7.0 checking target system type... x86_64-apple-darwin17.7.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ../install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking whether make supports the include directive... yes (GNU style) checking dependency style of gcc... gcc3 checking for ranlib... ranlib checking whether ln -s works... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for size_t... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... yes checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... yes checking for library containing floor... none required checking for sqrt... yes checking for memset... yes checking for strchr... yes checking for strerror... yes checking for strstr... yes checking for strtol... yes checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating config.h config.status: executing depfiles commands

After this I ran:

make

And then a number of warnings and errors return:

/Library/Developer/CommandLineTools/usr/bin/make all-recursive Making all in src gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -fno-align-functions -fno-align-loops -g -O2 -MT trf-trf.o -MD -MP -MF .deps/trf-trf.Tpo -c -o trf-trf.o test -f 'trf.c' || echo '../../src/'trf.c clang: warning: optimization flag '-fno-align-functions' is not supported [-Wignored-optimization-argument] clang: warning: optimization flag '-fno-align-loops' is not supported [-Wignored-optimization-argument] In file included from ../../src/trf.c:34: In file included from ../../src/trfrun.h:92: ../../src/tr30dat.h:365:25: error: use of undeclared identifier '_MAX_PATH' char inputfilename[_MAX_PATH]; / constant defined in stdlib / ^ ../../src/tr30dat.h:366:24: error: use of undeclared identifier '_MAX_PATH' char outputprefix[_MAX_PATH]; ^ ../../src/tr30dat.h:367:27: error: use of undeclared identifier '_MAX_PATH' char outputdirectory[_MAX_PATH]; ^ ../../src/tr30dat.h:368:26: error: use of undeclared identifier '_MAX_PATH' char outputfilename[_MAX_PATH]; ^ In file included from ../../src/trf.c:34: ../../src/trfrun.h:309:57: warning: passing 'unsigned char ' to parameter of type 'char ' converts between pointers to integer types with different sign [-Wpointer-sign] MakeMaskedFile(GlobalIndexList, paramset.maskedfile, Sequence, maskstring); ^~~~ ../../src/trfclean.h:878:54: note: passing argument to parameter 'Sequence' here void MakeMaskedFile(IL headptr,int masked,char Sequence,char maskfile) ^ In file included from ../../src/trf.c:34: ../../src/trfrun.h:536:57: warning: passing 'unsigned char ' to parameter of type 'char ' converts between pointers to integer types with different sign [-Wpointer-sign] MakeMaskedFile(GlobalIndexList, paramset.maskedfile, Sequence, maskstring); ^~~~ ../../src/trfclean.h:878:54: note: passing argument to parameter 'Sequence' here void MakeMaskedFile(IL headptr,int masked,char Sequence,char maskfile) ^ In file included from ../../src/trf.c:34: ../../src/trfrun.h:795:11: warning: assigning to 'unsigned char ' from 'char ' converts between pointers to integer types with different sign [-Wpointer-sign] Sequence = pseq->sequence-1; / start one character before / ^ ~~~~ ../../src/trfrun.h:926:42: warning: passing 'unsigned char ' to parameter of type 'char ' converts between pointers to integer types with different sign [-Wpointer-sign] paramset.datafile,paramset.maskedfile,Sequence,maskstring); ^~~~ ../../src/trfclean.h:100:44: note: passing argument to parameter 'Sequence' here int maxsize, int data, int masked, char Sequence, ^ ../../src/trf.c:120:28: error: initializer element is not a compile-time constant {"dat", no_argument, &paramset.datafile, 1}, / -d, -D / ^~~~~~ ../../src/trf.c:322:21: error: use of undeclared identifier 'dirsymbol' while(i>0&&pname!=dirsymbol) ^ ../../src/trf.c:327:13: error: use of undeclared identifier 'dirsymbol' if(*pname==dirsymbol) pname++; ^ 4 warnings and 7 errors generated. make[2]: [trf-trf.o] Error 1 make[1]: [all-recursive] Error 1 make: *** [all] Error 2

I don't think it has properly installed, because when looking in the src sub-directories in /build and the TRF master directory, I can't find a file called trf (only trf.c):

'$ pwd' ~/TRF/build '$ ls' Makefile config.h config.log config.status src stamp-h1 '$ ls src/' Makefile '$ ls ..' AUTHORS Makefile.in build configure install-sh COPYING NEWS compile configure.ac missing ChangeLog README config.guess depcomp src INSTALL README.md config.h.in history.txt t Makefile.am aclocal.m4 config.sub images_for_readme test_seqs.txt '$ ls ../src/' Makefile.am Makefile.in tr30dat.c tr30dat.h trf.c trfclean.h trfrun.h

If anybody could help me troubleshoot, I would be very grateful! I'm not very savvy when it comes to compiling and installing within terminals, so sorry if I've overlooked something simple!

Thanks,

Rob

katriken commented 3 years ago

Hi Rob,

I had the same problem. Try to download the source code from here: https://github.com/Benson-Genomics-Lab/TRF/releases And repeat the installation as usual. This helped me :)

Best, Katja

maximilianpress commented 3 years ago

I also ran into this issue installing from the current master. @katriken 's suggestion of using the release version worked for me.

doctorksk commented 2 years ago

Hi,

I tried installing using the instructions in the README and also using @katriken 's suggestion but I still can't seem to be able to install. I get the following series of errors and warnings:

/Library/Developer/CommandLineTools/usr/bin/make all-recursive Making all in src gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -fno-align-functions -fno-align-loops -g -O2 -MT trf-trf.o -MD -MP -MF .deps/trf-trf.Tpo -c -o trf-trf.o test -f 'trf.c' || echo '../../src/'trf.c clang: warning: optimization flag '-fno-align-loops' is not supported [-Wignored-optimization-argument] In file included from ../../src/trf.c:30: In file included from ../../src/trfrun.h:89: ../../src/tr30dat.h:49:9: warning: You forgot to define a platform when compiling. Setting UNIXCONSOLE. [-W#pragma-messages]

pragma message( \

    ^

In file included from ../../src/trf.c:30: ../../src/trfrun.h:648:11: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] ( ( maxwraplength + 1 ) ( MAXBANDWIDTH + 1 ) ) sizeof( *stemp ), ^~~~~~~~~~~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:62: note: expanded from macro 'snprintf' builtin___snprintf_chk (str, len, 0, darwin_obsz(str), __VA_ARGS__) ^~~ 2 warnings generated. mv -f .deps/trf-trf.Tpo .deps/trf-trf.Po gcc -fno-align-functions -fno-align-loops -g -O2 -o trf trf-trf.o
make[2]: Nothing to be done for `all-am'.

I'm also fairly new to compiling and I hope this is just a beginner's mistake on my end. By the way, I'm on a M1 2020 machine running macOS Monterey v12.0.1

yzhernand commented 2 years ago

@doctorksk I don't have access to an M1 machine, but it's possible that this issue may be present only on that architecture. Does anyone else have an M1 machine to test compiling on?

Also, it does look like the binary was built, or am I mistaken? I can't see anywhere in that message where an error caused the build to fail, just some warnings.

doctorksk commented 2 years ago

@doctorksk I don't have access to an M1 machine, but it's possible that this issue may be present only on that architecture. Does anyone else have an M1 machine to test compiling on?

Also, it does look like the binary was built, or am I mistaken? I can't see anywhere in that message where an error caused the build to fail, just some warnings.

Thanks for checking in @yzhernand! I managed to run TRF using the latest pre-compiled build. Not sure about the warnings and errors when I tried to install 4.10.1, even if only warnings I could not run software.