Skip to contentSkip to conversation

Can fio be compiled as a static binary?

DISCUSSION Jeff Johnson 2 participants 2 messages Dec 12, 2012

lore
Share & tools
lore
#0 lore raw

Greetings,

Is there a way to compile fio as a static binary? I have to use it on different Linux machines from time to time and I'd like to not alter the OS image by installing libaio-devel, etc. In some cases I am not able to make any changes to the installed OS image.

I performed a git checkout of fio and I wanted to ask if there was an existing/known method to derive a static fio binary from the existing source tree before I make any modifications or attempts on my own.

Thanks!

#1 lore raw
Quoted 10 lines · Jeff Johnson

Greetings,

Is there a way to compile fio as a static binary? I have to use it on different Linux machines from time to time and I'd like to not alter the OS image by installing libaio-devel, etc. In some cases I am not able to make any changes to the installed OS image.

I performed a git checkout of fio and I wanted to ask if there was an existing/known method to derive a static fio binary from the existing source tree before I make any modifications or attempts on my own.

There should be nothing preventing a static link of fio, provided that you have the proper libs installed on the machine where you build and link it. Should be doable with:

$ EXTFLAGS="-static" make

I have never tried it, though...

Signature · 1 line
Jens Axboe