Octave 6.0.90 build failure on macOS 10.13 against Qt 5.15.1: link error on missing Qt symbols

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Octave 6.0.90 build failure on macOS 10.13 against Qt 5.15.1: link error on missing Qt symbols

apjanke-floss
Hi folks,

I tried building the Octave 6.0.90 release candidate on macOS 10.13
against the new Qt 5.15.1 LTS release, and it's failing at the link
stage with this error:

libtool: link: clang++ -std=gnu++11 -dynamiclib  -o
libgui/.libs/liboctgui.6.dylib 
libgui/.libs/liboctgui_la-liboctgui-build-info.o  
-Wl,-force_load,libgui/qterminal/.libs/libqterminal.a
-Wl,-force_load,libgui/graphics/.libs/libgraphics.a
-Wl,-force_load,libgui/src/.libs/libgui-src.a 
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/hdf5/lib
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/fftw/3.3.8_2/lib
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/arpack/3.7.0_5/libexec/lib
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/pcre/8.44/lib
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/qscintilla2-octave-app/lib
libinterp/.libs/liboctinterp.dylib
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/openblas/lib
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86_64-apple-darwin17/10.2.0
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86_64-apple-darwin17/10.2.0/../../..
-L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/freetype/lib
/private/tmp/octave-octave-app@6.0.90-20200916-31442-1145r1k/octave-6.0.90/liboctave/.libs/liboctave.dylib
liboctave/.libs/liboctave.dylib -framework QtNetwork -framework
QtPrintSupport -framework QtHelp -framework QtWidgets -framework QtGui
-framework QtSql -framework QtXml -framework QtCore -lqscintilla2_qt5
-framework QtOpenGL -lhdf5
/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib/libGraphicsMagick++.dylib
/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib/libGraphicsMagick.dylib
-llcms2 -lbz2 -lltdl -lpthread -lz -framework OpenGL -lfontconfig
-lfreetype -framework Carbon -lgl2ps -lcurl -lcholmod -lumfpack -lamd
-lcamd -lcolamd -lccolamd -lcxsparse -lsuitesparseconfig
/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/arpack/3.7.0_5/libexec/lib/libarpack.dylib
-lqrupdate -lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f -lopenblas
-lreadline -lncurses -lpcre -ldl -lgfortran -lquadmath -liconv -lm 
-pthread
-F/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/qt-octave-app/5.15.1/lib
-F/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/qt-octave-app/5.15.1/lib
-F/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/qt-octave-app/lib
-Wl,-framework -Wl,CoreFoundation -Wl,-dylib_file
-Wl,/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/octave-octave-app@6.0.90/6.0.90/lib/octave/6.0.90/liboctave.8.dylib:/private/tmp/octave-octave-app@6.0.90-20200916-31442-1145r1k/octave-6.0.90/liboctave/.libs/liboctave.dylib  
-pthread -framework OpenGL -framework Carbon -framework QtNetwork
-framework QtPrintSupport -framework QtHelp -framework QtWidgets
-framework QtGui -framework QtSql -framework QtXml -framework QtCore
-framework QtOpenGL -install_name 
/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/octave-octave-app@6.0.90/6.0.90/lib/octave/6.0.90/liboctgui.6.dylib
-compatibility_version 7 -current_version 7.0 -Wl,-single_module
Undefined symbols for architecture x86_64:
  "_class_getClassMethod", referenced from:
      octave::base_qobject::base_qobject(octave::qt_application&) in
libgui-src.a(libgui_src_la-octave-qobject.o)
  "_class_getInstanceMethod", referenced from:
      octave::base_qobject::base_qobject(octave::qt_application&) in
libgui-src.a(libgui_src_la-octave-qobject.o)
  "_objc_getClass", referenced from:
      octave::base_qobject::base_qobject(octave::qt_application&) in
libgui-src.a(libgui_src_la-octave-qobject.o)
  "_objc_msgSend", referenced from:
      octave::base_qobject::base_qobject(octave::qt_application&) in
