From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Ryan Smith <ryan.smith@density.io>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] Embedding Python Interpreter with pybind11
Date: Wed, 23 Aug 2023 23:18:39 +0200 [thread overview]
Message-ID: <20230823231839.0494433f@windsurf> (raw)
In-Reply-To: <CAM7Wg-VCtAdw276BDujEX+7g2v793st6d+m00-6qLHcRz-opQw@mail.gmail.com>
Hello Ryan,
On Tue, 22 Aug 2023 22:26:10 -0600
Ryan Smith <ryan.smith@density.io> wrote:
> I am attempting to write a program that embeds the Python interpreter
> in C++ code using pybind11. When I attempt to compile the package in
> Buildroot, I get the following error message.
>
> /src/output-internal/host/include/python3.11/pyport.h:601:2: error:
> #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
> config?)."
> #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
> config?)."
> ^~~~~
> In file included from
> /src/output-internal/host/include/python3.11/Python.h:38:0,
> from
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is the problem: it's including the host python headers while
building code for the target. That's why it says "LONG_BIT definition
appears wrong for platform".
This is typically addressed by passing the right sysconfigdata, using
the _PYTHON_SYSCONFIGDATA_NAME variable. This is done automatically by
our python-package infrastructure.
Do you have a reproducer for this issue? People on this mailing list
are more likely to provide some help/support if they can reproduce the
issue.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2023-08-23 21:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 4:26 [Buildroot] Embedding Python Interpreter with pybind11 Ryan Smith
2023-08-23 21:18 ` Thomas Petazzoni via buildroot [this message]
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=20230823231839.0494433f@windsurf \
--to=buildroot@buildroot.org \
--cc=ryan.smith@density.io \
--cc=thomas.petazzoni@bootlin.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox