bugGNU Astronomy Utilities - Bugs: bug #54430, BuildProgram fails with older...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #54430: BuildProgram fails with older Libtool versions on dash

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Thu 02 Aug 2018 01:32:28 PM UTC
   
 
Category:  BuildProgram Severity:  3 - Normal
Item Group:  Crash Status:  Fixed
Privacy:  Public Assigned to:  makhlaghi
Open/Closed:  Closed

Fri 03 Aug 2018 09:09:17 PM UTC, comment #1: 

This bug has been fixed and pushed to the main repo.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Thu 02 Aug 2018 01:32:28 PM UTC, original submission:  

Some operating systems (Ubuntu in this case) set the default shell to dash, it is a minimalist POSIX compliant shell. Therefore it doesn't have many features that are available in Bash (including the `+=' operator).

Older versions of Libtool (2.4.2 in this case) don't check for the availability of the `+=' operator by the shell before using it, therefore BuildProgram fails on such systems with an error like this:


/home/userid/anaconda2/bin/libtool: 1581: /home/userid/anaconda2/bin/libtool: preserve_args+= --tag CC: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= -Wall: not found
/home/userid/anaconda2/bin/libtool: 6434: /home/userid/anaconda2/bin/libtool: compile_command+= -Wall: not found
/home/userid/anaconda2/bin/libtool: 6435: /home/userid/anaconda2/bin/libtool: finalize_command+= -Wall: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= -O3: not found
/home/userid/anaconda2/bin/libtool: 6298: /home/userid/anaconda2/bin/libtool: compile_command+= -O3: not found
/home/userid/anaconda2/bin/libtool: 6299: /home/userid/anaconda2/bin/libtool: finalize_command+= -O3: not found
/home/userid/anaconda2/bin/libtool: 6300: /home/userid/anaconda2/bin/libtool: compiler_flags+= -O3: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= -I../lib: not found
/home/userid/anaconda2/bin/libtool: 6434: /home/userid/anaconda2/bin/libtool: compile_command+= -I../lib: not found
/home/userid/anaconda2/bin/libtool: 6435: /home/userid/anaconda2/bin/libtool: finalize_command+= -I../lib: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= -I../lib/: not found
/home/userid/anaconda2/bin/libtool: 6434: /home/userid/anaconda2/bin/libtool: compile_command+= -I../lib/: not found
/home/userid/anaconda2/bin/libtool: 6435: /home/userid/anaconda2/bin/libtool: finalize_command+= -I../lib/: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= ../tests/buildprog/simpleio.c: not found
/home/userid/anaconda2/bin/libtool: 6434: /home/userid/anaconda2/bin/libtool: compile_command+= ../tests/buildprog/simpleio.c: not found
/home/userid/anaconda2/bin/libtool: 6435: /home/userid/anaconda2/bin/libtool: finalize_command+= ../tests/buildprog/simpleio.c: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= -I/usr/local/include: not found
/home/userid/anaconda2/bin/libtool: 6434: /home/userid/anaconda2/bin/libtool: compile_command+= -I/usr/local/include: not found
/home/userid/anaconda2/bin/libtool: 6435: /home/userid/anaconda2/bin/libtool: finalize_command+= -I/usr/local/include: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= ../lib/libgnuastro.la: not found
/home/userid/anaconda2/bin/libtool: 6418: /home/userid/anaconda2/bin/libtool: deplibs+= ../lib/libgnuastro.la: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= -o: not found
/home/userid/anaconda2/bin/libtool: 6434: /home/userid/anaconda2/bin/libtool: compile_command+= -o: not found
/home/userid/anaconda2/bin/libtool: 6435: /home/userid/anaconda2/bin/libtool: finalize_command+= -o: not found
/home/userid/anaconda2/bin/libtool: 5656: /home/userid/anaconda2/bin/libtool: libtool_args+= simpleio: not found
/home/userid/anaconda2/bin/libtool: 5662: /home/userid/anaconda2/bin/libtool: compile_command+= @OUTPUT@: not found
/home/userid/anaconda2/bin/libtool: 5663: /home/userid/anaconda2/bin/libtool: finalize_command+= @OUTPUT@: not found
/home/userid/anaconda2/bin/libtool: 9202: /home/userid/anaconda2/bin/libtool: compile_command+= : not found
/home/userid/anaconda2/bin/libtool: 9203: /home/userid/anaconda2/bin/libtool: finalize_command+= : not found
libtool: link: gcc
gcc: fatal error: no input files
compilation terminated.

Compiling and linking the program
---------------------------------
/home/userid/Downloads/gnuastro-0.6.54-6aa5/bin/buildprog/.libs/lt-astbuildprog: failed to build, see libtool error above
FAIL buildprog/simpleio.sh (exit status: 1)


Newer versions of libtool do address this problem (checked with version 2.4.6), but we don't want to force the user to modify their installation as much as possible: only if there is no other way.

So a check should be written to see if Libtool works within the system's default shell. If it doesn't, then we'll check if Bash is present. If it indeed works with Bash (older versions of Bash also don't support the `+=' operator), then we'll put a `bash -c' behind the command called by BuildProgram to fix the problem on such systems.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-03 makhlaghi StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2018-08-02 makhlaghi Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code