bugGNU Octave - Bugs: bug #37070, incorrect link order for the gui...


bug #37070: incorrect link order for the gui on cygwin

Submitted by:  marco atzeri <matzeri>
Submitted on:  Fri 10 Aug 2012 10:09:50 AM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Marco Atzeri Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Thu 23 Aug 2012 05:50:44 PM UTC, comment #7: 

it builds fine. Thanks

marco atzeri <matzeri>
Tue 21 Aug 2012 06:04:36 PM UTC, comment #6: 
John W. Eaton <jwe>
Project Administrator
Tue 21 Aug 2012 05:38:03 PM UTC, comment #5: 

almost. At libgui/src
I have

/bin/sh ../../libtool --tag=CXX    --mode=link g++ -g -O2   -mieee-fp   -isystem /usr/include -I/usr/include/freetype2   -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual  -g -O2  -version-info 0:0:0  -no-undefined  -bindir /usr/local/bin  -L/usr/lib/qt4/lib  -Wl,-no-undefined -o liboctgui.la -rpath /usr/local/lib/octave/3.7.0+ liboctgui_la-documentation-dockwidget.lo  liboctgui_la-files-dockwidget.lo  liboctgui_la-history-dockwidget.lo  liboctgui_la-file-editor-tab.lo liboctgui_la-file-editor.lo  liboctgui_la-find-dialog.lo liboctgui_la-lexer-octave-gui.lo  liboctgui_la-main-window.lo liboctgui_la-octave-event.lo  liboctgui_la-octave-link.lo liboctgui_la-octave-main-thread.lo  liboctgui_la-octave-gui.lo  liboctgui_la-octave-qt-event-listener.lo  liboctgui_la-parser.lo liboctgui_la-webinfo.lo  liboctgui_la-resource-manager.lo  liboctgui_la-settings-dialog.lo  liboctgui_la-symbol-information.lo  liboctgui_la-terminal-dockwidget.lo  liboctgui_la-welcome-wizard.lo liboctgui_la-workspace-model.lo  liboctgui_la-workspace-view.lo  liboctgui_la-moc-file-editor-interface.lo  liboctgui_la-moc-file-editor-tab.lo  liboctgui_la-moc-file-editor.lo  liboctgui_la-moc-find-dialog.lo  liboctgui_la-moc-lexer-octave-gui.lo  liboctgui_la-moc-documentation-dockwidget.lo  liboctgui_la-moc-files-dockwidget.lo  liboctgui_la-moc-history-dockwidget.lo  liboctgui_la-moc-main-window.lo  liboctgui_la-moc-octave-qt-event-listener.lo  liboctgui_la-moc-settings-dialog.lo  liboctgui_la-moc-terminal-dockwidget.lo  liboctgui_la-moc-welcome-wizard.lo  liboctgui_la-moc-workspace-model.lo  liboctgui_la-moc-workspace-view.lo  liboctgui_la-moc-octave-main-thread.lo  liboctgui_la-moc-parser.lo liboctgui_la-moc-webinfo.lo liboctgui_la-qrc-resource.lo libqterminal.la  ../../liboctave/liboctave.la  ../../libcruft/libcruft.la  -lQtCore -lQtGui -lQtNetwork -lqscintilla2   -lm

while I should have:
[cut] libqterminal.la  ../../libinterp/liboctinterp.la ../../liboctave/liboctave.la  ../../libcruft/libcruft.la [cut]

marco atzeri <matzeri>
Mon 20 Aug 2012 07:39:40 PM UTC, comment #4: 

I checked in the following change.  Does it fix the problem for you?


John W. Eaton <jwe>
Project Administrator
Mon 20 Aug 2012 06:18:25 PM UTC, comment #3: 

on cygwin the link order matters so
../libgui/src/liboctgui.la should preced the others

Attached patch

