bugGNU Octave - Bugs: bug #57281, build error:...

 
 

bug #57281: build error: __octave_link_enabled__ undefined

Submitter:  Lars Kindermann <larskindermann>
Submitted:  Wed 20 Nov 2019 09:29:45 PM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Wont Fix 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
   

Jump to the original submission

Fri 22 Nov 2019 02:03:39 PM UTC, comment #7: 

It doesn't make it impossible to bisect, just more difficult.  The situation was much worse years ago when the build system itself was under development and our use of autotools was being standardized, gnulib was introduced, and files were being renamed and segregated to new and differently named directories on a frequest basis.

In this case, bisection is easier if you maintain a separate build directory away from the source directory.  As you use 'hg bisect' in the source directory you may end up with remnant files in the build directory that cause problems.  In that case, just remove the build directory, and run configure again from the source directory to start with a clean slate.

If you are using a caching mechanism like ccache then this doesn't even cause much of a productivity hit.  With no changes to the source code, just the .o files from compilation missing, I can rebuild Octave in 3.5 minutes.

Rik <rik5>
Group administrator
Fri 22 Nov 2019 10:44:11 AM UTC, comment #6: 

Keeping different trees for stable and dev is ok.

But won't this problem hit also when going back and forward between older and newer versions in default, too? Thus making bisecting impossible across the version where manual interaction was necessary? 

Lars Kindermann <larskindermann>
Thu 21 Nov 2019 03:50:06 PM UTC, comment #5: 

I agree with the advice from jwe in comment #4.

I maintain separate stable and development source trees.  Unlike the advice in comment #4, I also build in the source tree so I only have two directories, rather than four (two for source and two for building).  This works out very well.

I'm going to mark this as "Won't Fix" since there are simple enough ways to work around this scenario.

Rik <rik5>
Group administrator
Thu 21 Nov 2019 03:36:47 PM UTC, comment #4: 

If you want to build both stable and default frequently, I recommend usin separate source trees for the default and stable branches.  That minimizes time-stamp changes when switching from one to the other.

Also, although it is possible, I recommend using a build tree that is separate from the source tree.

If you frequently build after updating, ccache will also speed things up a lot.

However, if you do attempt to build in the source tree and switch between branches, you should probably do


make maintainer-clean
hg update BRANCH
./configure ...
make


Otherwise, you will run into problems with stale files left over from previous builds.

John W. Eaton <jwe>
Group administrator
Thu 21 Nov 2019 01:35:14 PM UTC, comment #3: 

stable and default are not compatible any more.

I used to execute regulary a script, basically doing this


hg pull

hg update default
make
sudo make install

hg update stable
make
sudo make install


This worked fine for years, and still works once on a freshly cloned tree. But the next 'default' make produces the errors. Additionally, 'make maintainer-clean' fails completely now, I have to clone again to build after an attempt to reset.

I'm not sure if the above procedure is expected to work, or if default and stable should be better kept in seperate folders, but, it used to work fine until recently...

Lars Kindermann <larskindermann>
Thu 21 Nov 2019 02:45:59 AM UTC, comment #2: 

I don't see these errors in my builds after "make maintainer-clean".

Where is _octave_link_enabled_ being called in your build?  If it is from a generated PKG_ADD file, try removing that and rebuild.


hg locate | xargs grep __octave_link_enabled__


doesn't show anything in my source tree and I don't see it anywhere in my build tree either.

Do you have some obsolete files left over in your source and/or build trees?  Pease try starting with a clean build tree.  There have been some source file rearrangements lately and there is no reasonable way that we can automatically clean obsolete files from the build tree.


John W. Eaton <jwe>
Group administrator
Wed 20 Nov 2019 10:49:47 PM UTC, comment #1: 

This is likely due to changeset 26067.

I tried


hg log -k __octave_link_enabled__
changeset:   26067:b2a96efc88eb
user:        John W. Eaton <jwe@octave.org>
date:        Tue Nov 13 03:13:37 2018 -0500
summary:     fix registration of qt graphics toolkit

changeset:   19848:9b7ca334a104
user:        Rik <rik@octave.org>
date:        Tue Feb 24 10:41:57 2015 -0800
summary:     Backout cset a9952a647d52 and use __octave_link_enabled__ rather than isguirunning.

changeset:   19799:a9952a647d52
user:        Rik <rik@octave.org>
date:        Fri Feb 20 17:16:21 2015 -0800
summary:     Use isguirunning rather than __octave_link_enabled__ in m-files for clarity.

changeset:   16552:8fc1f6535380
user:        John W. Eaton <jwe@octave.org>
date:        Mon Apr 22 15:07:21 2013 -0400
summary:     new function, __octave_link_enabled__


And 26067 included


diff -r 759740b9454b -r b2a96efc88eb libgui/graphics/__init_qt__.cc
--- a/libgui/graphics/__init_qt__.cc    Tue Nov 13 02:51:34 2018 -0500
+++ b/libgui/graphics/__init_qt__.cc    Tue Nov 13 03:13:37 2018 -0500
@@ -41,7 +41,7 @@ along with Octave; see the file COPYING.
 #include "QtHandlesUtils.h"
 #include "__init_qt__.h"

-// PKG_ADD: if (__have_feature__ ("QT") && __have_feature__ ("OPENGL") && have_window_system () && isguirunning ()) register_graphics_toolkit ("qt"); endif
+// PKG_ADD: if (__have_feature__ ("QT") && __have_feature__ ("OPENGL") && have_window_system () && __octave_link_enabled__ ()) register_graphics_toolkit ("qt"); endif


where isguirunning() was replaced with _octave_link_enabled_().

Rik <rik5>
Group administrator
Wed 20 Nov 2019 09:29:45 PM UTC, original submission:  

getting lots of messages like this, however, build succeeds.


  GEN      doc/interpreter/plot-figureproperties.texi
  GEN      doc/interpreter/plot-imageproperties.texi
error: '__octave_link_enabled__' undefined near line 5, column 5
error: called from
    /home/kinder/usr/octave/libgui/graphics/PKG_ADD at line 5 column 1
errorerror: : '__octave_link_enabled__' undefined near line 5, column 5'__octave_link_enabled__' undefined near line 5, column 5

error: called from
    /home/kinder/usr/octave/libgui/graphics/PKG_ADD at line 5 column 1
error: called from
    /home/kinder/usr/octave/libgui/graphics/PKG_ADD at line 5 column 1
  GEN      doc/interpreter/plot-lightproperties.texi
  GEN      doc/interpreter/plot-lineproperties.texi
error: '__octave_link_enabled__' undefined near line 5, column 5
error: called from
    /home/kinder/usr/octave/libgui/graphics/PKG_ADD at line 5 column 1
error: '__octave_link_enabled__' undefined near line 5, column 5
error: called from
    /home/kinder/usr/octave/libgui/graphics/PKG_ADD at line 5 column 1
  GEN      doc/interpreter/plot-patchproperties.texi
  GEN      doc/interpreter/plot-rootproperties.texi


Lars Kindermann <larskindermann>

 

(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 rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by larskindermann (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
    2019-11-21 rik5 StatusNone Wont Fix
        Open/ClosedOpen Closed
    2019-11-20 rik5 Carbon-Copy- Added jwe

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code