bugGNU Octave - Bugs: bug #50285, Possible "rm" missing...

 
 

bug #50285: Possible "rm" missing from Makefile when attempting to replace gdbinit

Submitter:  Dan Sebald <sebald>
Submitted:  Sun 12 Feb 2017 04:46:35 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 13 Feb 2017 10:27:15 PM UTC, comment #4: 

This ~/.octavegdbinit idea is in a sense already implemented.  gdb has a variety of similar initialization options.  See

https://sourceware.org/gdb/onlinedocs/gdb/gdbinit-man.html

https://sourceware.org/gdb/onlinedocs/gdb/Startup.html#Startup

https://sourceware.org/gdb/onlinedocs/gdb/System_002dwide-configuration.html#System_002dwide-configuration

https://sourceware.org/gdb/onlinedocs/gdb/System_002dwide-Configuration-Scripts.html#System_002dwide-Configuration-Scripts

The order of load precedence looks to be

1) System wide (first)
2) Account wide
3) Local working directory (last)

Maybe that order is a problem in the sense that one can't override <buildtree>/.gdbinit definitions with what's inside ~/.gdbinit.  If that were the case, then it wouldn't be necessary to not-overwrite .gdbinit if it already exists.  Maybe there is some way of accomplishing the same effect with one of the options in the links above.

Dan Sebald <sebald>
Mon 13 Feb 2017 03:47:17 AM UTC, comment #3: 

Oh, that's why the message is worded the way it is.  That "refusing to overwrite test/.gdbinit" message isn't an error, just a statement.  I was thinking the goal was to overwrite the file and for some reason it was failing.

Is the .gdbinit a pre-compile or post-compile configuration?  If it is post-compile, how about something similar to file octaverc?  I.e., the same search rules so that the user may place something like

~/.octavegdbinit

in their root directory?

Dan Sebald <sebald>
Mon 13 Feb 2017 03:12:25 AM UTC, comment #2: 

The reason for the test is to avoid wiping out someone's customized .gdbinit file.  There may be a better way to do this, but the simple thing is just to avoid overwriting the file if it already exists.

John W. Eaton <jwe>
Group administrator
Mon 13 Feb 2017 02:58:35 AM UTC, comment #1: 

Bad configuration options were the fault of Octave hanging when building documentation.  After a total rebuild from fresh clone, compilation builds fine.

It's also true that the error message I reported does not appear anymore.  I see that '-f' means in bash:


-f filename         Check for regular file existence not a directory


As written, the script, i.e., "[ -f $@ ]", makes perfect sense.

Let's mark this "not-a-bug" and close.

Dan Sebald <sebald>
Sun 12 Feb 2017 04:46:35 AM UTC, original submission:  

I've pulled the latest code, run ./bootstrap, run make (for which configure is re-run), and when reaching the point of documentation compiling notice the following error:


  GEN      build-aux/mk-default-qt-settings.sh
config.status: creating build-aux/mk-default-qt-settings.sh-tmp
config.status: executing build-aux/mk-default-qt-settings.sh commands
  GEN      doc/interpreter/doc-cache
refusing to overwrite test/.gdbinit with newer version from /home/sebald/octave/octave/octave/etc/gdbinit
refusing to overwrite .gdbinit with newer version from /home/sebald/octave/octave/octave/etc/gdbinit
  GEN      doc/interpreter/voronoi.eps


It seems that the reason for this error is that Makefile has a bad script within:


define gdbinit_install_rule
  if [ -f $@ ]; then \
    echo "refusing to overwrite $@ with newer version from $<" 1>&2; \
  else \
    echo "Installing $@ from version at $<" ; \
    cp $< $@; \
  fi
endef


My guess is that the conditional should have something like "[ rm -f $@ ]" as opposed to just "[ -f $@ ]", which always fails.

Although, that may not quite be it, as I manually make the change from the build directory Makefile and still see a complaint, but success:


  GEN      build-aux/mk-default-qt-settings.sh
config.status: creating build-aux/mk-default-qt-settings.sh-tmp
config.status: executing build-aux/mk-default-qt-settings.sh commands
/bin/bash: line 0: [: -f: binary operator expected
Installing test/.gdbinit from version at /home/sebald/octave/octave/octave/etc/gdbinit
/bin/bash: line 0: [: -f: binary operator expected
Installing .gdbinit from version at /home/sebald/octave/octave/octave/etc/gdbinit
  GEN      doc/interpreter/voronoi.eps


Any idea if this might be related to compilation being stuck at the last line shown?  I.e., after "  GEN      doc/interpreter/voronoi.eps" the compilation whirls away at max CPU for the better part of an hour until I hit Cntl-C three times.

Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

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 jwe (Posted a comment)
  • -email is unavailable- added by sebald (Submitted the item)
  •  

    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.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-13 jwe Item GroupMissed Error or Warning Build Failure
        StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code