* 23.0.60; How to make some libraries link statically via pkg-config files? @ 2008-02-18 18:52 Peter Dyballa 2008-02-18 19:32 ` Dan Nicolaescu 0 siblings, 1 reply; 12+ messages in thread From: Peter Dyballa @ 2008-02-18 18:52 UTC (permalink / raw) To: emacs-pretest-bug Hello! GNU Emacs 23.0.60 with enabled font backend and then using the xft variant crashes it reliably. Problem can be that at run-time two versions of the shared library get used on Mac OS X, marked with *: 0x1000 - 0x34bfff emacs .../emacs/src/emacs 0x53c000 - 0x54bfff libXmu.6.dylib /usr/X11R6/lib/libXmu.6.dylib 0x553000 - 0x594fff libXt.6.dylib /usr/X11R6/lib/libXt.6.dylib 0x5a9000 - 0x5aefff libSM.6.dylib /usr/X11R6/lib/libSM.6.dylib 0x5b2000 - 0x5c1fff libICE.6.dylib /usr/X11R6/lib/libICE.6.dylib 0x5c9000 - 0x5d5fff libXext.6.dylib /usr/X11R6/lib/libXext.6.dylib 0x5db000 - 0x5f8fff libjpeg.62.dylib /sw/lib/libjpeg.62.dylib 0x705000 - 0x751fff libtiff.3.dylib /sw/lib/libtiff.3.dylib 0x7e8000 - 0x7eefff libgif.4.dylib /sw/lib/libgif.4.dylib 0x1008000 - 0x1026fff libpng12.0.dylib /sw/lib/libpng12.0.dylib 0x1085000 - 0x1090fff libXpm.4.dylib /usr/X11R6/lib/libXpm.4.dylib 0x1095000 - 0x10a2fff libXft.2.dylib /usr/X11R6/lib/libXft.2.dylib 0x10a8000 - 0x10bdfff libgdk_pixbuf-2.0.0.dylib /sw/lib/ libgdk_pixbuf-2.0.0.dylib 0x10c4000 - 0x10c5fff libgmodule-2.0.0.dylib /sw/lib/ libgmodule-2.0.0.dylib 0x10c8000 - 0x10d0fff libintl.3.dylib /sw/lib/libintl.3.dylib 0x10e6000 - 0x10ecfff libXrender.1.dylib /usr/X11R6/lib/ libXrender.1.dylib 0x1205000 - 0x1238fff libXaw3d.7.dylib /sw/lib/libXaw3d.7.dylib 0x1371000 - 0x143afff libX11.6.dylib /usr/X11R6/lib/libX11.6.dylib * 0x1463000 - 0x14cbfff libfreetype.6.dylib /sw/lib/freetype219/lib/ libfreetype.6.dylib 0x1663000 - 0x1683fff libfontconfig.1.dylib /sw/lib/fontconfig2/ lib/libfontconfig.1.dylib * 0x16eb000 - 0x1712fff librsvg-2.2.dylib /sw/lib/librsvg-2.2.dylib 0x1799000 - 0x17cdfff libgobject-2.0.0.dylib /sw/lib/ libgobject-2.0.0.dylib 0x17de000 - 0x1869fff libglib-2.0.0.dylib /sw/lib/ libglib-2.0.0.dylib 0x1885000 - 0x197efff libiconv.2.dylib /sw/lib/libiconv.2.dylib 0x19d0000 - 0x19fefff libdbus-1.3.dylib /sw/lib/libdbus-1.3.dylib 0x1a82000 - 0x1ab0fff libncurses.5.dylib /sw/lib/ncurses/ libncurses.5.dylib 0x1acc000 - 0x1adbfff libotf.0.dylib /sw/lib/libotf.0.dylib * 0x1b00000 - 0x1b1bfff libfontconfig.1.dylib /usr/X11R6/lib/ libfontconfig.1.dylib * 0x1b2a000 - 0x1b49fff libexpat.0.dylib /usr/X11R6/lib/libexpat. 0.dylib * 0x1b50000 - 0x1b92fff libfreetype.6.dylib /usr/X11R6/lib/ libfreetype.6.dylib * 0x1ba5000 - 0x1bc3fff libexpat.1.dylib /sw/lib/libexpat.1.dylib 0x1bf8000 - 0x1c25fff libcroco-0.6.3.dylib /sw/lib/ libcroco-0.6.3.dylib 0x1c9f000 - 0x1caffff libart_lgpl_2.2.dylib /sw/lib/ libart_lgpl_2.2.dylib 0x1cb5000 - 0x1cd2fff libpangoft2-1.0.0.dylib /sw/lib/ libpangoft2-1.0.0.dylib 0x1cdc000 - 0x1d0bfff libpango-1.0.0.dylib /sw/lib/ libpango-1.0.0.dylib 0x2000000 - 0x2111fff libxml2.2.dylib /sw/lib/libxml2.2.dylib 0x8fe00000 - 0x8fe52fff dyld 46.16 /usr/lib/dyld When I patch the pkg-config files to contain for example -Wl,-Bstatic -lfreetype -Wl,-Bdynamic this gets "converted" to nonsense: pkg-config --libs 'xft >= 0.13.0' -Wl,-Bstatic -Wl,-Bdynamic -L/sw/lib/fontconfig2/lib -L/sw/lib/ freetype219/lib -L/usr/X11R6/lib -lfreetype -lXft -lfontconfig The man page mentions some "proper tagging" without mentioning their names. How can I prepare the PC files that the linker switches are saved? Or should I better "patch" the Emacs Makefiles? -- Greetings Pete The future will be much better tomorrow. – George W. Bush ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-18 18:52 23.0.60; How to make some libraries link statically via pkg-config files? Peter Dyballa @ 2008-02-18 19:32 ` Dan Nicolaescu 2008-02-18 23:51 ` Peter Dyballa 0 siblings, 1 reply; 12+ messages in thread From: Dan Nicolaescu @ 2008-02-18 19:32 UTC (permalink / raw) To: Peter Dyballa; +Cc: emacs-pretest-bug Peter Dyballa <Peter_Dyballa@Freenet.DE> writes: > Hello! > > GNU Emacs 23.0.60 with enabled font backend and then using the xft > variant crashes it reliably. Problem can be that at run-time two > versions of the shared library get used on Mac OS X, marked with *: Your problem lies in linking 2 versions of the same library. You should only ever do that if you know exactly what you are doing, and know details about the libraries and their users. So, IMO, there's nothing that emacs should do about this. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-18 19:32 ` Dan Nicolaescu @ 2008-02-18 23:51 ` Peter Dyballa 2008-02-19 0:10 ` Dan Nicolaescu 0 siblings, 1 reply; 12+ messages in thread From: Peter Dyballa @ 2008-02-18 23:51 UTC (permalink / raw) To: Dan Nicolaescu; +Cc: emacs-pretest-bug Am 18.02.2008 um 20:32 schrieb Dan Nicolaescu: > Your problem lies in linking 2 versions of the same library. You > should > only ever do that if you know exactly what you are doing, and know > details about the libraries and their users. > > So, IMO, there's nothing that emacs should do about this. Yes. And therefore I want to delegate this to ld to link those libraries that exist twice statically when I have control which library gets used. And since the information about the libraries to link comes from PC files, I need to patch them somehow. In more detail: the version of libfontconfig in /usr/X11R6 is too old to be used by GNU Emacs, it misses some API elements (FC_WIDTH and FC_WEIGHT_REGULAR – or is it from libfreetype?), so that GNU Emacs cannot be compiled. So in this case I have to use the other libfontconfig (or libfreetype). -- Greetings Pete Atheism is a non prophet organization. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-18 23:51 ` Peter Dyballa @ 2008-02-19 0:10 ` Dan Nicolaescu 2008-02-19 9:47 ` Peter Dyballa 0 siblings, 1 reply; 12+ messages in thread From: Dan Nicolaescu @ 2008-02-19 0:10 UTC (permalink / raw) To: Peter Dyballa; +Cc: emacs-pretest-bug Peter Dyballa <Peter_Dyballa@freenet.de> writes: > Am 18.02.2008 um 20:32 schrieb Dan Nicolaescu: > > > Your problem lies in linking 2 versions of the same library. You > > should > > only ever do that if you know exactly what you are doing, and know > > details about the libraries and their users. > > > > So, IMO, there's nothing that emacs should do about this. > > Yes. And therefore I want to delegate this to ld to link those > libraries that exist twice statically when I have control which > library gets used. Again, if you are trying to link the 2 versions of the same library twice you are asking for trouble. It can be made work if you know what your are doing, but it's not a good idea. If you do such a thing, and report bugs here, please explicitly say this in each bug report. IMHO it's better to figure out a way to avoid linking 2 versions of the same library than to play any tricks with the config files, linker, etc. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-19 0:10 ` Dan Nicolaescu @ 2008-02-19 9:47 ` Peter Dyballa 2008-02-19 9:59 ` Dan Nicolaescu 0 siblings, 1 reply; 12+ messages in thread From: Peter Dyballa @ 2008-02-19 9:47 UTC (permalink / raw) To: Dan Nicolaescu; +Cc: emacs-pretest-bug Am 19.02.2008 um 01:10 schrieb Dan Nicolaescu: > Again, if you are trying to link the 2 versions of the same library > twice you are asking for trouble. I never had the idea of linking two libraries of the same kind (this sounds to me quite damaged). In the Mac OS X environment it happens that both shared libraries are presented to the application, as recorded in the Mac OS X crash dump. I want to avoid this situation by statically linking one of them to avoid that the application asks for one particular shared library – and gets two presented. And by choosing one library I might be able to find some details that might explain why GNU Emacs crashes. -- Greetings Pete It's not the valleys in life I dread so much as the dips. – Garfield ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-19 9:47 ` Peter Dyballa @ 2008-02-19 9:59 ` Dan Nicolaescu 2008-02-19 10:31 ` Peter Dyballa 0 siblings, 1 reply; 12+ messages in thread From: Dan Nicolaescu @ 2008-02-19 9:59 UTC (permalink / raw) To: Peter Dyballa; +Cc: emacs-pretest-bug Peter Dyballa <Peter_Dyballa@freenet.de> writes: > Am 19.02.2008 um 01:10 schrieb Dan Nicolaescu: > > > Again, if you are trying to link the 2 versions of the same library > > twice you are asking for trouble. > > I never had the idea of linking two libraries of the same kind (this > sounds to me quite damaged). In the Mac OS X environment it happens Is this in the default Mac OS X environment, or this happens in your particular setup? > that both shared libraries are presented to the application, as > recorded in the Mac OS X crash dump. I want to avoid this situation > by statically linking one of them to avoid that the application asks > for one particular shared library – and gets two presented. And by As I said in the previous message, statically linking one version of the library still means you are linking the same library twice. The very complex configure flags that your have posted in a previous message seem to indicate that something is seriously strange in your setup. Does ldd emacs (or the equivalent of ldd on Mac OS X) show the library twice? > choosing one library I might be able to find some details that might > explain why GNU Emacs crashes. Linking 2 versions of the same library is extremely likely to cause very strange crashed. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-19 9:59 ` Dan Nicolaescu @ 2008-02-19 10:31 ` Peter Dyballa 2008-02-19 12:03 ` Andreas Schwab 2008-02-19 20:31 ` Stephen J. Turnbull 0 siblings, 2 replies; 12+ messages in thread From: Peter Dyballa @ 2008-02-19 10:31 UTC (permalink / raw) To: Dan Nicolaescu; +Cc: emacs-pretest-bug Am 19.02.2008 um 10:59 schrieb Dan Nicolaescu: >> >> I never had the idea of linking two libraries of the same kind (this >> sounds to me quite damaged). In the Mac OS X environment it happens > > Is this in the default Mac OS X environment, or this happens in your > particular setup? I'd say it's the standard behaviour. > >> that both shared libraries are presented to the application, as >> recorded in the Mac OS X crash dump. I want to avoid this situation >> by statically linking one of them to avoid that the application asks >> for one particular shared library – and gets two presented. And by > > As I said in the previous message, statically linking one version > of the > library still means you are linking the same library twice. Could you explain this? I can't understand why I am linking a library twice by linking it statically once ... > > The very complex configure flags that your have posted in a previous > message seem to indicate that something is seriously strange in your > setup. Yes: I have old and inadequate libraries that come with the OS and I have newer more adequate ones. > > Does > ldd emacs > (or the equivalent of ldd on Mac OS X) > show the library twice? No. Otool -L reports it only once. Like this: /sw/lib/fontconfig2/lib/libfontconfig.1.dylib (compatibility version 3.0.0, current version 3.0.0) /sw/lib/freetype219/lib/libfreetype.6.dylib (compatibility version 10.0.0, current version 10.10.0) /sw/lib/libXaw3d.7.dylib (compatibility version 7.0.0, current version 7.0.0) /sw/lib/libdbus-1.3.dylib (compatibility version 6.0.0, current version 6.0.0) /sw/lib/libgdk_pixbuf-2.0.0.dylib (compatibility version 601.0.0, current version 601.10.0) /sw/lib/libgif.4.dylib (compatibility version 6.0.0, current version 6.4.0) /sw/lib/libglib-2.0.0.dylib (compatibility version 1201.0.0, current version 1201.12.0) /sw/lib/libgmodule-2.0.0.dylib (compatibility version 1201.0.0, current version 1201.12.0) /sw/lib/libgobject-2.0.0.dylib (compatibility version 1201.0.0, current version 1201.12.0) /sw/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /sw/lib/libintl.3.dylib (compatibility version 8.0.0, current version 8.3.0) /sw/lib/libjpeg.62.dylib (compatibility version 63.0.0, current version 63.0.0) /sw/lib/libotf.0.dylib (compatibility version 1.0.0, current version 1.0.0) /sw/lib/libpng12.0.dylib (compatibility version 19.0.0, current version 19.0.0) /sw/lib/librsvg-2.2.dylib (compatibility version 12.0.0, current version 12.5.0) /sw/lib/libtiff.3.dylib (compatibility version 12.0.0, current version 12.2.0) /sw/lib/ncurses/libncurses.5.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0, current version 6.3.0) /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0) /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0, current version 6.4.0) /usr/X11R6/lib/libXft.2.dylib (compatibility version 2.1.0, current version 2.1.0) /usr/X11R6/lib/libXmu.6.dylib (compatibility version 6.2.0, current version 6.2.0) /usr/X11R6/lib/libXpm.4.dylib (compatibility version 4.11.0, current version 4.11.0) /usr/X11R6/lib/libXt.6.dylib (compatibility version 6.0.0, current version 6.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.10) /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 92.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) > > >> choosing one library I might be able to find some details that might >> explain why GNU Emacs crashes. > > Linking 2 versions of the same library is extremely likely to cause > very > strange crashed. Sorry, I don't have the idea of doing what you are suggesting. -- Greetings Pete These are my principles and if you don't like them... well, I have others. - Groucho Marx ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-19 10:31 ` Peter Dyballa @ 2008-02-19 12:03 ` Andreas Schwab 2008-02-19 20:31 ` Stephen J. Turnbull 1 sibling, 0 replies; 12+ messages in thread From: Andreas Schwab @ 2008-02-19 12:03 UTC (permalink / raw) To: Peter Dyballa; +Cc: emacs-pretest-bug, Dan Nicolaescu Peter Dyballa <Peter_Dyballa@freenet.de> writes: > Sorry, I don't have the idea of doing what you are suggesting. Whatever has to be done, it is outside the scope of this mailing list. I'd guess you'll get better help on a MacOS related list. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-19 10:31 ` Peter Dyballa 2008-02-19 12:03 ` Andreas Schwab @ 2008-02-19 20:31 ` Stephen J. Turnbull 2008-02-19 21:25 ` Peter Dyballa 1 sibling, 1 reply; 12+ messages in thread From: Stephen J. Turnbull @ 2008-02-19 20:31 UTC (permalink / raw) To: Peter Dyballa; +Cc: emacs-pretest-bug, Dan Nicolaescu [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1379 bytes --] Peter Dyballa writes: > >> that both shared libraries are presented to the application, as > >> recorded in the Mac OS X crash dump. I want to avoid this > >> situation by statically linking one of them to avoid that the > >> application asks for one particular shared library and gets > >> two presented. That's not what's happening. I don't understand the Mac OS X dylib architecture in any depth, but I'm pretty sure that an object can request an object from a specific location to be dynamically linked (similar to the -rpath flag in GNU ld). FWIW, my guess is that the reason you're seeing multiple instances of libraries is not that Mac OS X "presents" them, but because > /usr/X11R6/lib/libXft.2.dylib (compatibility version 2.1.0, current > version 2.1.0) is specifically requesting a different version from the one you get from /sw. Try running otool on /usr/X11R6/lib/libXft.2.dylib and see if the output corresponds to the unwanted versions. My experience with Fink is quite old by now (I switched to DarwinPorts three or four years ago), but it was quite sensitive to this kind of thing. In particular, you really really wanted to use Fink's version of X11 libraries rather than Apple's if you were going to build X11 applications yourself. Old, FWIW, YMMV (but you're clearly not getting very good mileage!) ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-19 20:31 ` Stephen J. Turnbull @ 2008-02-19 21:25 ` Peter Dyballa 2008-02-20 0:32 ` Stephen J. Turnbull 0 siblings, 1 reply; 12+ messages in thread From: Peter Dyballa @ 2008-02-19 21:25 UTC (permalink / raw) To: Stephen J. Turnbull; +Cc: emacs-pretest-bug, Dan Nicolaescu Am 19.02.2008 um 21:31 schrieb Stephen J. Turnbull: > That's not what's happening. I don't understand the Mac OS X dylib > architecture in any depth, but I'm pretty sure that an object can > request an object from a specific location to be dynamically linked > (similar to the -rpath flag in GNU ld). This is my impression too. > FWIW, my guess is that the reason you're seeing multiple instances > of libraries is not that Mac OS X "presents" them, but because > >> /usr/X11R6/lib/libXft.2.dylib (compatibility version 2.1.0, current >> version 2.1.0) > > is specifically requesting a different version from the one you get > from /sw. Try running otool on /usr/X11R6/lib/libXft.2.dylib and see > if the output corresponds to the unwanted versions. It does show: /usr/X11R6/lib/libfontconfig.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/X11R6/lib/libexpat.0.dylib (compatibility version 0.4.0, current version 0.4.0) /usr/X11R6/lib/libfreetype.6.dylib (compatibility version 6.3.0, current version 6.3.0) I was (I still am?) hoping that a statically linked library would satisfy these dependencies too. -- Greetings Pete I hope to die before I *have* to use Microsoft Word. - Donald E. Knuth, 2001-10-02 in Tübingen. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-19 21:25 ` Peter Dyballa @ 2008-02-20 0:32 ` Stephen J. Turnbull 2008-02-20 0:49 ` Peter Dyballa 0 siblings, 1 reply; 12+ messages in thread From: Stephen J. Turnbull @ 2008-02-20 0:32 UTC (permalink / raw) To: Peter Dyballa; +Cc: emacs-pretest-bug, Dan Nicolaescu Peter Dyballa writes: > It does show: > > /usr/X11R6/lib/libfontconfig.1.dylib (compatibility version > 1.0.0, current version 1.0.0) [etc] > I was (I still am?) hoping that a statically linked library would > satisfy these dependencies too. I doubt it. Even if it does, I think you are very likely to run into ABI changes that will cause link errors and/or runtime errors. Have you tried installing Fink's Xft library and linking to that instead of whatever is in /usrX11R6/lib? ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: 23.0.60; How to make some libraries link statically via pkg-config files? 2008-02-20 0:32 ` Stephen J. Turnbull @ 2008-02-20 0:49 ` Peter Dyballa 0 siblings, 0 replies; 12+ messages in thread From: Peter Dyballa @ 2008-02-20 0:49 UTC (permalink / raw) To: Stephen J. Turnbull; +Cc: emacs-pretest-bug, Dan Nicolaescu Am 20.02.2008 um 01:32 schrieb Stephen J. Turnbull: > Have you tried installing Fink's Xft library and linking to that > instead of whatever is in /usrX11R6/lib? I think there is no such! The packages xft1 and xft2 are "virtual" packages, i.e. they comprise material from other packages – or from the OS. There are some pango-xft packages, but they probably bring only pango support. -- Greetings Pete <\ \__ O __O | O\ _\\/\-% _`\<, '()-'-(_)--(_) (_)/(_) ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-02-20 0:49 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-02-18 18:52 23.0.60; How to make some libraries link statically via pkg-config files? Peter Dyballa 2008-02-18 19:32 ` Dan Nicolaescu 2008-02-18 23:51 ` Peter Dyballa 2008-02-19 0:10 ` Dan Nicolaescu 2008-02-19 9:47 ` Peter Dyballa 2008-02-19 9:59 ` Dan Nicolaescu 2008-02-19 10:31 ` Peter Dyballa 2008-02-19 12:03 ` Andreas Schwab 2008-02-19 20:31 ` Stephen J. Turnbull 2008-02-19 21:25 ` Peter Dyballa 2008-02-20 0:32 ` Stephen J. Turnbull 2008-02-20 0:49 ` Peter Dyballa
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.