TransWikia.com

cannot find -luuid error make

Unix & Linux Asked by belmer1416 on December 26, 2021

I am using centos7 and am trying to build this https://github.com/daveti/prov-tools/tree/master/system however I get

/usr/bin/ld: cannot find -luuid

I did yum install with libuuid and it says that its installed, but I’m missing libuuid.a it seems. However there is no libuuid-static. Is there a package I’m missing or can I change my makefile so that i makes.

Here is the makefile

PREFIX ?= /usr  

CFLAGS ?= -Wall -Werror 
CFLAGS += -std=gnu99 -static

BINARIES = pbang ncred elijah fixbang
OBJECTS = plog

all: $(BINARIES)

clean:
    $(RM) $(BINARIES) $(addsuffix .o,$(OBJECTS))

install: $(addprefix install-,$(BINARIES))

install-%: %
    install -D $< $(DESTDIR)$(PREFIX)/sbin/$<

ncred elijah: plog.o

pbang: LDLIBS += -lz -luuid

.PHONY: all clean install

EDIT :
I verified that I have libuuid.so using find, but I’m not sure how I would link to this?

2 Answers

Red Hat gives rationale on bug 596898. Essentially, static libraries, particularly for basic infrastructure, are very strongly discouraged (it has been ages since the dynamic library machinery last acted up on me, so I heartily agree).

In general, I'd try looking for the package containing the presumable file name, something like:

dnf provides /usr/lib64/libuuuid.a

(dnf is smart in that it also recognizes e.g. pieces of TeX or Perl/Python modules by name). Then you can ask for further information an any hits, and decide what to do. If in a hurry and feeling reckless:

dnf -y install /usr/lib64/libuuuid.a

Answered by vonbrand on December 26, 2021

You need libuuid-devel , this package provide libraries for compiling .

libuuid provide libraries fro running

Answered by EchoMike444 on December 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP