From owner-freebsd-hackers@freebsd.org Wed Dec 16 20:53:33 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5CF224C6D87; Wed, 16 Dec 2020 20:53:33 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cx6mF20fCz3tkF; Wed, 16 Dec 2020 20:53:33 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: vmaffione) by smtp.freebsd.org (Postfix) with ESMTPSA id 3508DC0A9; Wed, 16 Dec 2020 20:53:33 +0000 (UTC) (envelope-from vmaffione@freebsd.org) Received: by mail-pf1-f170.google.com with SMTP id q22so17359429pfk.12; Wed, 16 Dec 2020 12:53:33 -0800 (PST) X-Gm-Message-State: AOAM533ihVU1TSSgsnX43iol+jz9vuEfkvRLGevSQhd0Bs/kYin+BuCx k0iICbCR/J1rK3K6GP5OSFIsFKulZdmHH77tk34= X-Google-Smtp-Source: ABdhPJzqAj+Yv/p4LuoOxLYOxkpirKrUTct+f5xE0K3BHc5EDusKg7wCQanpnIstV66l6qnlANDML5gKGnZ2YN3IGYg= X-Received: by 2002:a63:2264:: with SMTP id t36mr34348254pgm.350.1608152012251; Wed, 16 Dec 2020 12:53:32 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Vincenzo Maffione Date: Wed, 16 Dec 2020 21:53:21 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Netmap Library not getting installed on custom kernel installation To: Rajesh Kumar Cc: "freebsd-net@freebsd.org" , FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Dec 2020 20:53:33 -0000 Hi Rajesh, The libnetmap library is part of the userland utilities, whereas netmap itself is a kernel subsystem. This means that when you enable "device netmap", and you run "make buildkernel", you get a kernel with netmap included. Also the low level kernel headers are installed (e.g. /usr/include/net/netmap.h). On the other hand, libnetmap gets installed (libnetmap.h + libnetmap.so + libnetmap.a + ...) when you run "make buildworld" and "make installworld", because that's a userland component. On a side note, the netmap tools (pkt-gen, bridge, lb, etc.) should really be a port. Another TODO item. Regards, Vincenzo Il giorno mer 16 dic 2020 alle ore 14:42 Rajesh Kumar ha scritto: > Hi, > > Got around this issue by manually copying necessary in /usr/obj > > Looks like libnetmap (src/lib/libnetmap) is not built and installed by > default. Manually built them and copied the "libnetmap.h" and > "libnetmap.so" (not just the header file) to appropriate directories in > /usr/obj helps to get past the issue. But not sure why libnetmap is not > built and installed though "device netmap" is set in the config file. > > Manually copying may not be the right approach. Can anyone suggest a > cleaner way of getting things done? > > Thanks, > Rajesh. > > On Wed, Dec 16, 2020 at 3:33 PM Rajesh Kumar wrote: > > > Hi, > > > > I am trying to compile the netmap tools(pkt-gen, bridge etc.,) and > getting > > the below error. > > > > > > > > > > > > */root//freebsd/tools/tools/netmap/pkt-gen.c:47:10: fatal error: > > 'libnetmap.h' file not found#include ^~~~~~~~~~~~~1 > > error generated.*** Error code 1* > > > > On debug, I don't see the libnetmap.h file getting installed in the > > /usr/obj/ directory. Whereas, in another similar machine I have the file > > in /usr/obj and compilation of netmap tools goes fine. For the test, I > > just copied libnetmap.h from the source and it leads to linker error. So > > seems the libnetmap library is not installed properly. > > > > I installed a custom kernel just disabling the debug options with the > > FreeBSD-CURRENT branch. After rebooting to the custom kernel, I tried to > > compile the netmap tools (with some changes) and ran into the above > error. > > > > How to get the netmap tools compiled in this scenario? Am i missing > > something? > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >