3

I'm trying to add a new binary to an old project written in C/C++ on my machine with Ubuntu 14.04. First I need to run ./setup_configure which runs the following script:

  #!/bin/tcsh -f                                                                                                                                                               
  2 
  3 # For a new dev/ environment, before running configure, 
  4 # and anytime after a Makefile.am file has changed, 
  5 # the following commands must be executed within the 
  6 # dev/ directory:
  7 
  8 set cmd1=(rm -rf autom4te.cache)
  9 if ( "`uname -s`" == "Darwin" ) then 
 10     set cmd2=(glibtoolize --force)
 11 else
 12     #set cmd2=(libtoolize --force)
 13     set cmd2=(libtoolize -f -v)
 14 endif
 15 set cmd3=(aclocal)
 16 #automake --add-missing is necessary because config.sub
 17 # and config.guess are links, and make not be present,
 18 # so if missing, --add-missing will add them for this
 19 # platform
 20 #set cmd4=(automake --add-missing -Wno-portability)
 21 set cmd4=(automake -a -c)
 22 set cmd5=(autoreconf --force -Wno-portability)
 23 #automake Note: autoreconf --force runs automake
 24 set cmd6=(autoconf -Wno-portability)
 25 
 26 echo $cmd1
 27 $cmd1
 28 if ($status) exit $status
 29 echo $cmd2
 30 $cmd2
 31 if ($status) exit $status
 32 echo $cmd3
 33 $cmd3
 34 if ($status) exit $status
 35 echo $cmd4
 36 $cmd4
 37 #if ($status) exit $status
 38 echo $cmd5
 39 $cmd5
 40 if ($status) exit $status
 41 echo $cmd6
 42 $cmd6
 43 if ($status) exit $status
 44 
 45 # The first three commands create the platform specific 
 46 # tools needed by configure (use glibtoolize on the Mac 
 47 # in place of libtoolize). These platform specific tools 
 48 # are placed in the dev/config directory. 
 49 # Autoreconf --force and automake create the Makefile.in 
 50 # files from the Makefile.am files in each directory. 
 51 # Following successful execution of these commands, the 
 52 # configure command can be executed. 
 53 

and afterwards I need to run ./configure. Since I do not want to compile the whole project I cd into the new sub-directory I have added and run make, however, the process does not go smoothly and ends with the following error:

/bin/bash ../libtool  --tag=CC   --mode=link g++ -I../include   -L/usr/lib64 -L/usr/X11R6/lib64     -L/opt/mni_library/lib -L/opt/vxl/build/lib    -o mri_segment_ms mri_segment_ms.o ../utils/libutils.a ../fsgdf/libfsgdf.a ../rgb/librgb.a ../unix/libunix.a ../dicom/libdicom.a ../hipsstubs/libhipsstubs.a ../log/liblog.a ../xml2/libxml2.a ../jpeg/libjpeg.a ../tiff/libtiff.a ../expat/libexpat.a -lz -lm -lcrypt -ldl -lpthread     -lnetcdf -lvolume_io -lminc -lvnl_algo -lvnl -lvcl -lnetlib -lv3p_netlib 
../libtool: line 469: CDPATH: command not found
libtool: Version mismatch error.  This is libtool 2.4.2 Debian-2.4.2-1.7ubuntu1, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2 Debian-2.4.2-1.7ubuntu1
libtool: and run autoconf again.
make: *** [mri_segment_ms] Error 63

I have found lots of Q&As regarding a similar problem over internet, most of which suggest the user to run autoreconf -ivf. There is also a comprehensive answer in Stackoverflow here and here. I have performed all the suggested steps, unfortunately the problem persists. I was wondering whether anyone could give me a hint.

EDIT: the same thing happens if I try to make from root directory of the whole project.

Community
  • 1
  • 1
Arman
  • 927
  • 3
  • 12
  • 32
  • Is that the entirety of `setup_configure`? – Etan Reisner Sep 10 '14 at 18:23
  • @EtanReisner Thanks, added the whole script. – Arman Sep 10 '14 at 18:27
  • And you ran that from the `dev/` directory and saw those commands complete seemingly successfully? – Etan Reisner Sep 10 '14 at 18:31
  • that is right. I run it from root `dev/` and it ends with this: `acinclude.m4:505: AX_TIX_INITCHECK is expanded from... configure.in:3436: the top level setup_configure complete. now run ./configure ` – Arman Sep 10 '14 at 18:34
  • I can't say why `autoreconf -fvi` doesn't work for you but your script seems to be overcomplicated. Does the issue go away when you thoroughly clean the directory? When using some VCS, it should allow you to clean it (e.g. `git clean -dfx`, be careful with that one), otherwise I would try `make distclean`. – Pavel Šimerda Sep 21 '14 at 06:41
  • This app is freesurfer right? How did you this problem? Because I'm having the same issue 2.5 years later. – Hopobcn Jan 04 '17 at 16:17

0 Answers0