libgui-src.a(libgui_src_la-octave-qobject.o)
  "_sel_getUid", referenced from:
      octave::base_qobject::base_qobject(octave::qt_application&) in
libgui-src.a(libgui_src_la-octave-qobject.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[2]: *** [libgui/liboctgui.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


Anyone know what might be going on there?

Build went fine against Qt 5.12 on macOS 10.14. I'm trying other
combinations of OS and Qt version to try to narrow the issue down, but
these builds do take a while...

Cheers,
Andrew

Reply | Threaded
Open this post in threaded view
|

Re: Octave 6.0.90 build failure on macOS 10.13 against Qt 5.15.1: link error on missing Qt symbols

mmuetzel
Am 16. September 2020 um 14:39 Uhr schrieb "Andrew Janke":

> Hi folks,
>
> I tried building the Octave 6.0.90 release candidate on macOS 10.13
> against the new Qt 5.15.1 LTS release, and it's failing at the link
> stage with this error:
>
> libtool: link: clang++ -std=gnu++11 -dynamiclib  -o
> libgui/.libs/liboctgui.6.dylib 
> libgui/.libs/liboctgui_la-liboctgui-build-info.o  
> -Wl,-force_load,libgui/qterminal/.libs/libqterminal.a
> -Wl,-force_load,libgui/graphics/.libs/libgraphics.a
> -Wl,-force_load,libgui/src/.libs/libgui-src.a 
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/hdf5/lib
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/fftw/3.3.8_2/lib
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/arpack/3.7.0_5/libexec/lib
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/pcre/8.44/lib
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/qscintilla2-octave-app/lib
> libinterp/.libs/liboctinterp.dylib
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/openblas/lib
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86_64-apple-darwin17/10.2.0
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86_64-apple-darwin17/10.2.0/../../..
> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/freetype/lib
> /private/tmp/octave-octave-app@6.0.90-20200916-31442-1145r1k/octave-6.0.90/liboctave/.libs/liboctave.dylib
> liboctave/.libs/liboctave.dylib -framework QtNetwork -framework
> QtPrintSupport -framework QtHelp -framework QtWidgets -framework QtGui
> -framework QtSql -framework QtXml -framework QtCore -lqscintilla2_qt5
> -framework QtOpenGL -lhdf5
> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib/libGraphicsMagick++.dylib
> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib/libGraphicsMagick.dylib
> -llcms2 -lbz2 -lltdl -lpthread -lz -framework OpenGL -lfontconfig
> -lfreetype -framework Carbon -lgl2ps -lcurl -lcholmod -lumfpack -lamd
> -lcamd -lcolamd -lccolamd -lcxsparse -lsuitesparseconfig
> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/arpack/3.7.0_5/libexec/lib/libarpack.dylib
> -lqrupdate -lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f -lopenblas
> -lreadline -lncurses -lpcre -ldl -lgfortran -lquadmath -liconv -lm 
> -pthread
> -F/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/qt-octave-app/5.15.1/lib
> -F/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/qt-octave-app/5.15.1/lib
> -F/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/qt-octave-app/lib
> -Wl,-framework -Wl,CoreFoundation -Wl,-dylib_file
> -Wl,/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/octave-octave-app@6.0.90/6.0.90/lib/octave/6.0.90/liboctave.8.dylib:/private/tmp/octave-octave-app@6.0.90-20200916-31442-1145r1k/octave-6.0.90/liboctave/.libs/liboctave.dylib  
> -pthread -framework OpenGL -framework Carbon -framework QtNetwork
> -framework QtPrintSupport -framework QtHelp -framework QtWidgets
> -framework QtGui -framework QtSql -framework QtXml -framework QtCore
> -framework QtOpenGL -install_name 
> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/octave-octave-app@6.0.90/6.0.90/lib/octave/6.0.90/liboctgui.6.dylib
> -compatibility_version 7 -current_version 7.0 -Wl,-single_module
> Undefined symbols for architecture x86_64:
>   "_class_getClassMethod", referenced from:
>       octave::base_qobject::base_qobject(octave::qt_application&) in
> libgui-src.a(libgui_src_la-octave-qobject.o)
>   "_class_getInstanceMethod", referenced from:
>       octave::base_qobject::base_qobject(octave::qt_application&) in
> libgui-src.a(libgui_src_la-octave-qobject.o)
>   "_objc_getClass", referenced from:
>       octave::base_qobject::base_qobject(octave::qt_application&) in
> libgui-src.a(libgui_src_la-octave-qobject.o)
>   "_objc_msgSend", referenced from:
>       octave::base_qobject::base_qobject(octave::qt_application&) in
> libgui-src.a(libgui_src_la-octave-qobject.o)
>   "_sel_getUid", referenced from:
>       octave::base_qobject::base_qobject(octave::qt_application&) in
> libgui-src.a(libgui_src_la-octave-qobject.o)
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> make[2]: *** [libgui/liboctgui.la] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
>
> Anyone know what might be going on there?
>
> Build went fine against Qt 5.12 on macOS 10.14. I'm trying other
> combinations of OS and Qt version to try to narrow the issue down, but
> these builds do take a while...
>
> Cheers,
> Andrew
>

Not sure what is causing this and how this can relate to the Qt version.
But the error seems to come from some MacOS specific code:
https://hg.savannah.gnu.org/hgweb/octave/file/9cd608134ec5/libgui/src/octave-qobject.cc#l81

"class_getClassMethod" and the other functions are from a Mac API.
E.g.: https://developer.apple.com/documentation/objectivec/1418887-class_getclassmethod

I don't know how calling those Objective C functions from C++ is supposed to work. But IIUC, the same code worked correctly in the past...

Maybe a missing system library in the linker flags?

Markus


Reply | Threaded
Open this post in threaded view
|

Re: Octave 6.0.90 build failure on macOS 10.13 against Qt 5.15.1: link error on missing Qt symbols

apjanke-floss


On 9/16/20 9:00 AM, Markus Mützel wrote:

> Am 16. September 2020 um 14:39 Uhr schrieb "Andrew Janke":
>> Hi folks,
>>
>> I tried building the Octave 6.0.90 release candidate on macOS 10.13
>> against the new Qt 5.15.1 LTS release, and it's failing at the link
>> stage with this error:
>>
>> libtool: link: clang++ -std=gnu++11 -dynamiclib  -o
>> libgui/.libs/liboctgui.6.dylib
>> libgui/.libs/liboctgui_la-liboctgui-build-info.o
>> -Wl,-force_load,libgui/qterminal/.libs/libqterminal.a
>> -Wl,-force_load,libgui/graphics/.libs/libgraphics.a
>> -Wl,-force_load,libgui/src/.libs/libgui-src.a
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/hdf5/lib
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/fftw/3.3.8_2/lib
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/arpack/3.7.0_5/libexec/lib
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/pcre/8.44/lib
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/qscintilla2-octave-app/lib
>> libinterp/.libs/liboctinterp.dylib
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/openblas/lib
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86_64-apple-darwin17/10.2.0
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/gcc/10.2.0/lib/gcc/10/gcc/x86_64-apple-darwin17/10.2.0/../../..
>> -L/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/freetype/lib
>> /private/tmp/octave-octave-app@6.0.90-20200916-31442-1145r1k/octave-6.0.90/liboctave/.libs/liboctave.dylib
>> liboctave/.libs/liboctave.dylib -framework QtNetwork -framework
>> QtPrintSupport -framework QtHelp -framework QtWidgets -framework QtGui
>> -framework QtSql -framework QtXml -framework QtCore -lqscintilla2_qt5
>> -framework QtOpenGL -lhdf5
>> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib/libGraphicsMagick++.dylib
>> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/graphicsmagick/1.3.35/lib/libGraphicsMagick.dylib
>> -llcms2 -lbz2 -lltdl -lpthread -lz -framework OpenGL -lfontconfig
>> -lfreetype -framework Carbon -lgl2ps -lcurl -lcholmod -lumfpack -lamd
>> -lcamd -lcolamd -lccolamd -lcxsparse -lsuitesparseconfig
>> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/arpack/3.7.0_5/libexec/lib/libarpack.dylib
>> -lqrupdate -lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f -lopenblas
>> -lreadline -lncurses -lpcre -ldl -lgfortran -lquadmath -liconv -lm
>> -pthread
>> -F/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/qt-octave-app/5.15.1/lib
>> -F/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/qt-octave-app/5.15.1/lib
>> -F/Applications/Octave-6.0.90.app/Contents/Resources/usr/opt/qt-octave-app/lib
>> -Wl,-framework -Wl,CoreFoundation -Wl,-dylib_file
>> -Wl,/Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/octave-octave-app@6.0.90/6.0.90/lib/octave/6.0.90/liboctave.8.dylib:/private/tmp/octave-octave-app@6.0.90-20200916-31442-1145r1k/octave-6.0.90/liboctave/.libs/liboctave.dylib
>> -pthread -framework OpenGL -framework Carbon -framework QtNetwork
>> -framework QtPrintSupport -framework QtHelp -framework QtWidgets
>> -framework QtGui -framework QtSql -framework QtXml -framework QtCore
>> -framework QtOpenGL -install_name
>> /Applications/Octave-6.0.90.app/Contents/Resources/usr/Cellar/octave-octave-app@6.0.90/6.0.90/lib/octave/6.0.90/liboctgui.6.dylib
>> -compatibility_version 7 -current_version 7.0 -Wl,-single_module
>> Undefined symbols for architecture x86_64:
>>    "_class_getClassMethod", referenced from:
>>        octave::base_qobject::base_qobject(octave::qt_application&) in
>> libgui-src.a(libgui_src_la-octave-qobject.o)
>>    "_class_getInstanceMethod", referenced from:
>>        octave::base_qobject::base_qobject(octave::qt_application&) in
>> libgui-src.a(libgui_src_la-octave-qobject.o)
>>    "_objc_getClass", referenced from:
>>        octave::base_qobject::base_qobject(octave::qt_application&) in
>> libgui-src.a(libgui_src_la-octave-qobject.o)
>>    "_objc_msgSend", referenced from:
>>        octave::base_qobject::base_qobject(octave::qt_application&) in
>> libgui-src.a(libgui_src_la-octave-qobject.o)
>>    "_sel_getUid", referenced from:
>>        octave::base_qobject::base_qobject(octave::qt_application&) in
>> libgui-src.a(libgui_src_la-octave-qobject.o)
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see
>> invocation)
>> make[2]: *** [libgui/liboctgui.la] Error 1
>> make[1]: *** [all-recursive] Error 1
>> make: *** [all] Error 2
>>
>>
>> Anyone know what might be going on there?
>>
>> Build went fine against Qt 5.12 on macOS 10.14. I'm trying other
>> combinations of OS and Qt version to try to narrow the issue down, but
>> these builds do take a while...
>>
>> Cheers,
>> Andrew
>>
>
> Not sure what is causing this and how this can relate to the Qt version.
> But the error seems to come from some MacOS specific code:
> https://hg.savannah.gnu.org/hgweb/octave/file/9cd608134ec5/libgui/src/octave-qobject.cc#l81
>
> "class_getClassMethod" and the other functions are from a Mac API.
> E.g.: https://developer.apple.com/documentation/objectivec/1418887-class_getclassmethod
>
> I don't know how calling those Objective C functions from C++ is supposed to work. But IIUC, the same code worked correctly in the past...
>
> Maybe a missing system library in the linker flags?
>
> Markus

Oh yeahhhh... I think I actually wrote that code.

Okay, now I know where to look. I'll try to hunt this down. Thanks!

Cheers,
Andrew