quiet / libfec

Clone of Phil Karn's libfec with capability to build on x86-64
121 stars 56 forks source link

After installing libfec, liquid-dsp cannot find libfec #8

Open sanjeev1994 opened 7 years ago

sanjeev1994 commented 7 years ago

I installed libfec and then I confiugured liquid-dsp , in the output of ./configure i am getting these lines about libfec checking fec.h usability... no checking fec.h presence... no checking for fec.h... no

/usr/local/include/ in this path I am able to find fec.h file after instaling libfec.

Please help me in this issue.

thanks.

mapengfei53 commented 3 years ago

I also met this problem. Have you solved it? Thank you

Revathy0427 commented 3 years ago

@mapengfei53 @sanjeev1994 Hello, I too faced the same issue. Did you find a way to overcome this issue? Please let me know. Thank you.

mapengfei53 commented 3 years ago

@mapengfei53 @sanjeev1994 Hello, I too faced the same issue. Did you find a way to overcome this issue? Please let me know. Thank you.

After installing libfec, there is a command to run sudo ldconfig?

whacked commented 3 years ago

landing here after encountering

$ quiet_decode_file audible
error: fec_get_enc_msg_length(), convolutional codes unavailable (install libfec)

and looking through https://github.com/quiet/quiet/issues/20

Assuming that this issue is a prerequisite to run https://github.com/quiet/quiet, here's a shortest-path, "works-for-me" method which I got quiet_decode_file working on my base Ubuntu 20.04.3 LTS system. I tested the same commands on an Intel Mac running Big Sur, and it worked in one shot, without modification.

The caveat is that both systems use the nix package manager which may seem a bit heavy. If you decide to try this without prior experience, budget maybe 10~15 minutes to install the package manager (follow the official install guide, which should be a few commands), and a few more minutes for the binary compile, following the steps below.

# assuming you have the nix package manager available, you should be able to run
# $ source ~/.nix-profile/etc/profile.d/nix.sh
# from your active shell (or have that in your bashrc / zshrc / etc), and thus you have
# `nix-shell` available in your path
# I'm running nixpkgs-unstable, although any install within a few months of this comment should work identically

git clone https://github.com/quiet/quiet
cd quiet
wget -O quiet.nix https://gist.githubusercontent.com/whacked/b79407b3493d54639620fe0a71775d19/raw/ba90184cc83a83f1fbfd217ee457a424c3ec7e32/quiet.nix
nix-shell quiet.nix  # this will set up libfec and liquid-dsp into the /nix/store
build-quiet
... compile ...
./build/bin/quiet_encode_file audible
hello world^D
./build/bin/quiet_decode_file audible
hello world

This works as-is on a mac, but note that nix often doesn't work with mac/brew "native" libs so there may be other surprises / breakages later. I didn't expect it to work on the first try, especially with "portaudio" as a dependency, but who cares, it got the job done.

the nix expression file used above, from https://gist.github.com/whacked/b79407b3493d54639620fe0a71775d19 specifies a custom / pinned build of libfec and liquid-dsp with the libfec dependency explicitly given. I don't fully understand how everything is hard-coded or not, so note that the CMAKE output dir is also fixed at build time.

This is not a true solution to the issue above but a workaround.