Problem compiling mfold_util4.6

16 replies [Last post]
jonoave
Offline
Joined: 05/11/2011

Hello,

I'm trying to install mfold_util to get a graphical output from UNAFold. And this is the following error I encounter.
1. Typing "make" results in:
make all-recursive
make[1]: Entering directory `/home/X/Downloads/mfold_util-4.6'
Making all in src
make[2]: Entering directory `/home/X/Downloads/mfold_util-4.6/src'
gcc -g -O2 -o boxplot_ng boxplot_ng.o
boxplot_ng.o: In function `draw_postscript_dots_zoom':
/home/X/Downloads/mfold_util-4.6/src/boxplot_ps.h:310: undefined reference to `sqrt'
/home/X/Downloads/mfold_util-4.6/src/boxplot_ps.h:351: undefined reference to `sqrt'
collect2: ld returned 1 exit status
make[2]: *** [boxplot_ng] Error 1
make[2]: Leaving directory `/home/X/Downloads/mfold_util-4.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/X/Downloads/mfold_util-4.6'
make: *** [all] Error 2

2.This was the output after ./configure. I noticed some of the responses were "no"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gawk... (cached) mawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking whether gcc and cc understand -c and -o together... yes
checking for XmuLookupStandardColormap in -lXmu... no
checking for glBitmap in -lGL... no
checking for gluDisk in -lGLU... no
checking for glutInit in -lglut... no
checking for gdImageCreate in -lgd... no
checking for jpeg_CreateCompress in -ljpeg... no
checking for png_IHDR in -lpng... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /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 gd.h usability... no
checking gd.h presence... no
checking for gd.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for error_at_line... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for sqrt... no
checking for strchr... yes
checking for strspn... yes
checking for strstr... yes
checking for gdImageCreate... no
checking for gdImageGif... no
checking for glutInit... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

Additional info:
1. Running on Ubuntu 10.10

2. I have already checked and installed the 3 components mentioned:
* glut/OpenGL - for interactive graphics in hybrid-plot
* GD Library - for static graphics in hybrid-plot-ng
* gnuplot - for plots in hybrid2.pl

Any suggestions, ideas on what is the problem and how to resolve this?

Thanks.

jkominek
Offline
Joined: 04/28/2014
Hello everyone, I just

Hello everyone, I just registered in to share my solution for this problem on Ubuntu 14.04. It's really simple - just add "LIBS='-lm'" to the configure command line. So, this line from Configure_Linux.bash for example:

./configure CFLAGS='-O3 -Wall' LDFLAGS='-L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/lib64'

would become this:

./configure CFLAGS='-O3 -Wall' LDFLAGS='-L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/lib64' LIBS='-lm'

This worked for me today :)

malcook
Offline
Joined: 06/18/2014
And it worked for me too... thanks

Nothing else needed!

zukerm
Offline
Joined: 11/12/2010
Thank you for solving this

Thank you for solving this problem. There appears to be some confusion. Are we discussing mfold or mfold_util? I think it is the latter. I am a bit more skilled in using the autoconfigure and automake tools than I was a few years ago. In the "configure.ac" file for mfold, the line "AC_CHECK_LIB([m], [sqrt])" occurs. As a result, Makefile.in in the source (src) directory contains: "LIBS = @LIBS@". When the user runs the configure script, Makefile contains "LIBS = -lm". You don't have to specify this on the command line when running "configure". However, the "configure.ac" file in the mfold_util package does not contain the check for "libm". This is a stupid omission. I got away with it by luck when building under Mac OS X and with RedHat Linux. Not so with Ubuntu. The solution is as you posted (LIBS='-lm' on the configure command line) or better, altering the configure.ac file, which I'll do right away.

Aderito
Offline
Joined: 10/26/2015
problems installing mfold_util-4.6

Hi, I have been following this thread and made some of the suggestions made, but I am still struggling to install mfold_util-4.6.

I have a Mac OS X.

1) Right after downloading mfold_util-4.6, I tried to install by using ./configure and got the following error:

Aderitos-MacBook-Pro:mfold_util-4.6 Aderito$ make install
Making install in scripts
../config/install-sh -c -d '/usr/local/bin'
/usr/bin/install -c ct_select.bash myps2img.bash '/usr/local/bin'
install: /usr/local/bin/ct_select.bash: Permission denied
make[2]: *** [install-binSCRIPTS] Error 71
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

2) I then followed this suggestion "...As Prof. Zuker mentioned, one should use 'Configure_Linux.bash' when compiling but edit it first (see below) by adding '-lm' (lines 8, 10)…" such that the Configure_Linux.bash codes now is

