bindfs icon indicating copy to clipboard operation
bindfs copied to clipboard

Don't know how to build a static `bindfs` executable

Open nukemiko opened this issue 1 year ago • 2 comments

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?

nukemiko avatar Jan 20 '24 14:01 nukemiko

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.

mpartel avatar Jan 20 '24 15:01 mpartel

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.

paulwkc avatar Oct 03 '25 15:10 paulwkc