Problem with fixup bundle and duplicate change commands on macOS

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with fixup bundle and duplicate change commands on macOS

Schulte, Lukas

Hey guys,

 

So I’m trying to use fixup_bundle for our software, and for a reason that I can’t wrap my head around executing fixup_bundle results in a call to install_name_tool where in the changes variable some commands are duplicate (in my case, double deletion of an rpath during fixing up of some Qt dependencies, namely QtWebViewEngineCore).

I didn’t find anyone with the same problem as me on the internet so I figured I would just ask you guys for advice.


I’m using CMake 3.3.2 , Qt 5.9 and OsX 10.11.6. 


So my question is – what would be my best way of action here? As this is happening with automatically resolved dependencies, I don’t have much option to handle this in my own CMake files.

 

What I could think of if there’s not something im doing horribly wrong was implementing a duplicate removal in BundleUtitilties.cmake which I would then discuss on the Developer List I guess- does anyone happen to have any better ideas or hints what I could do to solve this?


 

Thanks in advance!

 

Lukas

--------------------------------------------------------------------------------------

 

Lukas Schulte

PhD Student

Max-Planck-Institute for biophysical Chemistry

Department of Structural Dynamics

Am Fassberg 11

D-37077 Goettingen

+49-551-201-1410

 


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with fixup bundle and duplicate change commands on macOS

Luis Caro Campos
Hi Lukas, 

Could you provide some details? Please do correct me if any of my assumptions are wrong.

You are calling FIXUP_BUNDLE on an executable created this way:
add_executable(MyAppName MACOSX_BUNDLE ...),

and you need are calling FIXUP_BUNDLE so that the 3rd party library dependencies are pulled into the bundle, so that the bundle becomes standalone. 

Is FIXUP_BUNDLE being called at build time ("make"), perhaps as custom command that depends on the application target, or install time ("make install"), as part of the INSTALL(...) directive in a cmake script?  

What exactly do you mean by "duplicate commands" ?

In order to make the bundle standalone, I believe FIXUP_BUNDLE iteratively goes through the dependencies of the main executable, which are 'hardcoded' in the executable. You can list the depencies using
$ otool -L executableName

For each dependency (dylib shared library or a Framework), the dependencies will be copied to the Frameworks folder in the bundle, based on their install name, and the executable will be fixed using install_name_tool to make sure that non-system libraries are loaded from the Frameworks folder. If these dependencies have other dependencies, install_name_tool is also called on them.

Sometimes there are hiccups, and unfortunately in some cases it may be difficult to produce a truly re-locatable bundle if the install names of some libraries are not fully "correct". 

Regards,
Luis


On Thu, Jun 22, 2017 at 6:01 PM, Schulte, Lukas <[hidden email]> wrote:

Hey guys,

 

So I’m trying to use fixup_bundle for our software, and for a reason that I can’t wrap my head around executing fixup_bundle results in a call to install_name_tool where in the changes variable some commands are duplicate (in my case, double deletion of an rpath during fixing up of some Qt dependencies, namely QtWebViewEngineCore).

I didn’t find anyone with the same problem as me on the internet so I figured I would just ask you guys for advice.


I’m using CMake 3.3.2 , Qt 5.9 and OsX 10.11.6. 


So my question is – what would be my best way of action here? As this is happening with automatically resolved dependencies, I don’t have much option to handle this in my own CMake files.

 

What I could think of if there’s not something im doing horribly wrong was implementing a duplicate removal in BundleUtitilties.cmake which I would then discuss on the Developer List I guess- does anyone happen to have any better ideas or hints what I could do to solve this?


 

Thanks in advance!

 

Lukas

--------------------------------------------------------------------------------------

 

Lukas Schulte

PhD Student

Max-Planck-Institute for biophysical Chemistry

Department of Structural Dynamics

Am Fassberg 11

D-37077 Goettingen

<a href="tel:+49%20551%202011410" target="_blank" value="+495512011410">+49-551-201-1410

 


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...