/srv/irclogs.ubuntu.com/2008/01/19/#ubuntu-classroom.txt

=== \sh is now known as \sh_away
=== bigon is now known as bigon`
=== Pricey is now known as PriceChild
=== BaD-Laptop is now known as BaD-AcerLaptop
=== \sh_away is now known as \sh
coolcatloot,are u there08:34
=== coolcat is now known as Rhi_evil_happy
=== coolcat is now known as Rhi_evil_happ1
sistpotyhi everyone09:02
sistpotyanyone around for the library packaging session? (repetition of the session from Thursday)?09:03
Rhi_evil_happ1hello09:05
RainCTHi09:05
Rhi_evil_happ1hi09:05
sistpotyhi09:05
sistpotyyou want to hear the library packaging session?09:06
TheMusosistpoty: if there is a log from the other one, I am happy to read that, but if this is going ahead in here, I wil idle.09:07
sistpotyTheMuso: there is a log available, let me look09:07
TheMusosistpoty: Thanks.09:07
sistpotyTheMuso: http://irclogs.ubuntu.com/2008/01/17/%23ubuntu-classroom.html09:08
Rhi_evil_happ1*looks happy*09:08
TheMusosistpoty: Thanks a lot.09:08
sistpotyTheMuso: and yesterday was part two: http://irclogs.ubuntu.com/2008/01/18/%23ubuntu-classroom.html09:09
TheMusoright09:09
sistpotyok, then let's get started, shall we?09:09
TheMusoBookmarked09:10
sistpotythis session is made up of two parts09:10
sistpotyin part 1, you'll get to know everything about shared objects09:11
sistpotyin part 2, we'll package up a sample library and discuss some packaging issues09:11
sistpotylet's start with part 109:11
sistpotyfirst off, shared objects are useful for two purposes09:11
sistpoty1) they can be used as a mechanism for plugins with dlopen09:11
sistpoty2) to share code between different projects (a library)09:12
sistpotywe'll deal with 2) in this session :)09:12
sistpotyoh, btw.: if there are any questions just ask them right away09:12
sistpotya (ELF) shared object is a collection of symbols in different section together with some meta information09:13
sistpotya symbol denotes any named entity in C (functions, variables)09:13
sistpotylet's get an example and see what it will result in09:13
sistpoty<http://www.potyra.de/library_packaging/example.c>09:14
sistpotythe section a symbol is gives details about it (e.g. it can be executed, it's read only...)09:14
sistpotyeveryone got the example?09:15
ranfyes09:15
sistpotyso let's compile it:09:16
sistpotygcc -c example.c -o example.o09:16
sistpotythis will just result in an ordinary object (not a shared one, we'll look at this in a moment)09:16
sistpotylet's take a look at the symbols in there09:16
sistpotywe can use  readelf, nm or objdump for it09:17
sistpotylet's start with09:17
sistpotynm example.o09:17
sistpotythe rightmost column is the name of the symbol... let's compare it with what's in the c-file09:17
sistpotyhttp://paste.ubuntu.com/3667/09:18
sistpotyfor example, the global_function from line 26 will turn into the symbol with the same name09:19
sistpoty000000000000006b T global_function09:19
sistpotyanything odd you can find of the symbol output?09:19
RainCTif I get less zeros at start that's because I've a different arch or what? :P09:19
sistpotyRainCT: most probably *g*09:20
persiaI get "static_local_var.2268" rather than static_local_var09:20
sistpotypersia: excellent09:20
sistpotyfirst off the static_local_var comes from line 1509:21
sistpotyas you cannot have two symbols with the same name in one object09:21
sistpotystatic local variables need to have their name mangled09:21
persiaIs that just by policy, rather than by checking to see if there would be a conflict?09:22
sistpotybecause you can define a static local variable with the same name in two different functions09:22
sistpotypersia: not too sure if you could produce (somehow) an object with two equally named symbols09:22
sistpotythe linker wouldn't allow this, but maybe it could be circumvented09:23
sistpotyhowever the second symbol would never get looked at09:23
persiasistpoty: Sorry to not be clear: I just don't see two different static_local_var, so wondered if the compiler just added index codes, rather than doing any conflict check.09:23
sistpoty(you can link two objects with equally named symbols together, but then the second one is discarded)09:23
sistpotypersia: the conflict check is getting done by the linker09:24
persiaOK.  So the compiler mangles by policy to avoid conflict issues at link-time?09:25
sistpotypersia: and I guess that the compiler will just add the index for every static local09:25
sistpotyI believe so09:25
persiaThanks for the details :)09:25
sistpotyat least that's what I'd do as a compiler... because I already new that's a static local, so just add an index and not needing to check for collisions afterwards :)09:26
sistpotyok, anything else that's odd with the nm output compared to the c-file?09:26
sistpoty(line 10 *cough*)09:26
sistpotyin line 10, we've got a variable local_var, which won't result in any symbol09:27
sistpotythe reason for this is, that it's locally to the function and will get allocated on the stack09:27
sistpotyhence there's no need to allocate space for it in the object09:27
sistpotynow let's make a shared object from the example09:28
persiaWas it not optimised away by the compiler?  It's only used once.09:28
sistpotypersia: not without -O(something)09:28
persiaAh.  Right.09:28
sistpotygcc -Wl,-z,defs -Wl,-soname,libexample.so.1 -fPIC -shared example.c -o libexample.so09:29
sistpotythe -Wl,something are options gcc will pass to the linker09:29
sistpotythe first one is only for sanity (allow no unresolvable symbols)09:30
sistpotyand the second one defines the soname (we'll come to this bit later on)09:30
sistpoty-fPIC will result in position independent code, but I won't go into details here09:30
sistpotyand -shared tells gcc to produce a shared object09:30
sistpotylet's strip the object09:30
sistpotystrip libexample.so09:31
sistpotytake a look at it again09:31
sistpotynm libexample.so09:31
sistpotyat first sight, there don't seem to be any symbol information stored in there09:32
sistpotylet's try again09:32
sistpotynm -D libexample.so09:32
sistpotythis will display dynamic symbols09:32
sistpotynow compare the output to the one from example.o09:33
sistpotyat first, there are a number of symbols starting with an underscore... these are (compiler) internals, so we'll ignore these09:34
sistpotylet's take a look at the letters before the symbol name09:34
sistpotyas you can see, there are only capital letters left in the shared object09:34
sistpotythe capital letter means, that the symbol is a global symbol09:35
sistpotyi.e. other object files linked against it can see it09:35
sistpotyif it's lower case, it's only visible inside that particular object09:35
sistpoty(and hence you can link two objects with symbols that have the same name but are only locally visible together w.o. problems)09:36
sistpotyas the symbols in shared objects are meant to be used by different programs/libraries, we're only interested in global symbols09:37
sistpotylet's take a look at the letters in more details09:37
sistpotythe letters describe in what section the symbol lives in09:37
sistpotyt -> text section (may be mapped readonly), executable09:37
sistpotyd -> initialized data (statics, initialized globals)09:37
sistpotyc -> uninitialized data (uninitialized globals)09:37
sistpotyr -> read only data (const variables), not necessarily read only though.09:38
sistpotyand then there is a special one: u09:38
sistpotyu means it's undefined in this object, and comes from another object09:38
sistpotysymbols that example.c use (for example stderr) but that are not declared in there, will get the U09:39
sistpotyif you have a binary, that has undefined symbols, these will get resolved by the loader, as soon as the program is executed09:40
sistpotyany questions so far?09:40
ranfWhat is B?09:40
sistpotyranf: b is uninitialized data09:41
sistpotyranf: so the global extern_var will live there (the initial value is not getting set)09:42
sistpotybtw.: you can always look at the manpage of nm to find out about the different letters09:42
sistpotyok, let's take a look at the meta-information09:42
sistpotyobjdump -x libexample.so09:43
sistpotythe interesting parts here are09:43
sistpotyNEEDED entries09:43
sistpotyand SONAME09:43
sistpotyif you prefer less output, you can also look at these with09:43
sistpotyobjdump -p libexample.so09:43
sistpotythe NEEDED entry refer to the SONAME entry of shared objects, that this shared object directly needs09:44
sistpotyi.e. all undefined symbols in libexample.so will get resolved to the shared object where these are defined09:45
sistpotyand each shared object where such a symbol comes from is listed as NEEDED09:45
sistpotylet's compare this with09:46
sistpotyldd libexample.so09:46
sistpotyldd will basically do the same thing, that the loader would do09:46
persiaHow was libexample.so.1 determined?  I usually see some sort of definition in upstream build systems.09:46
sistpotypersia: it should match the soname09:47
sistpotyerr, sorry the resulting shared object should match the soname by some rules09:48
sistpotyhere it was just what we gave to gcc, w.o. any big thoughts how to call it09:48
persiasistpoty: Right.  objdump -x or -p reports "SONAME      libexample.so.1"  I just don't understand where the "1" comes from.09:48
persiaAh.  Right.  The compilation command.  Sorry.09:48
sistpotypersia: that's exactly what we gave to gcc: -Wl,-soname,<thatnameisthesoname>09:49
sistpotyif you look at the output of ldd, you can see that09:49
sistpoty1) it resolves the needed entries to path names of the shared objects in question09:50
sistpotyand 2) that there are more entries, not listed in needed09:50
sistpotythat's because ldd will do lookups recursively09:50
sistpotyso it will first find libc.so.6 and look at what's needed by that one as well09:51
sistpotyand list all of these09:51
sistpotylet's rather look at a real world example to spot the difference09:51
sistpotyldd /usr/lib/libgnome-2.so.009:51
sistpotycompared to09:51
sistpotyobjdump -p /usr/lib/libgnome-2.so.0 | grep NEEDED09:52
sistpotyany questions so far?09:53
sistpotyok, now let's also compare09:53
sistpotynm -D /usr/lib/libgnome-2.so.009:54
sistpotyto09:54
sistpotyreadelf -s /usr/lib/libgnome-2.so.009:54
* RainCT has to go and will check the log when he's back09:54
sistpoty(or you can also compare libmyexample.so)09:54
sistpotycya RainCT09:54
sistpotyspot any difference?09:55
sistpotyif you use readelf -s, you'll see that some symbols have an @ in their name09:56
sistpotythese are versioned symbols09:56
sistpotynm will happily not print out that info09:56
sistpotyso when looking at shared objects for library packaging, you should prefer readelf -s to nm -D09:57
sistpotyobjdump -T libmyexample.so will also display information about versioned symbols09:57
sistpotywhen we have a library, we're interested to have a stable ABI09:58
sistpotya stable ABI means that there won't get any symbols removed, and that the symbols mean the same thing09:59
sistpotyin contrast a stable API means that we can compile a program with one version of the library and can compile it again with another version09:59
sistpotyw.o. changing the code of the program09:59
sistpotylet's try s.th. out10:00
sistpotyhttp://www.potyra.de/library_packaging/libmyhello-1.0.1.tar.gz10:00
sistpotythis is a very simple example library10:01
sistpotyextract it, and compile it with10:01
sistpotymake10:01
sistpotyplease also install it (as root) with10:01
sistpotymake install10:01
sistpotyno worries, it will only install under /usr/local, and comes with make uninstall as well to remove the craft10:01
sistpotyno we'll need a program that uses this library as well10:02
sistpotynow10:02
sistpotyget http://www.potyra.de/library_packaging/hello_prog-1.0.tar.gz10:02
sistpotyextract it to a different directory and compile it10:02
sistpotyeveryone got that so far?10:03
sistpotyoh, be sure to run ldconfig after installing the library package, I always forget this10:04
sistpotyeveryone got a program called hello_prog now?10:04
sistpotyanyone still following? *g*10:05
* persia has a working hello program (after running ldconfig)10:05
sistpotygreat :)10:05
sistpotynow for a test, let's uninstall the library again10:06
sistpotymake uninstall (as root10:06
sistpoty+)10:06
sistpotylet's try to execute hello_prog again10:06
sistpotyit won't work, because the shared object is gone for good10:07
sistpotyif you try ldd hello_prog, you'll see that it cannot resolve libmyhello.so.110:07
sistpotyluckily, upstream has made a new library package, let's try that hot new stuff10:07
sistpotyhttp://www.potyra.de/library_packaging/libmyhello-1.0.2.tar.gz10:08
sistpotysame procedure as with the old libmyhello: compile, install, run ldconfig10:08
* persia complains upstream shouldn't distribute compiled binaries in the tarball10:09
sistpotyhm? does upstream do that?10:09
persiasistpoty: Maybe it's just my upstream checking scripts :(10:10
sistpotypersia: probably (or my make dist is wrong)10:10
sistpotyok, let's retry to run hello_prog10:10
sistpotyat this point the loader cannot resolve a symbol, and will barf out10:11
sistpotylet's take a look: readelf -s hello_prog10:11
sistpoty(first run strip, to get rid of the local symbols)10:12
sistpotystrip hello_prog10:12
sistpotyreadelf -s hello_prog10:12
sistpotyyou can see, that it wants print_hello10:12
sistpotylet's take a look at what the new library provides10:12
sistpotystrip the library (to get rid of the local symbols)10:13
sistpotyand10:13
sistpotyreadelf -s libmyhello.so10:13
sistpotythere is a function hello, but no function print_hello10:14
sistpotycompare that to what's in the old libmyhello.so10:14
sistpotyso upstream obviously removed print_hello and inserted hello10:14
sistpotythis means, that the change is not ABI compatible (and also not API compatible, because you cannot compile hello_prog against the new versoin)10:15
sistpotyso obviously if a symbol gets removed, it means that the ABI breaks10:15
sistpotylet's come back to the SONAME10:15
sistpotyhaving the same SONAME means that the ABI is compatible10:15
sistpotyso you can exchange any library with the same SONAME and the program should still work10:16
sistpotyif a library isn't ABI compatible any longer, the SONAME must get changed to indicate this10:16
sistpotyif the SONAME gets changed, so does the names of the library10:17
sistpotyso you can have two versions of one library installed, that have a different SONAME10:17
sistpotyany questions so far?10:17
sistpotyso let's get back to the ABI again...10:18
sistpotyhaving the same symbols (or only new symbols) in a newer version is only part of the ABI definition10:18
persiaIs the dual-installation not affected by the symlinks?10:19
sistpotypersia: no10:19
sistpotymaybe I should go into details about the symlinks10:19
sistpotyfor one, we have the shared object itself: libmyhello.so.1.0.210:20
persiaI'd like to know more, but perhaps in section 2 about packaging.  It seems to me the symlink points to the most recently installed, which is non-deteministic.10:20
sistpotywell, I'll  just explain that now ;)10:20
sistpotythe first symlink is libmyhello.so.110:21
sistpotythis one is actually always the SONAME mangled to some rules10:21
sistpotyerr.. it *is* the SONAME10:22
sistpotysorry10:22
sistpotyif this symlink isn't there, ldconfig would create it10:22
sistpotyall binaries, that want a specific shared library are resolved by this symlink10:23
sistpotybecause that's what's in the NEEDED entry of the binary10:23
sistpotythe loader will do that for us, and (looking at ldd output) will also follow that symlink to the "real" shared object10:23
sistpotythe other symlink is libmyhello.so10:24
sistpotythis symlink is there, if you want to link a binary against the shared object10:24
sistpotygcc -lmyhello10:24
sistpoty-l<name> will get transformed to lib<name>.so10:25
sistpotyand that's what the linker will search for10:25
persiaAh.  That explains why the bare symlink is usually in the -dev package.  Thanks.10:25
sistpotyso you'll only need this symlink when compiling/linking s.th. against a shared object10:25
sistpotyexactly10:25
sistpotyany binaries won't need/see it. and that's the only file with the same name10:26
sistpotyok, let's get back to the ABI10:26
sistpotythe ABI also means that the symbols still mean the same thing10:27
sistpotywhile finding out, if any symbols got removed should be an easy task now, this gets a little bit trickier10:27
Rhi_evil_happ1hi10:27
sistpotythe meaning of the symbol is 1) is it a function/variable/what section is it in10:27
sistpotyhi Rhi_evil_happ110:27
=== Rhi_evil_happ1 is now known as Rhi_evil_happy
sistpotybut also for functions, what signature (number of arguments, type of arguments) need to get passed10:28
Rhi_evil_happyhi again10:28
sistpotyif you change the signature of a function of a library, this means that a program linked against it wouldn't agree with the library any longer, about the data that it passes10:29
sistpotyone way to look at signatures is via the debug information10:29
sistpotyso (in case you stripped the library), recompile it again w.o. stripping it (make clean && make)10:30
sistpotyfor debug information, gdb is our tool of choice10:30
sistpotygdb libmyhello.so10:30
sistpotyyou can look at the function definitions with10:31
sistpotyinfo functions10:31
sistpotyvoid hello(void);10:31
Rhi_evil_happy?10:31
sistpotyRhi_evil_happy: maybe you want to read backlog?10:31
persiaJust to confirm. this would provide useful information if the function weren't void, right?10:32
sistpotypersia: yes10:32
persias/useful/visibly useful/10:32
sistpotyfeel free to modify the functions to your liking and experiment ;)10:32
sistpotyfor variables it's10:32
sistpotyinfo variables10:32
sistpoty(however there is no direct variable defined in there)10:32
sistpotyinteresting enough stdin/stdout show up there... I guess that's because these are declared in a header and will get debug symbols in the library...10:33
sistpotyso to be sure, you'd need to filter out any info from there that's not marked as a symbol10:34
sistpotyor rather that's not defined in a symbol (nm -D/readelf -s/objdump -T)10:34
sistpotynow, let's strip the library again and see what info gdb will spit out10:34
sistpotystirp libmyhello.so10:35
sistpotygdb libmyhello.so10:35
sistpotyinfo functions10:35
sistpotys/stirp/strip/10:35
sistpotynow, the info is gone... since all binaries/shared objects are stripped, this cannot get applied to a package in the archive10:36
sistpotyor at least you'd need the -dbgsym package for it10:36
sistpotyluckily there exists one tool, that may help there: icheck10:36
sistpotyafaik, you can use it to create a manifest file with symbols (and their) meaning of a package10:37
sistpotyI haven't tried it out myself yet though10:37
sistpoty(package icheck)10:37
sistpotythere also exists check_symbols in the ubuntu-devscripts package, however we found out that it currently uses nm -D10:38
sistpotyand thus won't know anything about versioned symbol dependencies10:38
sistpoty-> better avoid it until its fixed10:38
sistpotyany questions so far?10:38
sistpotyok, small side note: c++ libraries10:39
sistpotysince you can overload method in c++, (give two functions the same name but different signatures),10:40
sistpotythese cannot get stored with the name as symbol name10:40
sistpotybecause you'd end up with two symbols with the same name10:40
sistpotyhence there is some name mangling done by g++, that encodes the signature in the symbol name itself10:41
sistpotylet's take an example10:41
sistpotynm -D /usr/lib/libstdc++.so.6 | less10:41
sistpoty(there are lot's of symbols with funny names in there)10:42
sistpotyyou can get some human readable output of this with the -C option of nm10:42
sistpotynm -C -D /usr/lib/libstdc++.so.6 | less10:42
sistpotyor c++filt10:43
sistpotya nice side effect of this is, that a change of the signature will result in a differently named symbol10:43
sistpotyand hence in a removed symbol, which you can easily detect looking only at symbols10:44
sistpotyanother side note:10:44
persiaIs this use of guard symbols why C++ gets so hopelessly confused with insufficiently explicit casts to objects passed to overloaded functions?10:44
sistpotywhat do you mean with guard symbols?10:45
sistpotyhowever it gets confused due to overload resolution10:45
sistpotythat means the compile needs to find out which method to call10:45
persiaThe output of `nm -CD /usr/lib/libstdc++.so.6 | less` reported "guard ..." in place of _ZZZ09u592.  My terminology error.10:46
sistpotyI'm not too sure what the guard thingy means10:46
sistpotyhowever if the type for an argument exactly matches, this method is chosen by the compiler (i.e. uint64_t as parameter, uint64_t as argument)10:47
sistpotyif an implicit typecast is involved (e.g. uint32_t as parameter, uint64_t as argument), this is considered a worse case10:48
persiaThanks.  Somewhat unrelated then :)10:48
sistpotyiirc, only the number of typecasts involved is getting counted, and the method is chosen for this10:48
sistpotypersia: maybe it's also about NULL as argument (which's type can be any pointer type) ;)10:49
sistpotyso void do_stuff(X *arg); and void do_stuff(Y *arg); would be ambiguous when called as do_stuff(NULL);10:49
sistpotybut let's get back to shared objects10:50
persiasistpoty: I've only encountered it when porting applications to updated libraries.  Likely off-topic :)10:50
sistpotypersia: heh, I encountered it yesterday at work, coding c++ *g*10:50
sistpotyok, so the SONAME means to be ABI compatible10:51
sistpotyand by definition, if we only add new features to a library, we don't need to change the SONAME10:51
sistpotythis leaves one small problem: what if we've added cool new features not breaking the ABI10:51
sistpotyand a program makes use of these new features10:52
sistpotysomeone could still have the old library installed and install the program10:52
sistpotythen this program wouldn't work any longer, because it needs symbols not yet defined in thre10:52
sistpotythere10:52
sistpotyon the basis of the SONAME, there is no solution to this10:52
sistpotyhistorically on unix systems, this was handled by the minor version of a shared library as slangasek told me10:53
sistpotyhowever this of course won't work if you move binaries from one system to another (and that's what packaging is about)10:53
sistpotywe'll see the solution to this in part 210:54
sistpotyok, any questions left?10:54
sistpotyif there are none, I'm through with part 1 :)10:55
persiaIf the minor number is no longer used to track symbol introduction, what is it used to indicate?10:55
sistpotyheh, no idea actually10:55
sistpotymaybe it's still used for this10:56
persiaIs it just meaningless on linux/glibc systems then?10:56
sistpotyyes10:56
sistpotyi.e. I'm not sure if it's meaningless, but debian/ubuntu systems could live w.o. it ;)(10:56
persiaActually, only the runtime loader matters.  If this doesn't use it, it is meaningless, even if there is historic semantic value.10:57
sistpotyright10:58
sistpotyhow about a short break before starting part 2?10:58
sistpotyok, I'm just making a short coffee break then :)11:00
sistpotyre11:14
sistpotyanyone around for part 2 of the library packaging session?11:15
sistpotypersia: interested in part 2?11:16
sistpoty(if not, I'll just point to the logs... less work for me then *g*)11:16
persiaSure.11:17
* persia reviews the logs again anyway, to forestall some questions11:18
sistpotypersia: if you're the only one interested, I guess I don't need to go through packaging by example and just skip ahead to questions, ok?11:18
persiasistpoty: OK.  Hold on a bit while I catch up then :)11:19
sistpotysure, just ping me once you're through ;)11:19
persiasistpoty: question time :)11:21
sistpoty:)11:21
persiaFirst, are there any objective criteria about pushing a transition vs. oldlibs support?  Is this just a matter of how much effort the transition is, and based on what is expected to make the release?11:22
sistpotyhm... I can only say what slangasek wrote yesterday, that it's /usually/ better to transition11:23
sistpotyI guess one example would be the libdb* stuff, which is an exception11:23
sistpotybecause it's a database library and the database format changed iirc, so it's very hard to transition this one11:23
sistpotyand would result in a very unsmooth upgrade path11:24
sistpotyor you'll also like to not get rid of libc* too soon, as many binary only applications still use the old one11:24
persiaMakes sense.  libdb seems a prominent exception, and we've been having fun with WX since feisty.  I'm guessing that it depends on 1) if upstreams are paying attention, 2) bad upgrade paths, 3) truly significant porting effort (that won't complete in several months), and similar release-affecting issues.11:24
sistpotysounds sane, yes11:25
persiaNext: do you understand the controversy over binary packages named libfoo1 vs. libfoo1.0.3?  If so, why one over the other (or do you have a pointer to a previous debate)?11:26
sistpotyhm...11:27
sistpotyto my understanding, the binary package name should have a unique name in comparison to the soname11:28
sistpotyso libfoo1 would be useful for libfoo.so.111:28
sistpotywhile libfoo1.0.3 would be useful for libfoo-1.0.3 (soname)11:28
persiaHmm.  That would make more sense if the minor version weren't considered meaningless :(11:29
sistpotywell, the minor version isn't part of the SONAME, otherwise it's no minor version ;)11:29
persiaDoes maybe the versioned symbols features allow parallel installation of libfoo-1.0.3 and libfoo-1.0.4?11:29
sistpotyno, the only warranty for parallel installation is a different SONAME afaik11:30
* persia looks at libmyhello Makefiles again11:30
sistpotyversioned symbol come in at a different place11:31
sistpotylet's say, you have libA and libB, which both depend on libC11:31
persiaAh.  So libfoo1.0.3 would provide libfoo1.0.3.so.(whatever), rather than libfoo1.so.1.0.3 ?11:31
sistpotypersia: exactly11:31
sistpotybtw.: the library packging guide has nice examples for this11:32
persiasistpoty: re: versioned symbols.  Right.  Poor terminology again (and more interesting for package D depending on libA and libB).11:32
sistpotyright11:32
sistpotyif you now change libA to require a newer, incompatible version of libC11:33
sistpotyD will draw in multiple versions of libC11:33
persiaNext question: if an upstream tarball produces 17 libraries, why would one choose e.g. 5 (10) binary packages, rather than 17 (34)?11:33
sistpotygood question... the only rationale is if these come from the same source and one ABI incompatibility of one shared object will *always* result in ABI incompatibilities of the other shared objects11:34
sistpotyif you know that this is the case, you can collapse these into one library package (because you'll never end up with only one SONAME getting bumped)11:35
persiaSo if there is a stack of binary libraries generated by the same source, and the core library (upon which the others depend) is generally updated for each release, and applications usually use several of the client libraries, one package might be correct, but upstream should be hit with a stick?11:35
sistpotywell... kind of11:37
sistpotyit might be correct though... let me think of an example11:37
persiakdelibs is perhaps an interesting example11:37
sistpotyif the core library defines some interface types, that are used in the client libraries11:37
sistpotyyou'll automatically get ABI incompatibilities if the core library changes11:38
persiaErr..  No.  That generates lots of binaries.11:38
sistpotybecaues the signatures will differ11:38
sistpotyhm... not too sure about kdelibs *g*11:39
persiaWon't that generally be taken care of by the simultaneous recompile of the single source, regardless of how many binary packages are involved?11:39
sistpotyyes, it will11:40
persiaOK.  I'll put the package split question back on the stack of things to have an opinion about rather than things with an answer then :)11:41
persiaNext question, which may be off-topic:11:41
sistpotyhowever if you put (independent) shared objects into a single binary, it means that every program depending on any to rebuild as well11:41
sistpotyso a good rationale would also be if it's possible to use only one single shared object or if you definitely want all of these11:41
persiasistpoty: Ah.  Right.  Splitting the binaries and being careful about versioning would decrease the amount of NBS work if clients typically used subsets of the set of libraries exported by the source.  Thanks.11:42
sistpotyand unmet dependencies11:43
persiaWhen packaging an application that has internal libraries that are tightly linked to the application itself (and not expected to be used externally (e.g. btanks)), is there a point to exporting the library, or would just putting it in the /usr/lib/ hierarchy (for ldconfig) be sufficient?11:44
persia(I consider library related unmet deps to be unfinished NBS, but that's just nomenclature)11:44
sistpotyblatantly: if it comes with headers and you can compile s.th. against the the library in question, it should be packaged as a library11:45
sistpotyotherwise (e.g. headers alone not sufficient to build against), somewhere under /usr/lib/??? sounds sane11:45
persiaOK.  So headers are the useful defining characteristic.  I'll be reusing that argument next time I am trying to defend a package split.11:46
sistpotykind of... usually if you have a shared object only for internal use, there is no much sense for the shared object in the first place ;)11:46
sistpoty(why not link statically then)11:46
sistpotyof course apart from plugins... which is a different use case11:47
persiaArgument there would be minimal deviation from upstream build system.11:47
sistpotysure, but of course you can ask upstream why they build a shared object *g*11:47
sistpotyto put it in other words: if upstream is sane and builds a shared object, use library packaging style :)11:48
persiasistpoty: Thanks a lot for running another session at this time of day (and answering all my questions).  I've packaged a couple libraries before, but have been working out issues empirically, rather than really understanding them.  Your lecture and the session logs have been very helpful in rectifying this.11:49
sistpotypersia: you're welcome11:50
sistpotythanks for listening11:50
sistpotyand now a small secret: I don't maintain any library myself (though I've packaged one once)11:50
sistpotyso my big thank goes to slangasek again, who helped to prepare the initial session :)11:50
persiasistpoty: Would you like to?  I don't use any libjsw clients anymore, and someone should probably be watching to see when it breaks :)11:51
sistpotypersia: if I only had the time to ... *g*11:52
persiasistpoty: No worries.  Darren hasn't updated it in a couple years, and it may well disappear soon :)11:52
sistpotyhehe11:52
james_wthanks again sistpoty11:56
sistpotyjames_w: and big thanks for organizing the sessions!11:56
Rhi_evil_happyyo13:15
=== bigon` is now known as bigon
=== bigon is now known as bigon`
=== bigon` is now known as bigon
=== bigon is now known as bigon`
tenshuhi all17:11
tenshuthe last classroom session lof is 40417:12
tenshuanyone could rehost it?17:12
=== bigon` is now known as bigon
=== bigon is now known as bigon`
=== _stefan_ is now known as sistpoty
ToyKeepertenshu: http://toykeeper.net/tmp/ubuntu-classroom.log21:48
ToyKeeper(more than just the last session, but you can ignore the previous bits)21:49
tenshuthx ToyKeeper22:29
=== \sh is now known as \sh_away
=== \sh_away is now known as \sh

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!