1 #!/bin/bash
2
3 if [ $# -eq 0 ] ; then
4 # This option fails on a 64 bit machine. "XmuLookupStandardColormap"
5 # not found is the complaint.
6 ./configure CFLAGS='-O3 -Wall' LDFLAGS='-L/usr/local/lib'
7 elif [ $1 -eq 32 ] ; then
8 ./configure CFLAGS='-O3 -Wall -m32' LDFLAGS='-L/usr/X11R6/lib -L/usr/local/lib -L/usr/lib -lm'
9 elif [ $1 -eq 64 ] ; then
10 ./configure CFLAGS='-O3 -Wall' LDFLAGS='-L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/lib64 -lm'
11 fi

3) After this I ran the script ./Configure_Linux.bash 64 and proceeded with make and make install. I got this error message

Aderitos-MacBook-Pro:mfold_util-4.6 Aderito$ make install
Making install in scripts
../config/install-sh -c -d '/usr/local/bin'
/usr/bin/install -c ct_select.bash myps2img.bash '/usr/local/bin'
install: /usr/local/bin/ct_select.bash: Permission denied
make[2]: *** [install-binSCRIPTS] Error 71
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

Any ideas what I could be doing wrong?

Thanks for the help

jkominek
Offline
Joined: 04/28/2014
Yes, zukerm, you're right of

Yes, zukerm, you're right of course, I meant mfold_util, not mfold, sorry for the mistake. Mfold itself compiles very nicely under Ubuntu 14.04 right off the bat, just FYI.

sarika
Offline
Joined: 05/06/2013
mfold installation

I have tried to install mfold and i have modified configure_linux.bass as per your suggestion...but still i came to squre one position..problem remain same..pls help me.

make: Warning: File `config.h' has modification time 9.6e+03 s in the future
make all-recursive
make[1]: Entering directory `/home/sarika/Desktop/mfold_util-4.6'
Making all in scripts
make[2]: Entering directory `/home/sarika/Desktop/mfold_util-4.6/scripts'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/sarika/Desktop/mfold_util-4.6/scripts'
Making all in src
make[2]: Entering directory `/home/sarika/Desktop/mfold_util-4.6/src'
make[2]: Warning: File `.deps/sir_graph.Po' has modification time 9.6e+03 s in the future
gcc -g -O2 -o boxplot_ng boxplot_ng.o
boxplot_ng.o: In function `draw_postscript_dots_zoom':
/home/sarika/Desktop/mfold_util-4.6/src/boxplot_ps.h:310: undefined reference to `sqrt'
/home/sarika/Desktop/mfold_util-4.6/src/boxplot_ps.h:351: undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
make[2]: *** [boxplot_ng] Error 1
make[2]: Leaving directory `/home/sarika/Desktop/mfold_util-4.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sarika/Desktop/mfold_util-4.6'
make: *** [all] Error 2

selena7
Offline
Joined: 10/21/2011
Ubuntu solution step by step

Hello,

I'm not sure wether or not this discussion is still active but since there seem to be some people who are not from the IT field, the solution Professor Zuker offered below should be explained step by step.

My System: Ubuntu 10.10 (32 bit)
Packages: mfold_util-4.6 and unafold-3.8 (packages should be installed in that order, too)

As Prof. Zuker mentioned, one should use 'Configure_Linux.bash' when compiling but edit it first (see below) by adding '-lm' (l. 8, 10) or the path to the required libraries to LDFLAGS.

