mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Compiling libpcap from source using musl and clang
Date: Mon, 20 Nov 2017 14:31:26 -0500	[thread overview]
Message-ID: <20171120193126.GK1627@brightrain.aerifal.cx> (raw)
In-Reply-To: <CA+0nBG30T0A+rdq_bBcsNF8+hkkb2mgYjC-vVN4U+zhW4AOnEw@mail.gmail.com>

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


  reply	other threads:[~2017-11-20 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 19:02 Hamed Ghavamnia
2017-11-20 19:31 ` Rich Felker [this message]
2017-11-23  8:03   ` Linux headers for musl (was: Compiling libpcap from source using musl and clang) Assaf Gordon
2017-11-23 11:02     ` Szabolcs Nagy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171120193126.GK1627@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).