B lint R czey: Think you can t interpose static binaries with LD_PRELOAD? Think again!
Well, you are right, you can t. At least not directly. This is well documented in many projects relying on interposing binaries, like faketime.
$ faketime '2008-12-24 08:15:42' qemu-x86_64 ./test_static_clock_gettime
2008-12-24 08:15:42.725404654
$ file test_static_clock_gettime
test_clock_gettime: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, ...
With this in place, Firebuild can finally wrap even those secretive statically linked tools. QEMU runs them, libc catches their syscalls, LD_PRELOAD injects libfirebuild.so, and from there the usual interposition magic happens. The result: previously uncachable build steps can now be traced, cached, and shortcut just like their dynamic friends.
There is one more problem though. Why would the static binaries deep in the build be run by QEMU? Firebuild also intercepts the exec() calls and now it rewrites them on the fly whenever the executed binary would be statically linked!
$ firebuild -d comm bash -c ./test_static
...
FIREBUILD: fd 9.1: ( ExecedProcess 161077.1, running, "bash -c ./test_static", fds=[0: FileFD ofd= FileO
FD #0 type=FD_PIPE_IN r cloexec=false , 1: FileFD ofd= FileOFD #3 type=FD_PIPE_OUT w Pipe #0 close_o
n_popen=false cloexec=false , 2: FileFD ofd= FileOFD #4 type=FD_PIPE_OUT w Pipe #1 close_on_popen=fal
se cloexec=false , 3: FileFD NULL /* times 2 */] )
"[FBBCOMM_TAG]": "exec",
"file": "test_static",
"// fd": null,
"// dirfd": null,
"arg": [
"./test_static"
],
"env": [
"SHELL=/bin/bash",
...
"FB_SOCKET=/tmp/firebuild.cpMn75/socket",
"_=./test_static"
],
"with_p": false,
"// path": null,
"utime_u": 0,
"stime_u": 1017
FIREBUILD: -> proc_ic_msg() (message_processor.cc:782) proc= ExecedProcess 161077.1, running, "bash -c
./test_static", fds=[0: FileFD ofd= FileOFD #0 type=FD_PIPE_IN r cloexec=false , 1: FileFD ofd= FileOF
D #3 type=FD_PIPE_OUT w Pipe #0 close_on_popen=false cloexec=false , 2: FileFD ofd= FileOFD #4 type=F
D_PIPE_OUT w Pipe #1 close_on_popen=false cloexec=false , 3: FileFD NULL /* times 2 */] , fd_conn=9.
1, tag=exec, ack_num=0
FIREBUILD: -> send_fbb() (utils.cc:292) conn=9.1, ack_num=0 fd_count=0
Sending message with ancillary fds []:
"[FBBCOMM_TAG]": "rewritten_args",
"arg": [
"/usr/bin/qemu-user-interposable",
"-libc-syscalls",
"./test_static"
],
"path": "/usr/bin/qemu-user-interposable"
...
FIREBUILD: -> accept_ic_conn() (firebuild.cc:139) listener=6
...
FIREBUILD: fd 9.2: ( Process NULL )
"[FBBCOMM_TAG]": "scproc_query",
"pid": 161077,
"ppid": 161073,
"cwd": "/home/rbalint/projects/firebuild/test",
"arg": [
"/usr/bin/qemu-user-interposable",
"-libc-syscalls",
"./test_static"
],
"env_var": [
"CCACHE_DISABLE=1",
...
"SHELL=/bin/bash",
"SHLVL=0",
"_=./test_static"
],
"umask": "0002",
"jobserver_fds": [],
"// jobserver_fifo": null,
"executable": "/usr/bin/qemu-user-interposable",
"// executed_path": null,
"// original_executed_path": null,
"libs": [
"/lib/x86_64-linux-gnu/libatomic.so.1",
"/lib/x86_64-linux-gnu/libc.so.6",
"/lib/x86_64-linux-gnu/libglib-2.0.so.0",
"/lib/x86_64-linux-gnu/libm.so.6",
"/lib/x86_64-linux-gnu/libpcre2-8.so.0",
"/lib64/ld-linux-x86-64.so.2"
],
"version": "0.8.5.1"
The QEMU patch is forwarded to qemu-devel. If it lands, anyone using QEMU user-mode emulation could benefit not just Firebuild.
For Firebuild users, though, the impact is immediate. Toolchains that mix dynamic and static helpers? Cross-builds that pull in odd little statically linked utilities? Previously invisible steps in your builds? All now fair game for caching.
Firebuild 0.8.5 ships this new capability out of the box. Just update, make sure you re using a patched QEMU, and enjoy the feeling of watching even static binaries fall neatly into place in your cached build graph. Ubuntu users can get the prebuilt patched QEMU packages from the Firebuild PPA already.
Static binaries, welcome to the party!
After cartridge pleating and honeycombing, I was still somewhat in the
mood for that kind of fabric manipulation, and directing my internet
searches in that vague direction, and I stumbled on this:
With the pieces being rectangles the width of the fabric, I was able to
have at least one side of selvedge on all seams, and took advantage of it
by finishing the seams by simply folding the allowances to one sides so
that the selvedge was on top, and hemstitching them down as I would have
done with a folded edge when felling.
Also, at first I wanted to make the smocking in white on white, but then
I thought about a few hanks of electric blue floss I had in my stash,
and decided to just go with it.
The initial seams were quickly made, then I started the smocking at the
neck, and at that time the project went on hold while I got ready to go
to DebConf. Then I came back and took some time to get back into a
sewing mood, but finally the smocking on the next was finished, and I
could go on with the main sewing, which, as I expected, went decently
fast for a handsewing project.
While doing the diagonal smocking on the collar I counted the stitches
to make each side the same length, which didn t completely work because
the gathers weren t that regular to start with, and started each line
from the two front opening going towards the center back, leaving a
triangle with a different size right in the middle. I think overall it
worked well enough.
Then there were a few more interruptions, but at last it was ready! just
as the weather turned cold-ish and puffy shirts were no longer in
season, but it will be there for me next spring.
I did manage to wear it a few times and I have to say that the neck
shaping is quite comfortable indeed: it doesn t pull in odd ways like
the classical historically accurate pirate shirt sometimes does, and the
heavy gathering at the neck makes it feel padded and soft.
I m not as happy with the cuffs: the way I did them with just
honeycombing means that they don t need a closure, and after washing and
a bit of steaming they lie nicely, but then they tend to relax in a
wider shape. The next time I think I ll leave a slit in the sleeves,
possibly make a different type of smocking (depending on whether I have
enough fabric) and then line them like the neck so that they are stable.
Because, yes, I think that there will be another time: I have a few more
project before that, and I want to spend maybe another year working from
my stash, but then I think I ll buy some soft linen and make at least
another one, maybe with white-on-white smocking so that it will be
easier to match with different garments.
A side project I have been working on a little since last winter and
which explores extending
If you're still using Vagrant (I am) and try to boot a box that uses UEFI (like
Many people that were once enthusiast Twitter users have dropped as a
direct or indirect effect of its ownership change and the following policy
changes. Given
It's been a while since the last
For quite some time, I have been thinking about trying a bit of
patchwork, and English Paper Piecing looked like a technique suited to
my tastes, with the handsewing involved and the fact of having a paper
pattern of sort and everything.
The problem is, most of the scraps of fabric I get from my sewing aren t
really suitable for quilting, with a lot of them being either too black
and too thick or too white and too thin.
On the other hand, my partner wears polo shirts at work, and while I
try to mend the holes that form, after a while the edges get worn, and
they just are no longer suitable for the office, even with some creative
mending, and they get downgraded to home wear. But then more office
shirts need to be bought, and the home ones accumulate, and there is
only so much room for polo shirts in the house, and the worst ones end
up in my creative reuse pile.
Some parts are worn out and they will end up as cabbage stuffing for
things, but some are still in decent enough conditions and could be used
as fabric.
But surely, for English Paper Piecing you d need woven fabric, not knit,
even if it s the dense piqu used in polo shirts, right? Especially if
it s your first attempt at the technique, right?
Well, probably it wouldn t work with complex shapes, but what about some
5-ish cm tall Standard Compliant bestagon? So I printed out some
hexagons on thick paper, printed some bigger hexagons with sewing
allowance as a cutting aid, found two shirts in the least me colours I
could find (and one in grey because it was the best match for the other
two) and decided to sacrifice them for the experiment.
And as long as the paper was still in the pieces, the work went nicely,
so I persevered while trying to postpone the Moment of Truth.
After a while I measured things out and saw that I could squeeze a 6.5
7 hexagon pattern into something resembling a square that was a multiple
of the 2.5 cm square on the back of my Piecepack tiles, and decided to
go for another Standard for the back (because of course I wasn t going
to buy new fabric for lining the work).
I kept the paper in the pieces until both sides were ready, and used it
to sew them right sides together, leaving the usual opening in the
middle of one side.
Then I pressed, removed the paper, turned everything inside out, pressed
again and. It worked!
The hexagons look like hexagons, the squares look like squares, the
whole thing feels soft and drapey, but structurally sound. And it s a
bit lumpy, but not enough to cause issues when using it as a soft
surface to put over a noisy wooden table to throw dice on.
I considered adding some lightweight batting in the middle, but there
was really no need for it, and wondered about how to quilt the piece in
a way that worked with the patterns on the two sides, but for something
this small it wasn t really required.
However, I decided to add a buttonhole stitch border on all edges, to
close the opening I had left and to reinforce especially the small
triangles on the hexagons side, as those had a smaller sewing allowance
and could use it.
And of course, the 11 11 squares side wasn t completely an accident,
but part of A Plan.
For this project there isn t really a pattern, but I did publish
A bit more than a year ago, I had been thinking about making myself a
cartridge pleated skirt. For a number of reasons, one of which is the
historybounding potential, I ve been thinking pre-crinoline, so
somewhere around the 1840s, and that s a completely new era for me,
which means: new underwear.
Also, the 1840s are pre-sewing machine, and I was already in a position
where I had more chances to handsew than to machine sew, so I decided to
embrace the slowness and sew 100% by hand, not even using the machine
for straight seams.
If I remember correctly, I started with the corded petticoat, looking
around the internet for instructions, and then designing my own based on
the practicality of using modern wide fabric from my stash (and
specifically some DITTE from costumers favourite source of dirty cheap
cotton IKEA).
Around the same time I had also acquired a sashiko kit, and I used the
Japanese technique for sewing running stitches pushing the needle with a
thimble that covers the base of the middle finger, and I can confirm
that for this kind of things it s great!
I ve since worn the petticoat a few times for casual / historyBounding /
folkwearBounding reasons, during the summer, and I can confirm it s
comfortable to use; I guess that during the winter it could be nice to
add a flannel layer below it.
The book only provided measurements for one size (moderate), and my
fabric was a bit too narrow to make them that size (not that I have any
idea what hip circumference a person of moderate size was supposed to
have), so the result is just wide enough to be comfortably worn, but I
think that when I ll make another pair I ll try to make them a bit
wider. On the other hand they are a bit too long, but I think that I ll
fix it by adding a tuck or two. Not a big deal, anyway.
The shift gave me a bit more issues: I used the recommended gusset size,
and ended up with a shift that was way too wide at the top, so I had to
take a box pleat in the center front and back, which changed the look
and wear of the garment. I have adjusted the instructions to make
gussets wider, and in the future I ll make another shift following
those.
Even with the pleat, the narrow shoulder straps are set quite far to the
sides, and they tend to droop, and I suspect that this is to be expected
from the way this garment is made. The fact that there are buttonholes
on the shoulder straps to attach to the corset straps and prevent the
issue is probably a hint that this behaviour was to be expected.
On the other hand, I m really happy with how cute the short sleeves
look, and if
I ve collected some more
Some went on my laptop, of course, but some were selected for another
tool I use relatively often: more pattern weights like
I might be slightly insane? Or am I going to prove something about the
nature and accessibility of sewing and MYOG
Having to backstitch everything instead of being able to use a running
backstitch of course meant that it was slower than other sewing
projects, and any time there were more than two layers of fabric I had
to use the stabbing motion rather than the sewing one, which is even
slower, but other than a few places with many layers of both fabric and
webbing it wasn t hard.
And to be fair, the seams were fewer and shorter than other sewing
projects, and with the usual interruptions and uneven time availability
it was done in less than a month, which is somewhat typical for one of
my handsewn projects.
It may have been because of the pattern, but I think it s relevant that
it was also easier than other backpacks I ve made, with significantly
less cursing, even when doing seams that would have been quite fiddly
when sewn by machine.
I have to admit that now I m tempted to plan another backpack using the
same pattern or a slight variation, sewn by machine in a different
fabric, to see the difference in the time it takes and to check if the
changes I think would make it easier to sew by machine are actually
the right thing to do. But maybe I ll wait a bit, other projects are in
the queue.
The pattern is
The soft back of course is an issue when the backpack is filled with
small items, but the molle webbing is there exactly because I have plans
to solve it, beside the trivial put something flat towards the back .
As an object, I m happy with the result. As a project, it was way more
than successful, exceeding all expectations, especially for something
somewhat experimental like this one was.