bindfs
bindfs copied to clipboard
Don't know how to build a static `bindfs` executable
I tried:
$ > cd bindfs-1.17.6
$ > mkdir build && cd build
$ > CFLAGS='-static' CPPFLAGS='-static' LDFLAGS='-static' ./configure --enable-shared=no --enable-static=yes --prefix /usr --with-fuse3
...
$ > CFLAGS='-static' CPPFLAGS='-static' LDFLAGS='-static' make
...
$ > CFLAGS='-static' CPPFLAGS='-static' LDFLAGS='-static' make DESTDIR="$PWD/dist" install
...
$ >
But I ended up with a dynamically linked bindfs executable. How can I make it actually build statically linked bindfs executable?
No idea, sorry. However, bindfs should be a fairly ordinary autoconf/automake project, so whatever generic instructions you find for them should be applicable.
I don't know if there are any special pitfalls with statically linking libfuse or libfuse3.
I do this in some builds:
./autogen.sh
./configure --prefix='{{ cfg_prefix }}' LDFLAGS='-Wl,-rpath,{{cfg_prefix}}/lib/ --static' LIBS='-pthread'
make -j
sudo make install
Replace {{cfg_prefix}} with your desired path like /usr/local.