From: Jeff B. <jef...@gm...> - 2014-01-18 21:36:39
|
Hi folks, Are there any specific reasons we're statically linking against libtu/libmainloop/libextl/etc or why we can't switch to shared libraries? History/inertia? Regards, Jeff -- Jeff Backus jef...@gm... http://github.com/jsbackus |
From: Dima K. <no...@di...> - 2014-01-18 21:39:32
|
jef...@gm... writes: > Hi folks, > > Are there any specific reasons we're statically linking against > libtu/libmainloop/libextl/etc or why we can't switch to shared > libraries? History/inertia? If libwhatever is not used for anything else, static linking is less error prone, faster, etc. Why do you want shared libs? |
From: Jeff B. <jef...@gm...> - 2014-01-18 21:57:29
|
Hi Dima, Thanks! It's a combination of things. The primary instigator is with regard to Fedora's packaging guidelines in that they prefer shared vs. static, and it including lib* in a package causes quite a commotion, even if lib* is only used by the software being packaged. While they do allow special cases, I'm trying to be "a good team player", so to speak. I also ask because libtu, libextl, and libmainloop are used in several places (especially the first two), so I thought it would make sense to make them into shared libraries. Particularly since everything is released as one package now. Regards, Jeff On 01/18/2014 04:39 PM, Dima Kogan wrote: > jef...@gm... writes: > >> Hi folks, >> >> Are there any specific reasons we're statically linking against >> libtu/libmainloop/libextl/etc or why we can't switch to shared >> libraries? History/inertia? > If libwhatever is not used for anything else, static linking is less > error prone, faster, etc. Why do you want shared libs? -- Jeff Backus jef...@gm... http://github.com/jsbackus |
From: Dima K. <no...@di...> - 2014-01-18 22:27:51
|
jef...@gm... writes: > On 01/18/2014 04:39 PM, Dima Kogan wrote: >> jef...@gm... writes: >> >>> Are there any specific reasons we're statically linking against >>> libtu/libmainloop/libextl/etc or why we can't switch to shared >>> libraries? History/inertia? >> If libwhatever is not used for anything else, static linking is less >> error prone, faster, etc. Why do you want shared libs? > > Thanks! It's a combination of things. The primary instigator is with > regard to Fedora's packaging guidelines in that they prefer shared vs. > static, and it including lib* in a package causes quite a commotion, > even if lib* is only used by the software being packaged. While they do > allow special cases, I'm trying to be "a good team player", so to speak. > I also ask because libtu, libextl, and libmainloop are used in several > places (especially the first two), so I thought it would make sense to > make them into shared libraries. Particularly since everything is > released as one package now. Hi Jeff. I looked at the (debian) packages, and those libraries are linked into more than just the notion executable. There're a few more executables (ion-statusd, ion-completefile, etc). So yes, those libraries should be shared. Otherwise (with static linking), there's no reason to ship the libraries in the package, so static linking shouldn't be a huge problem for Fedora. I suspect they strongly oppose shipping static-only libraries, which the packages need not contain anyway. The resulting duplicated code is less than ideal, but this shouldn't be a deal breaker. Am I missing something? dima |
From: Jeff B. <jef...@gm...> - 2014-01-18 22:32:49
|
Hi Dima, On 01/18/2014 05:27 PM, Dima Kogan wrote: > Hi Jeff. I looked at the (debian) packages, and those libraries are > linked into more than just the notion executable. There're a few more > executables (ion-statusd, ion-completefile, etc). So yes, those > libraries should be shared. Otherwise (with static linking), there's > no reason to ship the libraries in the package, so static linking > shouldn't be a huge problem for Fedora. I suspect they strongly oppose > shipping static-only libraries, which the packages need not contain > anyway. The resulting duplicated code is less than ideal, but this > shouldn't be a deal breaker. Am I missing something? dima Ack, sorry I should have clarified. This is with regard to a devel package. The normal notion package doesn't raise any eyebrows, but the devel package does. I could probably make everything go much more smoothly by dropping the devel package. I figured a devel package was necessary in case users wanted to compile 3rd party modules, etc. I guess I should ask - has this been an issue elsewhere? Thanks again! Regards, Jeff -- Jeff Backus jef...@gm... http://github.com/jsbackus |
From: Dima K. <no...@di...> - 2014-01-18 23:20:05
|
jef...@gm... writes: > Hi Dima, > > > On 01/18/2014 05:27 PM, Dima Kogan wrote: >> Hi Jeff. I looked at the (debian) packages, and those libraries are >> linked into more than just the notion executable. There're a few more >> executables (ion-statusd, ion-completefile, etc). So yes, those >> libraries should be shared. Otherwise (with static linking), there's >> no reason to ship the libraries in the package, so static linking >> shouldn't be a huge problem for Fedora. I suspect they strongly oppose >> shipping static-only libraries, which the packages need not contain >> anyway. The resulting duplicated code is less than ideal, but this >> shouldn't be a deal breaker. Am I missing something? dima > > Ack, sorry I should have clarified. This is with regard to a devel > package. The normal notion package doesn't raise any eyebrows, but the > devel package does. I could probably make everything go much more > smoothly by dropping the devel package. I figured a devel package was > necessary in case users wanted to compile 3rd party modules, etc. I > guess I should ask - has this been an issue elsewhere? Ah. It all makes sense now. For some reason the debian -dev package doesn't contain libraries at all; just headers. This could be a mistake. As for shared/dynamic, just making the libraries dynamic won't solve your problem. Libraries with names like "libmainloop" pollute the namespace too much for something that has a very narrow purpose (it's only for notion, not likely to be used by anything else in the system). So what one SHOULD do is to ship the DSOs in /usr/lib/notion, and do some sort of RPATH thing to let their users find these. Debian is OK with RPATHs for this purpose. Fedora like is too. If I were you, I'd punt on libnotion-dev for now, to let upstream handle this more nicely first. dima |
From: Jeff B. <jef...@gm...> - 2014-01-19 13:19:00
|
On 01/18/2014 06:19 PM, Dima Kogan wrote: > Ah. It all makes sense now. For some reason the debian -dev package > doesn't contain libraries at all; just headers. This could be a mistake. Originally I only included the headers. I ran into issues compiling ion-statusd against the -dev package, so I started including the .a files. Compiling anything in the official release tarball against a -dev package is probably not a good use case though. > As for shared/dynamic, just making the libraries dynamic won't solve > your problem. Libraries with names like "libmainloop" pollute the > namespace too much for something that has a very narrow purpose (it's > only for notion, not likely to be used by anything else in the system). > So what one SHOULD do is to ship the DSOs in /usr/lib/notion, and do > some sort of RPATH thing to let their users find these. Debian is OK > with RPATHs for this purpose. Fedora like is too. > > If I were you, I'd punt on libnotion-dev for now, to let upstream handle > this more nicely first. > > dima Yeah, I think punting on the -dev package for the time being is a good idea. Particularly since it is probably a non-issue, at least for the time being. Thanks! Regards, Jeff -- Jeff Backus jef...@gm... http://github.com/jsbackus |