From: Maurice Lombardi Maurice.Lombardi@ujf-grenoble.fr Subject: Re: Grx Digest, Vol 8, Issue 12 To: grx@gnu.de Message-ID: 50A6BF3B.2060107@ujf-grenoble.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Le 16/11/2012 19:59, Schindler Karl-Michael a ?crit :
This is the point, where package manager like fink, macports or homebrew come into play and provide an infrastructure for the installation of open source software and also deal with version conflicts as good as possible. They are similar to apt-get and yum on linux. In fink the way to avoid version conflicts is to "live" in a directory separate from /usr/local. The default is /sw. In most packages, which are build with "./configure; make; sudo make install" this can simply be achieved by setting --prefix=/sw, but if need be the build scripts can be extended.
OK, so I have uploaded to the "more things" directory a new macosx.diff, which contains in addition
- -I and -L instructions rooted to $(prefix) to locate the addon
directories 2) provisions in makedefs.grx and in the configure script to build "fat" binaries. If I correctly understood, it is only necessary to provide multiple -arch instructions to Apple gcc to make that.
Maurice
For fink I do not really need options for fat binaries, but others might welcome them. When validating the fink package, the install_name of the dylib was incorrect. In order to fix it, I had to do one more replacement in makefile.osx:
-dylib_install_name,$(notdir $(GRX20SHna))
-install_name ${libdir}/libgrx20X-$(GRX_VERSION).dylib
Another point is that new versions (1.4 or 1.5) of libpng cannot be used, because png_check_sig is referenced from querypng and readpng in png2ctx.c. A quick google on the topic revealed this page:
http://bugs.sun.com/view_bug.do?bug_id=6959123
They reference this patch
http://cr.openjdk.java.net/~andrew/libpng/webrev.01/src/share/native/sun/awt...
In analogy to it, this should be a patch for src/gformats/png2ctx.c:
- if( ! png_check_sig( buf,8 ) ) return -1; + if(png_sig_cmp( buf,0,8 ) ) return -1;
I tried it and compile and link work, but i haven't done an actual test of this modification. Also, there is no need for an immediate update and a new version of grx, because for the time being i can include this patch in the fink package.
So far, the package looks good enough to present it to others for further review.
Michael.
Le 19/11/2012 17:59, Schindler Karl-Michael a écrit :
For fink I do not really need options for fat binaries, but others might welcome them.
OK, but I would be interested that somebody checks these options.
When validating the fink package, the install_name of the
dylib was incorrect. In order to fix it, I had to do one more replacement in makefile.osx:
-dylib_install_name,$(notdir $(GRX20SHna))
-install_name ${libdir}/libgrx20X-$(GRX_VERSION).dylib
OK , corrected as
-install_name,$(libdir)/$(notdir $(GRX20SHna))
for consistency. The result is the same.
Another point is that new versions (1.4 or 1.5) of libpng cannot be used, because png_check_sig is referenced from querypng and readpng in png2ctx.c. A quick google on the topic revealed this page:
http://bugs.sun.com/view_bug.do?bug_id=6959123
They reference this patch
http://cr.openjdk.java.net/~andrew/libpng/webrev.01/src/share/native/sun/awt...
In analogy to it, this should be a patch for src/gformats/png2ctx.c:
- if( ! png_check_sig( buf,8 ) ) return -1;
- if(png_sig_cmp( buf,0,8 ) ) return -1;
OK, checked and included. Does not break anything anyway.
New version of macosx.diff uploaded
Maurice
Maurice Lombardi wrote:
OK , corrected as
-install_name,$(libdir)/$(notdir $(GRX20SHna))
I suggest to add -headerpad_max_install_names (which is an option that Apple gcc understands without -Wl).
-headerpad_max_install_names Automatically adds space for future expansion of load commands such that all paths could expand to MAXPATHLEN. Only useful if intend to run install_name_tool to alter the load commands later.
I refer to my previous remarks about install names and run install_name_tool https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/install_name_tool.1.html
Regards,
Adriaan van Os
Le 21/11/2012 16:04, Adriaan van Os a écrit :
Maurice Lombardi wrote:
OK , corrected as
-install_name,$(libdir)/$(notdir $(GRX20SHna))
I suggest to add -headerpad_max_install_names (which is an option that Apple gcc understands without -Wl).
-headerpad_max_install_names Automatically adds space for future expansion of load
commands such that all paths could expand to MAXPATHLEN. Only useful if intend to run install_name_tool to alter the load commands later.
I refer to my previous remarks about install names and run install_name_tool https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/install_name_tool.1.html
OK, done and uploaded. I missed it. By the way, if symlinks to it are added as I explained in my last message is it necessary to give all names inside the dylib for this to work ?
Maurice
Maurice Lombardi wrote:
OK, done and uploaded. I missed it. By the way, if symlinks to it are added as I explained in my last message is it necessary to give all names inside the dylib for this to work ?
No, the install_name is the name of the real file. And the symlinks should just work as expected.
Regards,
Adriaan van Os