Ex 35 How to link bsd libs for darray_algos.c

Hello,
I am trying to compile the ‘DArray_heapsort’ and ‘DArray_mergesort’ functions.
But I am unable to link these on Ubuntu 18.04.01 LTS.
I tried couple of things like

  1. Installing the libs with- sudo apt-get install libbsd-dev
    This gets the heapsort and mansort pages
  2. I tried to link these in LDLIBS as follows
    CFLAGS=-g -O2 -Wall -Wextra -Isrc $(shell pkg-config --cflags libbsd)
    COMMON_LIBS =$(shell pkg-config --libs libbsd) -ldl $(OPTLIBS)
    LDLIBS =$(COMMON_LIBS )

LDLIBS+= -ldl -lbsd -llcthw -L./build -lm

These are not able, to have the libs located. Would anyone be able to guide me to get this ball rolling?

I forget, is libbsd something I require? Can you try just removing that? I wonder if that’s the main change in Ubuntu 18 and so then that exercise is now out of date.