macports : compiling with headerpad_max_install_names flag

asked 2012-11-01 02:00:46 -0500

luc gravatar image


I need to make a app bundle for an app developped with Python27 and OpenCv on MacOsX through macports.

I am using py2app for this. Unfortunately, it fails. The py2app maintainer said:

Shared libraries on OSX contain an absolute path to their location, and likewise all used libraries are also mentioned using an absolute path. Py2app uses macholib to rewrite those mentions to relative paths starting with '@executable_path'. For libraries that are located in /opt/local the new path requires more space than the old one, hence the error message. One way to ensure that there is enough space is the linker flag "headerpad_max_install_names". I don't know how to tell darwinports to add this flag when building opencv.

The macports support said:

There shouldn't be any problem with just making opencv always build with headerpad_max_install_names so we should just do that, if we can figure out how/where to insert that directive.

How to do that?

edit retag flag offensive close merge delete