From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12117 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Compiling libpcap from source using musl and clang Date: Mon, 20 Nov 2017 14:31:26 -0500 Message-ID: <20171120193126.GK1627@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1511206299 21014 195.159.176.226 (20 Nov 2017 19:31:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Nov 2017 19:31:39 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12133-gllmg-musl=m.gmane.org@lists.openwall.com Mon Nov 20 20:31:36 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eGrn3-00058f-P5 for gllmg-musl@m.gmane.org; Mon, 20 Nov 2017 20:31:33 +0100 Original-Received: (qmail 9843 invoked by uid 550); 20 Nov 2017 19:31:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 9822 invoked from network); 20 Nov 2017 19:31:38 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12117 Archived-At: On Mon, Nov 20, 2017 at 02:02:43PM -0500, Hamed Ghavamnia wrote: > Hi to all, > > I'm trying to compile the libpcap library from source using musl and clang. > It compiles if I only use clang with libc, but using musl it dies. > The problem I'm currently facing is that the source codes require header > files such as linux/types.h, but there isn't any linux sub folder in the > include folder of my compiled musl library. Is that normal? Should I be > able to compile libpcap using musl, or does it require any features which > haven't been implemented in musl yet? To get the linux/* headers you need to install them. If you're using a cross toolchain built with musl-cross-make, they're installed for you in its sysroot. Otherwise you can install them yourself from the kernel sources or if you're using compiler wrappers on a glibc-based system you can make symlinks to the copies of the Linux headers in the glibc include dir (/usr/include/linux, etc.). Do NOT add -I/usr/include though to get them; this will use glibc headers and badly break things. Rich