1 #!/bin/bash
2
3 if [ $# -eq 0 ] ; then
4 # This option fails on a 64 bit machine. "XmuLookupStandardColormap"
5 # not found is the complaint.
6 ./configure CFLAGS='-O3 -Wall' LDFLAGS='-L/usr/local/lib'
7 elif [ $1 -eq 32 ] ; then
8 ./configure CFLAGS='-O3 -Wall -m32' LDFLAGS='-L/usr/X11R6/lib -L/usr/local/lib -L/usr/lib -lm'
9 elif [ $1 -eq 64 ] ; then
10 ./configure CFLAGS='-O3 -Wall' LDFLAGS='-L/usr/X11R6/lib64 -L/usr/local/lib64 -L/usr/lib64 -lm'
11 fi

After this modification the problem should be eliminated; just go on running 'sudo make' and 'sudo make install'.

zukerm
Offline
Joined: 11/12/2010
mfold_util on Ubuntu

I'm hoping that various users can get together on this forum to solve installation problems for mfold_util under Ubuntu. Right now, I'm not able to solve the problem since I use RedHat and have not personally built mfold_util under Ubuntu. However, I can make some general comments that could help.

  • I've placed the most up to date version of mfold_util-4.6 (that's right, I don't document every tiny change) for download on the UNAFold web site. I urge all those struggling with mfold_util to take this version.
  • Note that I provide two scripts for configuring the package before issuing the make command. The script name is Configure_Linux.bash. It works fine for RedHat. Note that it should be run as: ./Configure_Linux.bash 32 to create binaries that will run on 32 bit architecture. These binaries will also run on 64 bit architecture. Use./Configure_Linux.bash 64 to create binaries for 64 bit architecture only. On my personal desktop, running ./configure alone creates a configuration that fails to compile. I find the inability to find the square root function very odd. When you write to this forum, you should give as much information as possible. What configure command did you issue?
  • The results from the configure command are "catastrophic". I've never seen a situation where configure failed to find so many libraries or include files. What's in your config.h file?
  • Check by hand to find the required libraries and include files. If any are in non-standard locations, add the appropriate search paths for libraries (LDFLAGS="...") and includes (CPPFLAGS="...").
  • Since you installed libgd and associate include files, where did you place them? By the way, you can do without libgd. The mfold_util programs and hydrid-plot in UNAFold will always generate PostScript output. This output can always be converted into other formats using, for example, "gs" or "convert".
donadoni99
Offline
Joined: 07/11/2011
Problem compiling mfold_util4.6

Hello,
I received the same message after I run the "make" command

make all-recursive
make[1]: Entering directory `/data/yehdego/mfold_util-4.6'
Making all in src
make[2]: Entering directory `/data/yehdego/mfold_util-4.6/src'
gcc -g -O2 -o boxplot_ng boxplot_ng.o
boxplot_ng.o: In function `draw_postscript_dots_zoom':
/data/yehdego/mfold_util-4.6/src/boxplot_ps.h:310: undefined reference to `sqrt'
/data/yehdego/mfold_util-4.6/src/boxplot_ps.h:351: undefined reference to `sqrt'
collect2: ld returned 1 exit status
make[2]: *** [boxplot_ng] Error 1
make[2]: Leaving directory `/data/yehdego/mfold_util-4.6/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/data/yehdego/mfold_util-4.6'
make: *** [all] Error 2

Any idea on how to resolve this issue....really appreciate!!

velu
Offline
Joined: 07/28/2013
Changed the OS to CentOS to install mfold_util_4.6

I also could not install mfold ultil4.6 in ubuntu 13.04 even after following the instructions on this page.
Because Redhat--which Dr. Zuker uses--is a paid OS, I mounted CentOS 6.4 within my Windows using VMware Player and installed the mfold util4.6 followed by UNAFold. I am now figuring out how to get what i want from UNAFold. Thanks, Dr.Zuker and colleagues for the UNAFold package.

zukerm
Offline
Joined: 11/12/2010
Thank you for your comments.

Thank you for your comments. You could help me and others by posting the details of how you installed mfold_util (v 4.6) in ubuntu. I really cannot take the time to setup ubuntu on a computer. I use Mac OS X and RedHat Linux and all my software runs in both environments. I am stuck with RedHat because of the UNAFold Web Server at SUNY Albany. This is not a complaint. I was fortunate that the support team at SUNY uses RedHat Linux on their servers and compute nodes. I fit right into the framework there. However, it would be good to collect information on installing my software on other systems.

velu
Offline
Joined: 07/28/2013
I am sorry if I was not clear

I am sorry if I was not clear in my earlier post.
I COULD NOT install mflod_util4.6 in ubuntu13.04.
I tried the windows flavor of unafold in windows 8, but it gave the error "list form of pipe open not implemented in line 261" (It seems, list form of pipe open is not implemented in windows version of perl).

So, within windows 8, I used the virtualization software VMware player to mount CentOS 6.4 (CentOS resembles Redhat). On CentOS, I was able to install mfold_util4.6 and then unafold3.8, following the instructions of Dr. Zuker. I had difficulty in becoming a sudoer to install them, but with help from google, I could do it.

UNAFold works fine in CentOS 6.4.

zukerm
Offline
Joined: 11/12/2010
mfold_util on Ubuntu

See my comments above.

zukerm
Offline
Joined: 11/12/2010
mfold_util on Ubuntu

Read my comments above. I'm counting on you and others to solve this problem. Download mfold_util-4.6 again. Use the Configure_Linux.bash script as described above. Alter the script as you see fit.