[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Packaging TensorFlow for Debian



On 2021-05-28 02:07 +0100, Wookey wrote:
> The only glaring omission now is that the -debug packages are empty of
> debug symbols, because we are doing the 'opt' build, which optimises
> and throws away all the debug stuff. There is a 'dbg' build, but I
> guess that turns all the optimisation off, which we don't want either.
> I am trying to get it to use -g (keep debug info) instead of -g0
> (create no debug info) and then dh_dwz/debhelper should just DTRT.
> 
> It seems that the 'dbg' build is what we want as that's the same as 'opt' but with '-g'. Perfect. However trying that means that the final link command fails: (undefined reference)

I compared the opt and dbg builds and they use identical linker params files except for one option: the opt build has -Wl,--gc-sections, 'dbg' doesn't. Not clear to me why not having that option would caue undefined references. I suspect it is some extra code being built.

Anyway I worked how to get bazel to override the -g0 by putting a -g
on the compile line too so we finally got a debug build that actually
worked (once I'd generated enough disc and RAM space - it needs a lot).

A debug build needs 37G disc (21G for opt) and about 13G RAM during
dwz (and dwz needs to have the number of slots turned up the defualt
50million is not enough and neither is 100million, so I just turned
off the limit, which does the trick. Big fat C++ app.


> However see below about embedded libs.
> 
> I look I am pretty sure there is a still a range of embedded
> statically-linked libs hiding in there.

It turned out that only highwayhash was actually being downloaded and
used, which meant I had to grok the TF_SYSTEM_LIBS and workspace setup
properly to make it use libhighwayhash-dev.  I think there is a sane
way to configure bazel to use system libs by default, rather than
having to list system libs as exceptions. I'll investigate that
further.  The build still whinges about missing aws-* packages but it
turns out that it's not actually using them (it builds without them),
at least for the C++ and framework lib builds.

I've given the copyright file a good update too as various stuff in
the original version is now gone.  (Interesting, somewaht academic
question about whether .blz and .BUILD files under thirdy_party are
copyright Bazel Authors or TensorFlow Authors or someone else - some
are probably written new by this project, many copied from the
relevant uptream projects. Mostly having to document a pile of
third_party copyright stuff is a PITA I wish we could just avoid (e.g
by repacking to just throw all that unused stuff away). Anyway. I've
left it for now.

So, the initial package is uploading to NEW as I type. It's going to
take a few hours because the dbysym packages are huge and my internet
is mediocre. Estimate currently about 4hours. Then it'll be stuck in
NEW for some time. 

Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/

Attachment: signature.asc
Description: PGP signature


Reply to: