SoQt linking error on Mavericks (10.9.3)

Mark Brethen mark.brethen at gmail.com
Sat Jun 28 10:45:45 PDT 2014


On Jun 28, 2014, at 3:23 AM, Ryan Schmidt <ryandesign at macports.org> wrote:

> 
> On Jun 27, 2014, at 8:49 PM, Mark Brethen <mark.brethen at gmail.com> wrote:
> 
>> 
>> On Jun 27, 2014, at 9:22 AM, Joshua Root <jmr at macports.org> wrote:
>> 
>>> On 2014-6-27 23:30 , Mark Brethen wrote:
>>>> 
>>>> On Jun 27, 2014, at 12:45 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>>>> 
>>>>> 
>>>>> On Jun 27, 2014, at 12:38 AM, Joshua Root wrote:
>>>>> 
>>>>>> On 2014-6-27 14:03 , Mark Brethen wrote:
>>>>>>> After installing Coin, I get the following error with SoQt:
>>>>>>> 
>>>>>>> --->  Found 1 broken file(s), matching files to ports
>>>>>>> 
>>>>>>> 
>>>>>>> Error: Port SoQt is still broken after rebuilding it more than 3 times.
>>>>>>> Error: Please run port -d -y rev-upgrade and use the output to report a bug.
>>>>>>> 
>>>>>>> Running port -d -y rev-upgrade gives:
>>>>>>> 
>>>>>>> Could not open Inventor.framework/Versions/C/Inventor: Error opening or reading file (referenced from /opt/local/Library/Frameworks/SoQt.framework/Versions/A/Libraries/libSoQt.20.5.0.dylib)
>>>>>>> DEBUG: Marking /opt/local/Library/Frameworks/SoQt.framework/Versions/A/Libraries/libSoQt.20.5.0.dylib as broken
>>>>>>> --->  Found 1 broken file(s), matching files to ports
>>>>>> 
>>>>>> "Inventor.framework/Versions/C/Inventor" is a relative path and so not a
>>>>>> suitable install_name.
>>>>> 
>>>>> Correct. And that's yet another bug in the Coin port's +aqua variant that needs to be fixed.
>>>>> 
>>>>> SoQt's frameworks' install_names are wrong too, but I'm not sure if that's because Coin's are wrong or if it's a separately-fixable instance of the same problem.
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> The Inventor install_name originates with Coin: 'Since Coin is an Open Inventor implementation, the framework is named "Inventor", not Coin.' (Coin/Readme.MacOS)
>>>> 
>>>> However, I did not experience any linking errors when I installed Coin as a framework. SoQt is just a bridge between Qt and Coin. 
>>>> 
>>>> So, to clarify, are you saying this is just a flag that is raised because there isn't a port named 'Inventor'?
>>> 
>>> No, we're saying the install_name needs to be an absolute path, not a
>>> relative one.
>>> 
>>> - Josh
>> 
>> For SoQt: -install_name  /opt/local/Library/Frameworks/SoQt.framework/Versions/A/Libraries/libSoQt.20.dylib 
>> 
>> For Coin: -install_name  /opt/local/Library/Frameworks/Inventor.framework/Versions/C/Libraries/libCoin.60.dylib
> 
> Are you saying those are the install_names that are currently being used, or those are the flags that need to be used? If the latter, you'll need to figure out how to patch the build system to insert those.
> 
Those are the install_names at build time of each respective port.
> 
>> brethen-mbp:Frameworks marbre$ ls -alR Inventor.framework
>> total 32
>> drwxr-xr-x   7 root  wheel  238 Jun 24 19:52 .
>> drwxr-xr-x  27 root  wheel  918 Jun 27 19:41 ..
>> lrwxr-xr-x   1 root  wheel   24 Jun 24 19:52 Headers -> Versions/Current/Headers
>> lrwxr-xr-x   1 root  wheel   25 Jun 24 19:52 Inventor -> Versions/Current/Inventor
>> lrwxr-xr-x   1 root  wheel   26 Jun 24 19:52 Libraries -> Versions/Current/Libraries
>> lrwxr-xr-x   1 root  wheel   26 Jun 24 19:52 Resources -> Versions/Current/Resources
>> drwxr-xr-x   4 root  wheel  136 Jun 24 19:52 Versions
>> 
>> Inventor.framework/Versions:
>> total 8
>> drwxr-xr-x  4 root  wheel  136 Jun 24 19:52 .
>> drwxr-xr-x  7 root  wheel  238 Jun 24 19:52 ..
>> drwxr-xr-x  6 root  wheel  204 Jun 24 19:52 C
>> lrwxr-xr-x  1 root  wheel    1 Jun 24 19:52 Current -> C
>> 
>> Inventor.framework/Versions/C:
>> total 8
>> drwxr-xr-x    6 root  wheel   204 Jun 24 19:52 .
>> drwxr-xr-x    4 root  wheel   136 Jun 24 19:52 ..
>> drwxr-xr-x  115 root  wheel  3910 Jun 24 19:52 Headers
>> lrwxr-xr-x    1 root  wheel    23 Jun 24 19:52 Inventor -> Libraries/libCoin.dylib
>> drwxr-xr-x    5 root  wheel   170 Jun 24 19:52 Libraries
>> drwxr-xr-x    8 root  wheel   272 Jun 24 19:52 Resources
>> 
>> Inventor.framework/Versions/C/Libraries:
>> total 14776
>> drwxr-xr-x  5 root  wheel      170 Jun 24 19:52 .
>> drwxr-xr-x  6 root  wheel      204 Jun 24 19:52 ..
>> -rwxr-xr-x  1 root  wheel  7555684 Jun 24 19:52 libCoin.60.1.3.dylib
>> lrwxr-xr-x  1 root  wheel       20 Jun 24 19:52 libCoin.60.dylib -> libCoin.60.1.3.dylib
>> lrwxr-xr-x  1 root  wheel       20 Jun 24 19:52 libCoin.dylib -> libCoin.60.1.3.dylib
>> 
>> Why isn't SoQt linked directly to  libCoin.60.1.3.dylib?
> 
> What do you mean? What is it linked to instead?
> 
:info:build /usr/bin/clang++ -dynamiclib  -o .libs/libSoQt.20.5.0.dylib  .libs/SoQt.o .libs/SoQtSignalThread.o .libs/SoQtComponent.o .libs/SoQtGLWidget.o .libs/SoQtImageReader.o .libs/SoAny.o .libs/SoQtCursor.o .libs/SoQtObject.o .libs/SoQtCommon.o .libs/SoQtComponentCommon.o .libs/SoQtGLWidgetCommon.o .libs/SoQtRenderArea.o  .libs/libSoQt.lax/libSoQtDevices.a/6DOFEvents.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtDevice.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtDeviceCommon.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtInputFocus.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtInputFocusCommon.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtKeyboard.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtKeyboardCommon.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtMouse.o .libs/libSoQt.lax/libSoQtDevices.a/SoQtMouseCommon.o .libs/libSoQt.lax/libSoQtDevices.a/spwinput_win32.o .libs/libSoQt.lax/libSoQtDevices.a/spwinput_x11.o  .libs/libSoQt.lax/libSoQtEditors.a/SoQtColorEditor.o .libs/libSoQt.lax/libSoQtEditors.a/SoQtMaterialEditor.o  .libs/libSoQt.lax/libSoGuiEngines.a/Engines.o .libs/libSoQt.lax/libSoGuiEngines.a/Format.o .libs/libSoQt.lax/libSoGuiEngines.a/RadioGroup.o  .libs/libSoQt.lax/libSoGuiNodes.a/ClickCounter.o .libs/libSoQt.lax/libSoGuiNodes.a/ColorEditor.o .libs/libSoQt.lax/libSoGuiNodes.a/Frame.o .libs/libSoQt.lax/libSoGuiNodes.a/Image.o .libs/libSoQt.lax/libSoGuiNodes.a/Label.o .libs/libSoQt.lax/libSoGuiNodes.a/MaterialEditor.o .libs/libSoQt.lax/libSoGuiNodes.a/Nodes.o .libs/libSoQt.lax/libSoGuiNodes.a/Pane.o .libs/libSoQt.lax/libSoGuiNodes.a/Position.o .libs/libSoQt.lax/libSoGuiNodes.a/RadioButton.o .libs/libSoQt.lax/libSoGuiNodes.a/SceneTexture2.o .libs/libSoQt.lax/libSoGuiNodes.a/Slider1.o .libs/libSoQt.lax/libSoGuiNodes.a/Slider2.o .libs/libSoQt.lax/libSoGuiNodes.a/ToggleButton.o .libs/libSoQt.lax/libSoGuiNodes.a/Translation.o .libs/libSoQt.lax/libSoGuiNodes.a/ViewpointWrapper.o .libs/libSoQt.lax/libSoGuiNodes.a/ViewportFix.o  .libs/libSoQt.lax/libSoQtViewers.a/ExaminerViewer.o .libs/libSoQt.lax/libSoQtViewers.a/FullViewer.o .libs/libSoQt.lax/libSoQtViewers.a/PlaneViewer.o .libs/libSoQt.lax/libSoQtViewers.a/SoQtConstrainedViewer.o .libs/libSoQt.lax/libSoQtViewers.a/SoQtExaminerViewer.o .libs/libSoQt.lax/libSoQtViewers.a/SoQtFlyViewer.o .libs/libSoQt.lax/libSoQtViewers.a/SoQtFullViewer.o .libs/libSoQt.lax/libSoQtViewers.a/SoQtPlaneViewer.o .libs/libSoQt.lax/libSoQtViewers.a/SoQtViewer.o  .libs/libSoQt.lax/libSoQtWidgets.a/QtNativePopupMenu.o .libs/libSoQt.lax/libSoQtWidgets.a/SoAnyThumbWheel.o .libs/libSoQt.lax/libSoQtWidgets.a/SoQtGLArea.o .libs/libSoQt.lax/libSoQtWidgets.a/SoQtPopupMenu.o .libs/libSoQt.lax/libSoQtWidgets.a/SoQtThumbWheel.o   -L/opt/local/lib -lQtOpenGL -lQtGui -lQtCore  -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-F/opt/local/Library/Frameworks -Wl,-framework -Wl,Inventor -Wl,-framework -Wl,OpenGL -install_name  /opt/local/Library/Frameworks/SoQt.framework/Versions/A/Libraries/libSoQt.20.dylib -compatibility_version 26 -current_version 26.0 -Wl,-single_module

and SoQtMaterialEditor.o, for example,

:info:build /bin/sh ../../../../libtool --mode=link /usr/bin/clang++  -pipe -Os -arch x86_64 -stdlib=libc++ -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -Wno-non-virtual-dtor  -fno-builtin -finline-functions -Wreturn-type -Wchar-subscripts -Wparentheses  -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -Wl,-F/opt/local/Library/Frameworks -Wl,-framework,Inventor -Wl,-framework,OpenGL -o libSoQtEditors.la    SoQtColorEditor.lo SoQtMaterialEditor.lo

The commandline for building against Coin is something like this:

"cc -framework Inventor -framework OpenGL -o foo foo.cpp"


Maybe the best thing to do is to disable the creation of the framework and install Coin/SoQt as
standalone shared libraries, using

--without-framework

Since I don't understand how they work.

Mark






More information about the macports-dev mailing list