(file #26402)

marco atzeri <matzeri>
Fri 17 Aug 2012 04:17:39 PM UTC, comment #2: 

something else is still broken:

hg tip
changeset:   15183:8b9b3677a4d6

/bin/sh ../libtool --tag=CXX    --mode=link g++ -g -O2   -mieee-fp   -isystem /usr/include -I/usr/include/freetype2   -
Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2   -no-undefi
ned   -Wl,-no-undefined -o octave.exe octave-main.o liboctinterp.la  ../liboctave/liboctave.la  ../libcruft/libcruft.la
  ../gui/src/liboctgui.la   -lm
libtool: link: g++ -g -O2 -mieee-fp -isystem /usr/include -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -
Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -g -O2 -Wl,-no-undefined -o .libs/octave.exe octave-ma
in.o  ./.libs/liboctinterp.dll.a -L/usr/lib /pub/hg/gui_build/liboctave/.libs/liboctave.dll.a -lfltk_gl -lfltk /usr/lib
/libXft.dll.a /usr/lib/libXrender.dll.a /usr/lib/libXext.dll.a /usr/lib/libhdf5.dll.a -lpthread /usr/lib/libfontconfig.
dll.a /usr/lib/libexpat.dll.a /usr/lib/libfreetype.dll.a -lz -lbz2 -lGL -lGLU /usr/lib/libX11.dll.a /usr/lib/libxcb.dll
.a /usr/lib/libXau.dll.a /usr/lib/libXdmcp.dll.a -lLLVM-3.1 ../liboctave/.libs/liboctave.dll.a /pub/hg/gui_build/libcru
ft/.libs/libcruft.dll.a -lcholmod -lumfpack -lamd -lcamd -lcolamd -lccolamd -lcxsparse /usr/lib/libarpack.dll.a -L/usr/
lib/gcc/i686-pc-cygwin/4.5.3 -L/usr/lib/gcc/i686-pc-cygwin/4.5.3/../../.. -lcygwin -luser32 -lkernel32 -ladvapi32 -lshe
ll32 /usr/lib/libqrupdate.dll.a /usr/lib/libfftw3.dll.a /usr/lib/libfftw3f.dll.a -lreadline /usr/lib/libncurses.dll.a /
usr/lib/libpcre.dll.a ../libcruft/.libs/libcruft.dll.a /usr/lib/liblapack.dll.a /usr/lib/libblas.dll.a /usr/lib/gcc/i68
6-pc-cygwin/4.5.3/libgfortran.dll.a ../gui/src/.libs/liboctgui.a -L/usr/lib/qt4/lib /usr/lib/qt4/lib/libQtGui.dll.a /us
r/lib/qt4/lib/libQtNetwork.dll.a /usr/lib/qt4/lib/libQtCore.dll.a /usr/lib/libiconv.dll.a -lqscintilla2 /usr/lib/gcc/i6
86-pc-cygwin/4.5.3/libstdc++.dll.a -L/usr/local/lib/octave/3.7.0+ -L/usr/lib/gcc/i686-pc-cygwin/4.5.3 -L/usr/lib/qt4/li
../gui/src/.libs/liboctgui.a(liboctgui_la-resource-manager.o): In function `default_qt_settings_file':
/pub/hg/gui_build/gui/src/../../../octave/gui/src/resource-manager.cc:95: undefined reference to `octave_env::getenv(st
d::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../gui/src/.libs/liboctgui.a(liboctgui_la-resource-manager.o): In function `_ZN8file_ops11dir_sep_strEv':

marco atzeri <matzeri>
Fri 10 Aug 2012 02:42:52 PM UTC, comment #1: 

In http://hg.savannah.gnu.org/hgweb/octave/rev/bfc220d1de67, I put the -L option in an _LDFLAGS variable and the -l options in the corresponding _LIBADD variable (the files in the gui library are now built as a library).

Does that work for you?

John W. Eaton <jwe>
Project Administrator
Fri 10 Aug 2012 10:09:50 AM UTC, original submission:  

attached patch to solve the link order for the gui on cygwin on
changeset:   3735a0e783cb


octave_gui_LDFLAGS = -L@QT_LIBDIR@ -lQtCore -lQtGui -lQtNetwork -lqscintilla2

does not work as LDFLAGS is used at the beginning of the link,
before the objects, so the symbols are unresolved.

In this way

octave_gui_LDADD = libqterminal.la \
                   ../../src/liboctinterp.la \
                    ../../liboctave/liboctave.la \
                   ../../libcruft/libcruft.la \
                  -L@QT_LIBDIR@ -lQtCore -lQtGui -lQtNetwork -lqscintilla2

the graphics library are in the correct order.

marco atzeri <matzeri>


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

Attach Files:

Attached Files
file #26402:  gui.patch added by matzeri (345B - application/octet-stream)
file #26341:  gui_link_precedence.patch added by matzeri (591B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by matzeri (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-08-23 rik5 StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2012-08-20 jwe StatusNeed Info => Ready For Test
    2012-08-20 matzeri Attached File- => Added gui.patch, #26402
    2012-08-15 rik5 StatusNone => Need Info
    2012-08-10 matzeri Attached File- => Added gui_link_precedence.patch, #26341

    Back to the top

    Powered by Savane 3.5