bugGNU Octave - Bugs: bug #48773, QScintilla / Scintilla file name...


bug #48773: QScintilla / Scintilla file name not properly identified for Qt5

Submitter:  Dan Sebald <sebald>
Submitted:  Sat 13 Aug 2016 04:07:21 PM UTC
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed 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

Thu 13 Oct 2016 08:37:31 PM UTC, comment #9: 

Would anyone like to try to convince the Qscintilla project to fix their mess?

John W. Eaton <jwe>
Group administrator
Thu 13 Oct 2016 08:25:57 PM UTC, comment #8: 

It is a bit silly to depend on library names. It's also a bit silly that Qscintilla just dumps files into the Qt directories and doesn't provide any pkg-config metadata about itself.

If you think that such a change needs to be made to properly detect and build with Qscintilla with homebrew, please file a new bug report with this information.

Mike Miller <mtmiller>
Group administrator
Tue 11 Oct 2016 05:46:46 PM UTC, comment #7: 

Yes exactly. Homebrew dropped qt4 support hence there was no need to rename libqscintilla to libqscintilla-qt5.

I expected octave to choose the first library from the list "qscintilla2-qt5 qt5scintilla2 qscintilla2" and if it arrives at qt4-based qscintilla2 the build test should fail? It's a bit silly to depend on names of libraries... (I know it's not octave's fault)

Sebastian <sschoeps>
Tue 11 Oct 2016 05:41:41 PM UTC, comment #6: 

I don't think so, that would be a very bad change. On Debian-based and Fedora-based distributions, libqscintilla2 is the version of the library built against Qt 4, and can easily be coinstalled alongside Qscintilla built for Qt 5. Checking for libqscintilla2 might find that library, and erroneously enable Qscintilla support, and either cause a build failure or a runtime failure when it turns out that two conflicting Qt versions have been built in together.

Is homebrew installing Qscintilla as libqscintilla2 regardless of being built against Qt 4 or 5?

Mike Miller <mtmiller>
Group administrator
Tue 11 Oct 2016 05:35:52 PM UTC, comment #5: 

Dear Mike,

can we add the default name "qscintilla2" to the list of qt5 candidates?

"qscintilla2-qt5 qt5scintilla2" -> "qscintilla2-qt5 qt5scintilla2 qscintilla2"


Sebastian <sschoeps>
Sun 14 Aug 2016 11:37:32 PM UTC, comment #4: 

It works on Manjaro linux. I have qscintilla5
It wasn't.


Saleh <sabmab>
Sun 14 Aug 2016 03:36:05 AM UTC, comment #3: 

Works for me (on Fedora 24).


Dmitri A. Sergatskov <dasergatskov>
Sun 14 Aug 2016 12:50:52 AM UTC, comment #2: 

I pushed a changeset that adds the ability to try linking with QScintilla over a set of possible names:


It works for me with both Qt 4 and 5, please test and let me know if it works on your system (or someone who was affected, if you weren't).

Mike Miller <mtmiller>
Group administrator
Sat 13 Aug 2016 11:20:17 PM UTC, comment #1: 

I'm attaching a diff file which is just meant to illustrate a way to identify the QScintilla library file name.  I just wanted to see if I could identify the file first so printed out the info at the end of configure.  This doesn't work through probably because I'm not supplying enough header files or libraries.

Is a workable strategy though?  I.e., first identify the name of the Qt4 and Qt5 scintilla library file names.  Then later when the decision is made which Qt to use ("5 4" or the user's switch), one of these QT4LIBQSCINTILLA/QT5LIBQSCINTILLA variables could be used.

(file #38204)

Dan Sebald <sebald>
Sat 13 Aug 2016 04:07:21 PM UTC, original submission:  

This problem was first identified here:


and I don't see a new bug report for the issue so I'm creating one because a user has already run into this issue on Manjaro Linux.

Basically, for Qt5 it appears that there is not a single way in which the QScintilla library file is named.  So far there is either:


but the Octave configure script has this name hard-coded as:

  ## Check for Qt libraries
  case "$qt_version" in
      QT_MODULES="QtCore QtGui QtNetwork QtOpenGL"
      QT_MODULES="Qt5Core Qt5Gui Qt5Network Qt5OpenGL Qt5PrintSupport"
      as_fn_error $? "Unrecognized Qt version $qt_version" "$LINENO" 5

Note this comment about assumption:

      ## Let's assume Qscintilla library is at the same location as
      ## other regular Qt libraries.

is supposed to be a certainty.  The documentation at the link below states "Installation  As supplied QScintilla will be built as a shared library/DLL and installed in the same directories as the Qt libraries and include files.":


So there are at least a couple ways to go about this.

1) Expand the definition of $LIBQSCINTILLA to be as many files as user report, i.e., start with the list I gave above.  Then loop through that list of possible files.  It wouldn't be too much work to add a list

2) Drop this script

    ## Check for Qscintilla library which is used in the Qt GUI editor.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Qscintilla library is installed" >&5
$as_echo_n "checking whether Qscintilla library is installed... " >&6; }
if ${octave_cv_lib_qscintilla+:} false; then :
  $as_echo_n "(cached) " >&6
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'

      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

        #include <Qsci/qscilexersql.h>

#ifdef F77_DUMMY_MAIN

#  ifdef __cplusplus
     extern "C"
#  endif
   int F77_DUMMY_MAIN() { return 1; }

main ()

        QsciLexerSQL sqlLexer(0);

  return 0;

in exchange for some script that simply searches the identified Qt library directories...hmm, this might not work so well simply because of the fact there could be Qt4 files still about and searching for "scintilla" is a problem.  We don't know where the '5' is going to appear so we are again back to searching for very specific patterns.

3) Can the AC_SEARCH_LIBS script:


be used to search for a routine we know exists in Qt5 but not in Qt4?

Dan Sebald <sebald>


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

Attach Files:

Attached Files


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 sschoeps (Posted a comment)
  • -email is unavailable- added by sabmab (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by mtmiller (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 project members can vote.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-15 mtmiller StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2016-08-14 mtmiller StatusNone Ready For Test
    2016-08-13 sebald Attached File- Added try_identify_qscintilla_lib_djs2016aug13.diff, #38204

    Back to the top

    Powered by Savane 3.12