Skip to content

Commit

Permalink
spec: add libtool as build requirement
Browse files Browse the repository at this point in the history
Let's add autoconf, automake, libtool as a build requirements
to spec file. It may be useful for users who building
dropwatch "by hands" as a reference.

I've spent some time in debugging dropwatch build problem:
lookup_bfd.o: In function `lookup_bfd_init':
/root/dropwatch/src/lookup_bfd.c:48: undefined reference to `bfd_init'

the reason was in absence of libtool in my system. As a result
not correct gcc invocation command was constructed by autoconf:

gcc -g -Wall -Werror -I... -g -O2 -lnl-3   -lnl-genl-3 -l...   -lpcap -lbfd  -o dropwatch main.o lookup.o lookup_kas.o lookup_bfd.o  -lpcap

the problem here is that we have -lbfd mentioned *before* object files, so ld
just forget about bfd symbols.

Installing libtool and regeneration of the build scripts/Makefile solves the problem.

Signed-off-by: Alexander Mikhalitsyn <[email protected]>
  • Loading branch information
mihalicyn committed Jul 29, 2022
1 parent cf65899 commit 2847dc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/dropwatch.spec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ URL: http://fedorahosted.org/dropwatch
License: GPLv2+
Group: Applications/System
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: autoconf, automake, libtool
BuildRequires: kernel-devel, libnl-devel, readline-devel
BuildRequires: binutils-devel, binutils-static pkgconfig
BuildRequires: binutils-devel, binutils-static, pkgconfig
Requires: libnl, readline

%description
Expand Down

0 comments on commit 2847dc2

Please sign in to comment.