Fedora – Linux static compilation issue

compilingfedorastatic-linking

I am building testdisk as static and run

make static

it returns the following error

/usr/bin/ld: cannot find -luuid

collect2: ld returned 1 exit status

What's the problem?

In the makefile I have the following line

LIBS = -lz -lntfs -luuid -lcrypto
-lext2fs -lcom_err

and I am getting error on all the floowing flags

-luuid -lcrypto -lext2fs -lcom_err

Best Answer

The RPM packages for libuuid-devel for Fedora 13 appear to contain only the shared library. Therefore you'd have to build it from source if you need a static library.

I expect that this is the same problem with a static -lcrypto and the others.

However, if it is TestDisk specifically that you are trying to compile, you probably shouldn't bother as the partition repair utility is part of most LiveCD distributions, including Fedora.

Related Question