All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] How to install custom sdk in buildroot?
@ 2023-02-08 16:07 Sourabh Hegde
  2023-02-08 16:14 ` Ramon Crichlow
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-08 16:07 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 303 bytes --]

Hello All,

I want to install a sdk on my Buildroot based Linux machine. SDK location
https://github.com/aws/aws-iot-device-sdk-python-v2 . They don't have any
packages which I can add in Buildroot.

On a native Linux machine, it can be done via pip. But how to do this in
Buildroot?

Thanks in advance

[-- Attachment #1.2: Type: text/html, Size: 491 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-08 16:07 [Buildroot] How to install custom sdk in buildroot? Sourabh Hegde
@ 2023-02-08 16:14 ` Ramon Crichlow
  2023-02-08 18:19   ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: Ramon Crichlow @ 2023-02-08 16:14 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1292 bytes --]

You can build an external toolchain with buildroot using make sdk (See
Section 6.1.3 in buildroot manual
<https://buildroot.org/downloads/manual/manual.html>)

Also from the manual (Section 11.2)
It has been decided that support for the native compiler on the target
would be stopped from the Buildroot-2012.11 release because:

this feature was neither maintained nor tested, and often broken;
this feature was only available for Buildroot toolchains;
Buildroot mostly targets small or very small target hardware with limited
resource onboard (CPU, ram, mass-storage), for which compiling on the
target does not make much sense;
Buildroot aims at easing the cross-compilation, making native compilation
on the target unnecessary.


On Wed, Feb 8, 2023 at 10:07 AM Sourabh Hegde <hrsourabh011@gmail.com>
wrote:

> Hello All,
>
> I want to install a sdk on my Buildroot based Linux machine. SDK location
> https://github.com/aws/aws-iot-device-sdk-python-v2 . They don't have any
> packages which I can add in Buildroot.
>
> On a native Linux machine, it can be done via pip. But how to do this in
> Buildroot?
>
> Thanks in advance
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
>

[-- Attachment #1.2: Type: text/html, Size: 1997 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-08 16:14 ` Ramon Crichlow
@ 2023-02-08 18:19   ` Sourabh Hegde
  2023-02-08 20:07     ` Maxim Kochetkov via buildroot
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-08 18:19 UTC (permalink / raw)
  To: Ramon Crichlow; +Cc: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1700 bytes --]

Hello Ramon,

I don't want an external toolchain. Maybe I was not clear. My goal is to
use the program/sdk from here
https://github.com/aws/aws-iot-device-sdk-python-v2 , this is a python
based project. And no package is available for this. Can I use python-pip
to install it?

On Wed, 8 Feb 2023 at 17:15, Ramon Crichlow <rcrichlow9000@gmail.com> wrote:

> You can build an external toolchain with buildroot using make sdk (See
> Section 6.1.3 in buildroot manual
> <https://buildroot.org/downloads/manual/manual.html>)
>
> Also from the manual (Section 11.2)
> It has been decided that support for the native compiler on the target
> would be stopped from the Buildroot-2012.11 release because:
>
> this feature was neither maintained nor tested, and often broken;
> this feature was only available for Buildroot toolchains;
> Buildroot mostly targets small or very small target hardware with limited
> resource onboard (CPU, ram, mass-storage), for which compiling on the
> target does not make much sense;
> Buildroot aims at easing the cross-compilation, making native compilation
> on the target unnecessary.
>
>
> On Wed, Feb 8, 2023 at 10:07 AM Sourabh Hegde <hrsourabh011@gmail.com>
> wrote:
>
>> Hello All,
>>
>> I want to install a sdk on my Buildroot based Linux machine. SDK location
>> https://github.com/aws/aws-iot-device-sdk-python-v2 . They don't have
>> any packages which I can add in Buildroot.
>>
>> On a native Linux machine, it can be done via pip. But how to do this in
>> Buildroot?
>>
>> Thanks in advance
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
>>
>

[-- Attachment #1.2: Type: text/html, Size: 2766 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-08 18:19   ` Sourabh Hegde
@ 2023-02-08 20:07     ` Maxim Kochetkov via buildroot
  2023-02-08 21:28       ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: Maxim Kochetkov via buildroot @ 2023-02-08 20:07 UTC (permalink / raw)
  To: Sourabh Hegde, Ramon Crichlow; +Cc: buildroot



On 08.02.2023 21:19, Sourabh Hegde wrote:
> Hello Ramon,
> 
> I don't want an external toolchain. Maybe I was not clear. My goal is to 
> use the program/sdk from here 
> https://github.com/aws/aws-iot-device-sdk-python-v2 
> <https://github.com/aws/aws-iot-device-sdk-python-v2> , this is a python 
> based project. And no package is available for this. Can I use 
> python-pip to install it?

Try to add your own package.

https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages

You can use any python package as a reference.
For example:
https://git.buildroot.net/buildroot/commit/package?id=037dbe64d861e3d5580ecac608bd278afc9bbcc6

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-08 20:07     ` Maxim Kochetkov via buildroot
@ 2023-02-08 21:28       ` Sourabh Hegde
  2023-02-09  5:35         ` Maxim Kochetkov via buildroot
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-08 21:28 UTC (permalink / raw)
  To: Maxim Kochetkov; +Cc: Ramon Crichlow, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1362 bytes --]

Hello Maxim,

Thanks for the update.

I think for me, the option "18.9.3. Generating a python-package from a PyPI
repository"
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages
is
suited.
I want to install this package https://pypi.org/project/awsiotsdk/. And
this package requires https://pypi.org/project/awscrt/ as dependency.
Should I create both Buildroot packages from python packages?
In the Buildroot manual, it's mentioned "Find the external python modules
menu and insert your package inside.", what should I insert here? source
code?

On Wed, 8 Feb 2023 at 21:07, Maxim Kochetkov <fido_max@inbox.ru> wrote:

>
>
> On 08.02.2023 21:19, Sourabh Hegde wrote:
> > Hello Ramon,
> >
> > I don't want an external toolchain. Maybe I was not clear. My goal is to
> > use the program/sdk from here
> > https://github.com/aws/aws-iot-device-sdk-python-v2
> > <https://github.com/aws/aws-iot-device-sdk-python-v2> , this is a
> python
> > based project. And no package is available for this. Can I use
> > python-pip to install it?
>
> Try to add your own package.
>
>
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages
>
> You can use any python package as a reference.
> For example:
>
> https://git.buildroot.net/buildroot/commit/package?id=037dbe64d861e3d5580ecac608bd278afc9bbcc6
>
>

[-- Attachment #1.2: Type: text/html, Size: 2507 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-08 21:28       ` Sourabh Hegde
@ 2023-02-09  5:35         ` Maxim Kochetkov via buildroot
  2023-02-09  8:14           ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: Maxim Kochetkov via buildroot @ 2023-02-09  5:35 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: Ramon Crichlow, buildroot



On 09.02.2023 00:28, Sourabh Hegde wrote:
> Hello Maxim,
> 
> Thanks for the update.
> 
> I think for me, the option "18.9.3. Generating a python-package from a 
> PyPI repository" 
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages <https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages> is suited.
> I want to install this package https://pypi.org/project/awsiotsdk/ 
> <https://pypi.org/project/awsiotsdk/>. And this package requires 
> https://pypi.org/project/awscrt/ <https://pypi.org/project/awscrt/> as 
> dependency. Should I create both Buildroot packages from python packages?

Sure.

> In the Buildroot manual, it's mentioned "Find the external python 
> modules menu and insert your package inside.", what should I insert 
> here? source code?

The output from scanpypi util. "This will generate packages python-foo 
and python-bar in the package folder if they exist on 
https://pypi.python.org."

"external python modules" is located at package/Config.in:

...
if BR2_PACKAGE_PYTHON3
menu "External python modules"
	source "package/python-aenum/Config.in"
	source "package/python-aexpect/Config.in"
...

Try this sequence:

utils/scanpypi awscrt awsiotsdk -o package

then add
	source "package/python-awscrt/Config.in"
	source "package/python-awsiotsdk/Config.in"
to the package/Config.in
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09  5:35         ` Maxim Kochetkov via buildroot
@ 2023-02-09  8:14           ` Sourabh Hegde
  2023-02-09  8:58             ` Maxim Kochetkov via buildroot
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-09  8:14 UTC (permalink / raw)
  To: Maxim Kochetkov; +Cc: Ramon Crichlow, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2036 bytes --]

Hello Maxim,

Thanks for the explanation.

When I tried this : utils/scanpypi awscrt awsiotsdk -o package ,  I am
getting below error:

utils/scanpypi:21: DeprecationWarning: the imp module is deprecated in
favour of importlib; see the module's documentation for alternative uses
  import imp
Traceback (most recent call last):
  File "utils/scanpypi", line 23, in <module>
    import six.moves.urllib.request
ModuleNotFoundError: No module named 'six'

Any idea what this is about?

On Thu, 9 Feb 2023 at 06:35, Maxim Kochetkov <fido_max@inbox.ru> wrote:

>
>
> On 09.02.2023 00:28, Sourabh Hegde wrote:
> > Hello Maxim,
> >
> > Thanks for the update.
> >
> > I think for me, the option "18.9.3. Generating a python-package from a
> > PyPI repository"
> >
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages
> <
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_python_packages> is
> suited.
> > I want to install this package https://pypi.org/project/awsiotsdk/
> > <https://pypi.org/project/awsiotsdk/>. And this package requires
> > https://pypi.org/project/awscrt/ <https://pypi.org/project/awscrt/> as
> > dependency. Should I create both Buildroot packages from python packages?
>
> Sure.
>
> > In the Buildroot manual, it's mentioned "Find the external python
> > modules menu and insert your package inside.", what should I insert
> > here? source code?
>
> The output from scanpypi util. "This will generate packages python-foo
> and python-bar in the package folder if they exist on
> https://pypi.python.org."
>
> "external python modules" is located at package/Config.in:
>
> ...
> if BR2_PACKAGE_PYTHON3
> menu "External python modules"
>         source "package/python-aenum/Config.in"
>         source "package/python-aexpect/Config.in"
> ...
>
> Try this sequence:
>
> utils/scanpypi awscrt awsiotsdk -o package
>
> then add
>         source "package/python-awscrt/Config.in"
>         source "package/python-awsiotsdk/Config.in"
> to the package/Config.in
>

[-- Attachment #1.2: Type: text/html, Size: 3435 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09  8:14           ` Sourabh Hegde
@ 2023-02-09  8:58             ` Maxim Kochetkov via buildroot
  2023-02-09  9:03               ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: Maxim Kochetkov via buildroot @ 2023-02-09  8:58 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: Ramon Crichlow, buildroot



On 09.02.2023 11:14, Sourabh Hegde wrote:
> Hello Maxim,
> 
> Thanks for the explanation.
> 
> When I tried this : utils/scanpypi awscrt awsiotsdk -o package ,  I am 
> getting below error:
> 
> utils/scanpypi:21: DeprecationWarning: the imp module is deprecated in 
> favour of importlib; see the module's documentation for alternative uses
>    import imp
> Traceback (most recent call last):
>    File "utils/scanpypi", line 23, in <module>
>      import six.moves.urllib.request
> ModuleNotFoundError: No module named 'six'

You have no "six" module installed for python. I have to install it 
first. For ubuntu: sudo apt install python3-six

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09  8:58             ` Maxim Kochetkov via buildroot
@ 2023-02-09  9:03               ` Sourabh Hegde
  2023-02-09  9:10                 ` Maxim Kochetkov
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-09  9:03 UTC (permalink / raw)
  To: Maxim Kochetkov; +Cc: Ramon Crichlow, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1285 bytes --]

Hello Maxim,

Update:

The above issue resolved by itself!

Now when I do: utils/scanpypi awscrt -o package , it says

spdx_lookup module is not installed. This can lead to an inaccurate licence
detection. Please install it via
pip install spdx_lookup
buildroot package name for awscrt: python-awscrt
Package: python-awscrt
Fetching package awscrt
ERROR: Could not find package awscrt.
Check syntax inside the python package index:
https://pypi.python.org/pypi/

But the package is available at https://pypi.org/project/awscrt/

On Thu, 9 Feb 2023 at 09:58, Maxim Kochetkov <fido_max@inbox.ru> wrote:

>
>
> On 09.02.2023 11:14, Sourabh Hegde wrote:
> > Hello Maxim,
> >
> > Thanks for the explanation.
> >
> > When I tried this : utils/scanpypi awscrt awsiotsdk -o package ,  I am
> > getting below error:
> >
> > utils/scanpypi:21: DeprecationWarning: the imp module is deprecated in
> > favour of importlib; see the module's documentation for alternative uses
> >    import imp
> > Traceback (most recent call last):
> >    File "utils/scanpypi", line 23, in <module>
> >      import six.moves.urllib.request
> > ModuleNotFoundError: No module named 'six'
>
> You have no "six" module installed for python. I have to install it
> first. For ubuntu: sudo apt install python3-six
>
>

[-- Attachment #1.2: Type: text/html, Size: 1899 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09  9:03               ` Sourabh Hegde
@ 2023-02-09  9:10                 ` Maxim Kochetkov
  2023-02-09  9:28                   ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: Maxim Kochetkov @ 2023-02-09  9:10 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: Ramon Crichlow, buildroot



On 09.02.2023 12:03, Sourabh Hegde wrote:
> Hello Maxim,
> 
> Update:
> 
> The above issue resolved by itself!
> 
> Now when I do: utils/scanpypi awscrt -o package , it says
> 
> spdx_lookup module is not installed. This can lead to an inaccurate 
> licence detection. Please install it via
> pip install spdx_lookup
> buildroot package name for awscrt: python-awscrt
> Package: python-awscrt
> Fetching package awscrt
> ERROR: Could not find package awscrt.
> Check syntax inside the python package index:
> https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>
> 
> But the package is available at https://pypi.org/project/awscrt/ 
> <https://pypi.org/project/awscrt/>

It works fine for me:

buildroot package name for awscrt: python-awscrt
Package: python-awscrt
Fetching package awscrt
Downloading package awscrt from 
https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz...
Checking if package package/python-awscrt already exists...
Creating package/python-awscrt/python-awscrt.mk...
More than one file found for license: LICENSE, crt/aws-c-common/LICENSE, 
crt/aws-c-io/LICENSE, crt/aws-lc/LICENSE, 
crt/aws-lc/third_party/fiat/LICENSE, crt/aws-c-mqtt/LICENSE, 
crt/aws-checksums/LICENSE, crt/aws-c-s3/LICENSE, 
crt/aws-c-compression/LICENSE, crt/aws-c-http/LICENSE, 
crt/aws-c-sdkutils/LICENSE, crt/s2n/LICENSE, crt/aws-c-cal/LICENSE, 
crt/aws-c-auth/LICENSE, crt/aws-c-event-stream/LICENSE
Creating package/python-awscrt/python-awscrt.hash...
Creating package/python-awscrt/Config.in...
NOTE: Remember to also make an update to the DEVELOPERS file
       and include an entry for the pkg in packages/Config.in

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09  9:10                 ` Maxim Kochetkov
@ 2023-02-09  9:28                   ` Sourabh Hegde
  2023-02-09 12:09                     ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-09  9:28 UTC (permalink / raw)
  To: Maxim Kochetkov; +Cc: Ramon Crichlow, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 2037 bytes --]

Hi Maxim,

I was missing python setuptools on my host. After installing it, I can add
the package. Also, the added package is available in menuconfig

Thank you for the support!

On Thu, 9 Feb 2023 at 10:10, Maxim Kochetkov <fido_max@inbox.ru> wrote:

>
>
> On 09.02.2023 12:03, Sourabh Hegde wrote:
> > Hello Maxim,
> >
> > Update:
> >
> > The above issue resolved by itself!
> >
> > Now when I do: utils/scanpypi awscrt -o package , it says
> >
> > spdx_lookup module is not installed. This can lead to an inaccurate
> > licence detection. Please install it via
> > pip install spdx_lookup
> > buildroot package name for awscrt: python-awscrt
> > Package: python-awscrt
> > Fetching package awscrt
> > ERROR: Could not find package awscrt.
> > Check syntax inside the python package index:
> > https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>
> >
> > But the package is available at https://pypi.org/project/awscrt/
> > <https://pypi.org/project/awscrt/>
>
> It works fine for me:
>
> buildroot package name for awscrt: python-awscrt
> Package: python-awscrt
> Fetching package awscrt
> Downloading package awscrt from
>
> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz.
> ..
> Checking if package package/python-awscrt already exists...
> Creating package/python-awscrt/python-awscrt.mk...
> More than one file found for license: LICENSE, crt/aws-c-common/LICENSE,
> crt/aws-c-io/LICENSE, crt/aws-lc/LICENSE,
> crt/aws-lc/third_party/fiat/LICENSE, crt/aws-c-mqtt/LICENSE,
> crt/aws-checksums/LICENSE, crt/aws-c-s3/LICENSE,
> crt/aws-c-compression/LICENSE, crt/aws-c-http/LICENSE,
> crt/aws-c-sdkutils/LICENSE, crt/s2n/LICENSE, crt/aws-c-cal/LICENSE,
> crt/aws-c-auth/LICENSE, crt/aws-c-event-stream/LICENSE
> Creating package/python-awscrt/python-awscrt.hash...
> Creating package/python-awscrt/Config.in...
> NOTE: Remember to also make an update to the DEVELOPERS file
>        and include an entry for the pkg in packages/Config.in
>
>

[-- Attachment #1.2: Type: text/html, Size: 3078 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09  9:28                   ` Sourabh Hegde
@ 2023-02-09 12:09                     ` Sourabh Hegde
  2023-02-09 20:12                       ` James Hilliard
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-09 12:09 UTC (permalink / raw)
  To: Maxim Kochetkov; +Cc: Ramon Crichlow, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 5167 bytes --]

Hello Maxim,

While doing make with new Buildroot-packages I getting:

[ 51%] Building ASM object
aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/asm/poly_rq_mul.S.o
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:
Assembler messages:
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:304:
Error: unknown pseudo-op: `.att_syntax'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:307:
Error: unknown mnemonic `push' -- `push %rbp'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:309:
Error: bad register expression
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:310:
Error: unknown mnemonic `movq' -- `movq %rsp,%rbp'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:311:
Error: bad register expression
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:312:
Error: unknown mnemonic `push' -- `push %r12'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:313:
Error: bad register expression
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:321:
Error: operand 1 must be an integer register -- `mov %rcx,%r8'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:322:
Error: unknown mnemonic `addq' -- `addq $6144+12288+512+9408+32,%r8'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:323:
Error: operand 1 must be an integer register -- `mov %r8,%rax'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:324:
Error: unknown mnemonic `subq' -- `subq $6144,%r8'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:325:
Error: operand 1 must be an integer register -- `mov %r8,%r11'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:326:
Error: unknown mnemonic `subq' -- `subq $12288,%r8'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:327:
Error: operand 1 must be an integer register -- `mov %r8,%r12'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:328:
Error: unknown mnemonic `subq' -- `subq $512,%r8'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:329:
Error: unknown mnemonic `vmovdqa' -- `vmovdqa const3(%rip),%ymm3'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:330:
Error: unknown mnemonic `vmovdqu' -- `vmovdqu 0(%rsi),%ymm0'
/home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:331:
Error: unknown mnemonic `vmovdqu' -- `vmovdqu 88(%rsi),%ymm1'
.
.
.
Any idea what it is complaining about?

Thanks in advance

On Thu, 9 Feb 2023 at 10:28, Sourabh Hegde <hrsourabh011@gmail.com> wrote:

> Hi Maxim,
>
> I was missing python setuptools on my host. After installing it, I can add
> the package. Also, the added package is available in menuconfig
>
> Thank you for the support!
>
> On Thu, 9 Feb 2023 at 10:10, Maxim Kochetkov <fido_max@inbox.ru> wrote:
>
>>
>>
>> On 09.02.2023 12:03, Sourabh Hegde wrote:
>> > Hello Maxim,
>> >
>> > Update:
>> >
>> > The above issue resolved by itself!
>> >
>> > Now when I do: utils/scanpypi awscrt -o package , it says
>> >
>> > spdx_lookup module is not installed. This can lead to an inaccurate
>> > licence detection. Please install it via
>> > pip install spdx_lookup
>> > buildroot package name for awscrt: python-awscrt
>> > Package: python-awscrt
>> > Fetching package awscrt
>> > ERROR: Could not find package awscrt.
>> > Check syntax inside the python package index:
>> > https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>
>> >
>> > But the package is available at https://pypi.org/project/awscrt/
>> > <https://pypi.org/project/awscrt/>
>>
>> It works fine for me:
>>
>> buildroot package name for awscrt: python-awscrt
>> Package: python-awscrt
>> Fetching package awscrt
>> Downloading package awscrt from
>>
>> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz.
>> ..
>> Checking if package package/python-awscrt already exists...
>> Creating package/python-awscrt/python-awscrt.mk...
>> More than one file found for license: LICENSE, crt/aws-c-common/LICENSE,
>> crt/aws-c-io/LICENSE, crt/aws-lc/LICENSE,
>> crt/aws-lc/third_party/fiat/LICENSE, crt/aws-c-mqtt/LICENSE,
>> crt/aws-checksums/LICENSE, crt/aws-c-s3/LICENSE,
>> crt/aws-c-compression/LICENSE, crt/aws-c-http/LICENSE,
>> crt/aws-c-sdkutils/LICENSE, crt/s2n/LICENSE, crt/aws-c-cal/LICENSE,
>> crt/aws-c-auth/LICENSE, crt/aws-c-event-stream/LICENSE
>> Creating package/python-awscrt/python-awscrt.hash...
>> Creating package/python-awscrt/Config.in...
>> NOTE: Remember to also make an update to the DEVELOPERS file
>>        and include an entry for the pkg in packages/Config.in
>>
>>

[-- Attachment #1.2: Type: text/html, Size: 6719 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09 12:09                     ` Sourabh Hegde
@ 2023-02-09 20:12                       ` James Hilliard
  2023-02-14  7:27                         ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: James Hilliard @ 2023-02-09 20:12 UTC (permalink / raw)
  To: Sourabh Hegde; +Cc: Maxim Kochetkov, Ramon Crichlow, buildroot

On Thu, Feb 9, 2023 at 5:10 AM Sourabh Hegde <hrsourabh011@gmail.com> wrote:
>
> Hello Maxim,
>
> While doing make with new Buildroot-packages I getting:
>
> [ 51%] Building ASM object aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/asm/poly_rq_mul.S.o
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S: Assembler messages:
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:304: Error: unknown pseudo-op: `.att_syntax'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:307: Error: unknown mnemonic `push' -- `push %rbp'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:309: Error: bad register expression
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:310: Error: unknown mnemonic `movq' -- `movq %rsp,%rbp'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:311: Error: bad register expression
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:312: Error: unknown mnemonic `push' -- `push %r12'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:313: Error: bad register expression
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:321: Error: operand 1 must be an integer register -- `mov %rcx,%r8'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:322: Error: unknown mnemonic `addq' -- `addq $6144+12288+512+9408+32,%r8'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:323: Error: operand 1 must be an integer register -- `mov %r8,%rax'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:324: Error: unknown mnemonic `subq' -- `subq $6144,%r8'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:325: Error: operand 1 must be an integer register -- `mov %r8,%r11'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:326: Error: unknown mnemonic `subq' -- `subq $12288,%r8'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:327: Error: operand 1 must be an integer register -- `mov %r8,%r12'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:328: Error: unknown mnemonic `subq' -- `subq $512,%r8'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:329: Error: unknown mnemonic `vmovdqa' -- `vmovdqa const3(%rip),%ymm3'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:330: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 0(%rsi),%ymm0'
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:331: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 88(%rsi),%ymm1'
> .
> .
> .
> Any idea what it is complaining about?

The problem here is that while the python awscrt package uses setuptools
it's not a normal python setuptools package, the setup.py installs both a normal
setuptools package and a vendored cmake package(meta package really).

See cmake build wrapper functionality here in the setuptools setup.py file:
https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py#L156-L272

This is the cmake meta project root which is vendored inside of awscrt:
https://github.com/awslabs/aws-crt-python/tree/v0.16.10/crt

See meta cmakelists build:
https://github.com/awslabs/aws-crt-python/blob/v0.16.10/crt/CMakeLists.txt

This meta project is made up of multiple subprojects:
aws-c-auth
aws-c-cal
aws-c-common
aws-c-compression
aws-c-event-stream
aws-checksums
aws-c-http
aws-c-io
aws-c-mqtt
aws-c-s3
aws-c-sdkutils
aws-lc
s2n

In buildroot we expect cmake packages to use our cmake infrastructure
as it will set up the cross compilation environment correctly while the
awscrt setuptools cmake wrapper does not.

I confirmed that the cmake packages build correctly when using our
cmake infrastructure:
################################################################################
#
# python-awscrt
#
################################################################################

PYTHON_AWSCRT_VERSION = 0.16.10
PYTHON_AWSCRT_SOURCE = awscrt-$(PYTHON_AWSCRT_VERSION).tar.gz
PYTHON_AWSCRT_SITE =
https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2
PYTHON_AWSCRT_SUBDIR = crt

$(eval $(cmake-package))

See:
https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages

So what I think you need to do is create buildroot cmake packages for all
these subprojects using buildroot's cmake infrastructure:
https://github.com/awslabs/aws-c-auth
https://github.com/awslabs/aws-c-cal
https://github.com/awslabs/aws-c-common
https://github.com/awslabs/aws-c-compression
https://github.com/awslabs/aws-c-event-stream
https://github.com/awslabs/aws-checksums
https://github.com/awslabs/aws-c-http
https://github.com/awslabs/aws-c-io
https://github.com/awslabs/aws-c-mqtt
https://github.com/awslabs/aws-c-s3
https://github.com/awslabs/aws-c-sdkutils
https://github.com/awslabs/aws-lc
https://github.com/aws/s2n-tls

You will then probably need to modify the setup.py file
(https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py) so that
instead of using the cmake build functions have it use the system versions
of these libraries pre-installed via the buildroot cmake infrastructure.

You can probably use and check for an env variable such as this in the setup.py:
PYTHON_AWSCRT_USE_SYSTEM_CRT=1

When present have it disable building the cmake libraries itself and search
for the installed system crt libraries instead of using the vendored
cmake build.

You should upstream this setup.py functionality to the aws-crt-project as well
so that we don't need to carry a patch in buildroot for python-awscrt to use
the system crt libraries.

Then from the python-awscrt buildroot package you would set that env
variable and add all the cmake subprojects as buildroot package dependencies.

First thing you should start with is adding the cmake buildroot packages for
the crt subprojects to buildroot then work on modifying aws-crt-python to
work correctly with them instead of trying to use its broken cmake setuptools
wrapper.

>
> Thanks in advance
>
> On Thu, 9 Feb 2023 at 10:28, Sourabh Hegde <hrsourabh011@gmail.com> wrote:
>>
>> Hi Maxim,
>>
>> I was missing python setuptools on my host. After installing it, I can add the package. Also, the added package is available in menuconfig
>>
>> Thank you for the support!
>>
>> On Thu, 9 Feb 2023 at 10:10, Maxim Kochetkov <fido_max@inbox.ru> wrote:
>>>
>>>
>>>
>>> On 09.02.2023 12:03, Sourabh Hegde wrote:
>>> > Hello Maxim,
>>> >
>>> > Update:
>>> >
>>> > The above issue resolved by itself!
>>> >
>>> > Now when I do: utils/scanpypi awscrt -o package , it says
>>> >
>>> > spdx_lookup module is not installed. This can lead to an inaccurate
>>> > licence detection. Please install it via
>>> > pip install spdx_lookup
>>> > buildroot package name for awscrt: python-awscrt
>>> > Package: python-awscrt
>>> > Fetching package awscrt
>>> > ERROR: Could not find package awscrt.
>>> > Check syntax inside the python package index:
>>> > https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>
>>> >
>>> > But the package is available at https://pypi.org/project/awscrt/
>>> > <https://pypi.org/project/awscrt/>
>>>
>>> It works fine for me:
>>>
>>> buildroot package name for awscrt: python-awscrt
>>> Package: python-awscrt
>>> Fetching package awscrt
>>> Downloading package awscrt from
>>> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz...
>>> Checking if package package/python-awscrt already exists...
>>> Creating package/python-awscrt/python-awscrt.mk...
>>> More than one file found for license: LICENSE, crt/aws-c-common/LICENSE,
>>> crt/aws-c-io/LICENSE, crt/aws-lc/LICENSE,
>>> crt/aws-lc/third_party/fiat/LICENSE, crt/aws-c-mqtt/LICENSE,
>>> crt/aws-checksums/LICENSE, crt/aws-c-s3/LICENSE,
>>> crt/aws-c-compression/LICENSE, crt/aws-c-http/LICENSE,
>>> crt/aws-c-sdkutils/LICENSE, crt/s2n/LICENSE, crt/aws-c-cal/LICENSE,
>>> crt/aws-c-auth/LICENSE, crt/aws-c-event-stream/LICENSE
>>> Creating package/python-awscrt/python-awscrt.hash...
>>> Creating package/python-awscrt/Config.in...
>>> NOTE: Remember to also make an update to the DEVELOPERS file
>>>        and include an entry for the pkg in packages/Config.in
>>>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-09 20:12                       ` James Hilliard
@ 2023-02-14  7:27                         ` Sourabh Hegde
  2023-02-14 20:55                           ` Arnout Vandecappelle
  0 siblings, 1 reply; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-14  7:27 UTC (permalink / raw)
  To: James Hilliard; +Cc: Maxim Kochetkov, Ramon Crichlow, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 9790 bytes --]

Hello James,

Thanks for the update.

awscrt also has precompiled wheels
<https://pypi.org/project/awscrt/#files> such
as
awscrt-0.16.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Can Buildroot use them instead of cross compiling? If not, is it possible
to extract it and install manually?

Thanks in advance

On Thu, 9 Feb 2023 at 21:12, James Hilliard <james.hilliard1@gmail.com>
wrote:

> On Thu, Feb 9, 2023 at 5:10 AM Sourabh Hegde <hrsourabh011@gmail.com>
> wrote:
> >
> > Hello Maxim,
> >
> > While doing make with new Buildroot-packages I getting:
> >
> > [ 51%] Building ASM object
> aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/asm/poly_rq_mul.S.o
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:
> Assembler messages:
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:304:
> Error: unknown pseudo-op: `.att_syntax'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:307:
> Error: unknown mnemonic `push' -- `push %rbp'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:309:
> Error: bad register expression
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:310:
> Error: unknown mnemonic `movq' -- `movq %rsp,%rbp'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:311:
> Error: bad register expression
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:312:
> Error: unknown mnemonic `push' -- `push %r12'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:313:
> Error: bad register expression
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:321:
> Error: operand 1 must be an integer register -- `mov %rcx,%r8'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:322:
> Error: unknown mnemonic `addq' -- `addq $6144+12288+512+9408+32,%r8'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:323:
> Error: operand 1 must be an integer register -- `mov %r8,%rax'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:324:
> Error: unknown mnemonic `subq' -- `subq $6144,%r8'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:325:
> Error: operand 1 must be an integer register -- `mov %r8,%r11'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:326:
> Error: unknown mnemonic `subq' -- `subq $12288,%r8'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:327:
> Error: operand 1 must be an integer register -- `mov %r8,%r12'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:328:
> Error: unknown mnemonic `subq' -- `subq $512,%r8'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:329:
> Error: unknown mnemonic `vmovdqa' -- `vmovdqa const3(%rip),%ymm3'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:330:
> Error: unknown mnemonic `vmovdqu' -- `vmovdqu 0(%rsi),%ymm0'
> >
> /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:331:
> Error: unknown mnemonic `vmovdqu' -- `vmovdqu 88(%rsi),%ymm1'
> > .
> > .
> > .
> > Any idea what it is complaining about?
>
> The problem here is that while the python awscrt package uses setuptools
> it's not a normal python setuptools package, the setup.py installs both a
> normal
> setuptools package and a vendored cmake package(meta package really).
>
> See cmake build wrapper functionality here in the setuptools setup.py file:
> https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py#L156-L272
>
> This is the cmake meta project root which is vendored inside of awscrt:
> https://github.com/awslabs/aws-crt-python/tree/v0.16.10/crt
>
> See meta cmakelists build:
> https://github.com/awslabs/aws-crt-python/blob/v0.16.10/crt/CMakeLists.txt
>
> This meta project is made up of multiple subprojects:
> aws-c-auth
> aws-c-cal
> aws-c-common
> aws-c-compression
> aws-c-event-stream
> aws-checksums
> aws-c-http
> aws-c-io
> aws-c-mqtt
> aws-c-s3
> aws-c-sdkutils
> aws-lc
> s2n
>
> In buildroot we expect cmake packages to use our cmake infrastructure
> as it will set up the cross compilation environment correctly while the
> awscrt setuptools cmake wrapper does not.
>
> I confirmed that the cmake packages build correctly when using our
> cmake infrastructure:
>
> ################################################################################
> #
> # python-awscrt
> #
>
> ################################################################################
>
> PYTHON_AWSCRT_VERSION = 0.16.10
> PYTHON_AWSCRT_SOURCE = awscrt-$(PYTHON_AWSCRT_VERSION).tar.gz
> PYTHON_AWSCRT_SITE =
>
> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2
> PYTHON_AWSCRT_SUBDIR = crt
>
> $(eval $(cmake-package))
>
> See:
>
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
>
> So what I think you need to do is create buildroot cmake packages for all
> these subprojects using buildroot's cmake infrastructure:
> https://github.com/awslabs/aws-c-auth
> https://github.com/awslabs/aws-c-cal
> https://github.com/awslabs/aws-c-common
> https://github.com/awslabs/aws-c-compression
> https://github.com/awslabs/aws-c-event-stream
> https://github.com/awslabs/aws-checksums
> https://github.com/awslabs/aws-c-http
> https://github.com/awslabs/aws-c-io
> https://github.com/awslabs/aws-c-mqtt
> https://github.com/awslabs/aws-c-s3
> https://github.com/awslabs/aws-c-sdkutils
> https://github.com/awslabs/aws-lc
> https://github.com/aws/s2n-tls
>
> You will then probably need to modify the setup.py file
> (https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py) so that
> instead of using the cmake build functions have it use the system versions
> of these libraries pre-installed via the buildroot cmake infrastructure.
>
> You can probably use and check for an env variable such as this in the
> setup.py:
> PYTHON_AWSCRT_USE_SYSTEM_CRT=1
>
> When present have it disable building the cmake libraries itself and search
> for the installed system crt libraries instead of using the vendored
> cmake build.
>
> You should upstream this setup.py functionality to the aws-crt-project as
> well
> so that we don't need to carry a patch in buildroot for python-awscrt to
> use
> the system crt libraries.
>
> Then from the python-awscrt buildroot package you would set that env
> variable and add all the cmake subprojects as buildroot package
> dependencies.
>
> First thing you should start with is adding the cmake buildroot packages
> for
> the crt subprojects to buildroot then work on modifying aws-crt-python to
> work correctly with them instead of trying to use its broken cmake
> setuptools
> wrapper.
>
> >
> > Thanks in advance
> >
> > On Thu, 9 Feb 2023 at 10:28, Sourabh Hegde <hrsourabh011@gmail.com>
> wrote:
> >>
> >> Hi Maxim,
> >>
> >> I was missing python setuptools on my host. After installing it, I can
> add the package. Also, the added package is available in menuconfig
> >>
> >> Thank you for the support!
> >>
> >> On Thu, 9 Feb 2023 at 10:10, Maxim Kochetkov <fido_max@inbox.ru> wrote:
> >>>
> >>>
> >>>
> >>> On 09.02.2023 12:03, Sourabh Hegde wrote:
> >>> > Hello Maxim,
> >>> >
> >>> > Update:
> >>> >
> >>> > The above issue resolved by itself!
> >>> >
> >>> > Now when I do: utils/scanpypi awscrt -o package , it says
> >>> >
> >>> > spdx_lookup module is not installed. This can lead to an inaccurate
> >>> > licence detection. Please install it via
> >>> > pip install spdx_lookup
> >>> > buildroot package name for awscrt: python-awscrt
> >>> > Package: python-awscrt
> >>> > Fetching package awscrt
> >>> > ERROR: Could not find package awscrt.
> >>> > Check syntax inside the python package index:
> >>> > https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>
> >>> >
> >>> > But the package is available at https://pypi.org/project/awscrt/
> >>> > <https://pypi.org/project/awscrt/>
> >>>
> >>> It works fine for me:
> >>>
> >>> buildroot package name for awscrt: python-awscrt
> >>> Package: python-awscrt
> >>> Fetching package awscrt
> >>> Downloading package awscrt from
> >>>
> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz.
> ..
> >>> Checking if package package/python-awscrt already exists...
> >>> Creating package/python-awscrt/python-awscrt.mk...
> >>> More than one file found for license: LICENSE,
> crt/aws-c-common/LICENSE,
> >>> crt/aws-c-io/LICENSE, crt/aws-lc/LICENSE,
> >>> crt/aws-lc/third_party/fiat/LICENSE, crt/aws-c-mqtt/LICENSE,
> >>> crt/aws-checksums/LICENSE, crt/aws-c-s3/LICENSE,
> >>> crt/aws-c-compression/LICENSE, crt/aws-c-http/LICENSE,
> >>> crt/aws-c-sdkutils/LICENSE, crt/s2n/LICENSE, crt/aws-c-cal/LICENSE,
> >>> crt/aws-c-auth/LICENSE, crt/aws-c-event-stream/LICENSE
> >>> Creating package/python-awscrt/python-awscrt.hash...
> >>> Creating package/python-awscrt/Config.in...
> >>> NOTE: Remember to also make an update to the DEVELOPERS file
> >>>        and include an entry for the pkg in packages/Config.in
> >>>
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>

[-- Attachment #1.2: Type: text/html, Size: 14591 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-14  7:27                         ` Sourabh Hegde
@ 2023-02-14 20:55                           ` Arnout Vandecappelle
  2023-02-14 21:22                             ` Sourabh Hegde
  0 siblings, 1 reply; 16+ messages in thread
From: Arnout Vandecappelle @ 2023-02-14 20:55 UTC (permalink / raw)
  To: Sourabh Hegde, James Hilliard; +Cc: Maxim Kochetkov, Ramon Crichlow, buildroot



On 14/02/2023 08:27, Sourabh Hegde wrote:
> Hello James,
> 
> Thanks for the update.
> 
> awscrt also has precompiled wheels <https://pypi.org/project/awscrt/#files> such 
> as awscrt-0.16.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
> 
> Can Buildroot use them instead of cross compiling?

  If cross-compiling is difficult, it's fairly likely that there are many cases 
where the binary wheel won't work either. Therefore, no, we (probably) can't use 
them.

> If not, is it possible 
> to extract it and install manually?

  You can do that in a post-build script. It's going to be something that is 
tested in your specific use case only, so not something that we would support 
upstream.

  A wheel file is actually a zip file, so you just need to unzip it in the 
site_packages directory. And test if it works, of course.

  Regards,
  Arnout

> 
> Thanks in advance
> 
> On Thu, 9 Feb 2023 at 21:12, James Hilliard <james.hilliard1@gmail.com 
> <mailto:james.hilliard1@gmail.com>> wrote:
> 
>     On Thu, Feb 9, 2023 at 5:10 AM Sourabh Hegde <hrsourabh011@gmail.com
>     <mailto:hrsourabh011@gmail.com>> wrote:
>      >
>      > Hello Maxim,
>      >
>      > While doing make with new Buildroot-packages I getting:
>      >
>      > [ 51%] Building ASM object
>     aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/asm/poly_rq_mul.S.o
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S: Assembler messages:
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:304: Error: unknown pseudo-op: `.att_syntax'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:307: Error: unknown mnemonic `push' -- `push %rbp'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:309: Error: bad register expression
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:310: Error: unknown mnemonic `movq' -- `movq %rsp,%rbp'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:311: Error: bad register expression
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:312: Error: unknown mnemonic `push' -- `push %r12'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:313: Error: bad register expression
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:321: Error: operand 1 must be an integer register -- `mov %rcx,%r8'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:322: Error: unknown mnemonic `addq' -- `addq $6144+12288+512+9408+32,%r8'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:323: Error: operand 1 must be an integer register -- `mov %r8,%rax'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:324: Error: unknown mnemonic `subq' -- `subq $6144,%r8'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:325: Error: operand 1 must be an integer register -- `mov %r8,%r11'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:326: Error: unknown mnemonic `subq' -- `subq $12288,%r8'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:327: Error: operand 1 must be an integer register -- `mov %r8,%r12'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:328: Error: unknown mnemonic `subq' -- `subq $512,%r8'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:329: Error: unknown mnemonic `vmovdqa' -- `vmovdqa const3(%rip),%ymm3'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:330: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 0(%rsi),%ymm0'
>      >
>     /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:331: Error: unknown mnemonic `vmovdqu' -- `vmovdqu 88(%rsi),%ymm1'
>      > .
>      > .
>      > .
>      > Any idea what it is complaining about?
> 
>     The problem here is that while the python awscrt package uses setuptools
>     it's not a normal python setuptools package, the setup.py installs both a normal
>     setuptools package and a vendored cmake package(meta package really).
> 
>     See cmake build wrapper functionality here in the setuptools setup.py file:
>     https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py#L156-L272
>     <https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py#L156-L272>
> 
>     This is the cmake meta project root which is vendored inside of awscrt:
>     https://github.com/awslabs/aws-crt-python/tree/v0.16.10/crt
>     <https://github.com/awslabs/aws-crt-python/tree/v0.16.10/crt>
> 
>     See meta cmakelists build:
>     https://github.com/awslabs/aws-crt-python/blob/v0.16.10/crt/CMakeLists.txt
>     <https://github.com/awslabs/aws-crt-python/blob/v0.16.10/crt/CMakeLists.txt>
> 
>     This meta project is made up of multiple subprojects:
>     aws-c-auth
>     aws-c-cal
>     aws-c-common
>     aws-c-compression
>     aws-c-event-stream
>     aws-checksums
>     aws-c-http
>     aws-c-io
>     aws-c-mqtt
>     aws-c-s3
>     aws-c-sdkutils
>     aws-lc
>     s2n
> 
>     In buildroot we expect cmake packages to use our cmake infrastructure
>     as it will set up the cross compilation environment correctly while the
>     awscrt setuptools cmake wrapper does not.
> 
>     I confirmed that the cmake packages build correctly when using our
>     cmake infrastructure:
>     ################################################################################
>     #
>     # python-awscrt
>     #
>     ################################################################################
> 
>     PYTHON_AWSCRT_VERSION = 0.16.10
>     PYTHON_AWSCRT_SOURCE = awscrt-$(PYTHON_AWSCRT_VERSION).tar.gz
>     PYTHON_AWSCRT_SITE =
>     https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2 <https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2>
>     PYTHON_AWSCRT_SUBDIR = crt
> 
>     $(eval $(cmake-package))
> 
>     See:
>     https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages <https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages>
> 
>     So what I think you need to do is create buildroot cmake packages for all
>     these subprojects using buildroot's cmake infrastructure:
>     https://github.com/awslabs/aws-c-auth <https://github.com/awslabs/aws-c-auth>
>     https://github.com/awslabs/aws-c-cal <https://github.com/awslabs/aws-c-cal>
>     https://github.com/awslabs/aws-c-common
>     <https://github.com/awslabs/aws-c-common>
>     https://github.com/awslabs/aws-c-compression
>     <https://github.com/awslabs/aws-c-compression>
>     https://github.com/awslabs/aws-c-event-stream
>     <https://github.com/awslabs/aws-c-event-stream>
>     https://github.com/awslabs/aws-checksums
>     <https://github.com/awslabs/aws-checksums>
>     https://github.com/awslabs/aws-c-http <https://github.com/awslabs/aws-c-http>
>     https://github.com/awslabs/aws-c-io <https://github.com/awslabs/aws-c-io>
>     https://github.com/awslabs/aws-c-mqtt <https://github.com/awslabs/aws-c-mqtt>
>     https://github.com/awslabs/aws-c-s3 <https://github.com/awslabs/aws-c-s3>
>     https://github.com/awslabs/aws-c-sdkutils
>     <https://github.com/awslabs/aws-c-sdkutils>
>     https://github.com/awslabs/aws-lc <https://github.com/awslabs/aws-lc>
>     https://github.com/aws/s2n-tls <https://github.com/aws/s2n-tls>
> 
>     You will then probably need to modify the setup.py file
>     (https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py
>     <https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py>) so that
>     instead of using the cmake build functions have it use the system versions
>     of these libraries pre-installed via the buildroot cmake infrastructure.
> 
>     You can probably use and check for an env variable such as this in the setup.py:
>     PYTHON_AWSCRT_USE_SYSTEM_CRT=1
> 
>     When present have it disable building the cmake libraries itself and search
>     for the installed system crt libraries instead of using the vendored
>     cmake build.
> 
>     You should upstream this setup.py functionality to the aws-crt-project as well
>     so that we don't need to carry a patch in buildroot for python-awscrt to use
>     the system crt libraries.
> 
>     Then from the python-awscrt buildroot package you would set that env
>     variable and add all the cmake subprojects as buildroot package dependencies.
> 
>     First thing you should start with is adding the cmake buildroot packages for
>     the crt subprojects to buildroot then work on modifying aws-crt-python to
>     work correctly with them instead of trying to use its broken cmake setuptools
>     wrapper.
> 
>      >
>      > Thanks in advance
>      >
>      > On Thu, 9 Feb 2023 at 10:28, Sourabh Hegde <hrsourabh011@gmail.com
>     <mailto:hrsourabh011@gmail.com>> wrote:
>      >>
>      >> Hi Maxim,
>      >>
>      >> I was missing python setuptools on my host. After installing it, I can
>     add the package. Also, the added package is available in menuconfig
>      >>
>      >> Thank you for the support!
>      >>
>      >> On Thu, 9 Feb 2023 at 10:10, Maxim Kochetkov <fido_max@inbox.ru
>     <mailto:fido_max@inbox.ru>> wrote:
>      >>>
>      >>>
>      >>>
>      >>> On 09.02.2023 12:03, Sourabh Hegde wrote:
>      >>> > Hello Maxim,
>      >>> >
>      >>> > Update:
>      >>> >
>      >>> > The above issue resolved by itself!
>      >>> >
>      >>> > Now when I do: utils/scanpypi awscrt -o package , it says
>      >>> >
>      >>> > spdx_lookup module is not installed. This can lead to an inaccurate
>      >>> > licence detection. Please install it via
>      >>> > pip install spdx_lookup
>      >>> > buildroot package name for awscrt: python-awscrt
>      >>> > Package: python-awscrt
>      >>> > Fetching package awscrt
>      >>> > ERROR: Could not find package awscrt.
>      >>> > Check syntax inside the python package index:
>      >>> > https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>
>     <https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>>
>      >>> >
>      >>> > But the package is available at https://pypi.org/project/awscrt/
>     <https://pypi.org/project/awscrt/>
>      >>> > <https://pypi.org/project/awscrt/ <https://pypi.org/project/awscrt/>>
>      >>>
>      >>> It works fine for me:
>      >>>
>      >>> buildroot package name for awscrt: python-awscrt
>      >>> Package: python-awscrt
>      >>> Fetching package awscrt
>      >>> Downloading package awscrt from
>      >>>
>     https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz. <https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz.>..
>      >>> Checking if package package/python-awscrt already exists...
>      >>> Creating package/python-awscrt/python-awscrt.mk...
>      >>> More than one file found for license: LICENSE, crt/aws-c-common/LICENSE,
>      >>> crt/aws-c-io/LICENSE, crt/aws-lc/LICENSE,
>      >>> crt/aws-lc/third_party/fiat/LICENSE, crt/aws-c-mqtt/LICENSE,
>      >>> crt/aws-checksums/LICENSE, crt/aws-c-s3/LICENSE,
>      >>> crt/aws-c-compression/LICENSE, crt/aws-c-http/LICENSE,
>      >>> crt/aws-c-sdkutils/LICENSE, crt/s2n/LICENSE, crt/aws-c-cal/LICENSE,
>      >>> crt/aws-c-auth/LICENSE, crt/aws-c-event-stream/LICENSE
>      >>> Creating package/python-awscrt/python-awscrt.hash...
>      >>> Creating package/python-awscrt/Config.in...
>      >>> NOTE: Remember to also make an update to the DEVELOPERS file
>      >>>        and include an entry for the pkg in packages/Config.in
>      >>>
>      > _______________________________________________
>      > buildroot mailing list
>      > buildroot@buildroot.org <mailto:buildroot@buildroot.org>
>      > https://lists.buildroot.org/mailman/listinfo/buildroot
>     <https://lists.buildroot.org/mailman/listinfo/buildroot>
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Buildroot] How to install custom sdk in buildroot?
  2023-02-14 20:55                           ` Arnout Vandecappelle
@ 2023-02-14 21:22                             ` Sourabh Hegde
  0 siblings, 0 replies; 16+ messages in thread
From: Sourabh Hegde @ 2023-02-14 21:22 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Maxim Kochetkov, James Hilliard, Ramon Crichlow, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 13961 bytes --]

Hello Arnout,

Thanks for the update.

On Tue, 14 Feb 2023 at 21:56, Arnout Vandecappelle <arnout@mind.be> wrote:

>
>
> On 14/02/2023 08:27, Sourabh Hegde wrote:
> > Hello James,
> >
> > Thanks for the update.
> >
> > awscrt also has precompiled wheels <
> https://pypi.org/project/awscrt/#files> such
> > as
> awscrt-0.16.10-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
> >
> > Can Buildroot use them instead of cross compiling?
>
>   If cross-compiling is difficult, it's fairly likely that there are many
> cases
> where the binary wheel won't work either. Therefore, no, we (probably)
> can't use
> them.
>
> > If not, is it possible
> > to extract it and install manually?
>
>   You can do that in a post-build script. It's going to be something that
> is
> tested in your specific use case only, so not something that we would
> support
> upstream.
>
>   A wheel file is actually a zip file, so you just need to unzip it in the
> site_packages directory. And test if it works, of course.
>

To understand it correctly, should I unzip the wheel file into
"/target/lib/python3.10/site-packages/" after the make?

But, this "awscrt" is the dependency for https://pypi.org/project/awsiotsdk/
 https://github.com/aws/aws-iot-device-sdk-python-v2#installation-issues
And now how can I select this dependency during build?


>
>   Regards,
>   Arnout
>
> >
> > Thanks in advance
> >
> > On Thu, 9 Feb 2023 at 21:12, James Hilliard <james.hilliard1@gmail.com
> > <mailto:james.hilliard1@gmail.com>> wrote:
> >
> >     On Thu, Feb 9, 2023 at 5:10 AM Sourabh Hegde <hrsourabh011@gmail.com
> >     <mailto:hrsourabh011@gmail.com>> wrote:
> >      >
> >      > Hello Maxim,
> >      >
> >      > While doing make with new Buildroot-packages I getting:
> >      >
> >      > [ 51%] Building ASM object
> >     aws-lc/crypto/CMakeFiles/crypto_objects.dir/hrss/asm/poly_rq_mul.S.o
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:
> Assembler messages:
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:304:
> Error: unknown pseudo-op: `.att_syntax'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:307:
> Error: unknown mnemonic `push' -- `push %rbp'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:309:
> Error: bad register expression
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:310:
> Error: unknown mnemonic `movq' -- `movq %rsp,%rbp'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:311:
> Error: bad register expression
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:312:
> Error: unknown mnemonic `push' -- `push %r12'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:313:
> Error: bad register expression
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:321:
> Error: operand 1 must be an integer register -- `mov %rcx,%r8'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:322:
> Error: unknown mnemonic `addq' -- `addq $6144+12288+512+9408+32,%r8'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:323:
> Error: operand 1 must be an integer register -- `mov %r8,%rax'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:324:
> Error: unknown mnemonic `subq' -- `subq $6144,%r8'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:325:
> Error: operand 1 must be an integer register -- `mov %r8,%r11'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:326:
> Error: unknown mnemonic `subq' -- `subq $12288,%r8'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:327:
> Error: operand 1 must be an integer register -- `mov %r8,%r12'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:328:
> Error: unknown mnemonic `subq' -- `subq $512,%r8'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:329:
> Error: unknown mnemonic `vmovdqa' -- `vmovdqa const3(%rip),%ymm3'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:330:
> Error: unknown mnemonic `vmovdqu' -- `vmovdqu 0(%rsi),%ymm0'
> >      >
> >
>  /home/amazone/output/build/python-awscrt-0.16.10/crt/aws-lc/crypto/hrss/asm/poly_rq_mul.S:331:
> Error: unknown mnemonic `vmovdqu' -- `vmovdqu 88(%rsi),%ymm1'
> >      > .
> >      > .
> >      > .
> >      > Any idea what it is complaining about?
> >
> >     The problem here is that while the python awscrt package uses
> setuptools
> >     it's not a normal python setuptools package, the setup.py installs
> both a normal
> >     setuptools package and a vendored cmake package(meta package really).
> >
> >     See cmake build wrapper functionality here in the setuptools
> setup.py file:
> >
> https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py#L156-L272
> >     <
> https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py#L156-L272
> >
> >
> >     This is the cmake meta project root which is vendored inside of
> awscrt:
> >     https://github.com/awslabs/aws-crt-python/tree/v0.16.10/crt
> >     <https://github.com/awslabs/aws-crt-python/tree/v0.16.10/crt>
> >
> >     See meta cmakelists build:
> >
> https://github.com/awslabs/aws-crt-python/blob/v0.16.10/crt/CMakeLists.txt
> >     <
> https://github.com/awslabs/aws-crt-python/blob/v0.16.10/crt/CMakeLists.txt
> >
> >
> >     This meta project is made up of multiple subprojects:
> >     aws-c-auth
> >     aws-c-cal
> >     aws-c-common
> >     aws-c-compression
> >     aws-c-event-stream
> >     aws-checksums
> >     aws-c-http
> >     aws-c-io
> >     aws-c-mqtt
> >     aws-c-s3
> >     aws-c-sdkutils
> >     aws-lc
> >     s2n
> >
> >     In buildroot we expect cmake packages to use our cmake infrastructure
> >     as it will set up the cross compilation environment correctly while
> the
> >     awscrt setuptools cmake wrapper does not.
> >
> >     I confirmed that the cmake packages build correctly when using our
> >     cmake infrastructure:
> >
>  ################################################################################
> >     #
> >     # python-awscrt
> >     #
> >
>  ################################################################################
> >
> >     PYTHON_AWSCRT_VERSION = 0.16.10
> >     PYTHON_AWSCRT_SOURCE = awscrt-$(PYTHON_AWSCRT_VERSION).tar.gz
> >     PYTHON_AWSCRT_SITE =
> >
> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2
> <
> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2
> >
> >     PYTHON_AWSCRT_SUBDIR = crt
> >
> >     $(eval $(cmake-package))
> >
> >     See:
> >
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
> <
> https://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages
> >
> >
> >     So what I think you need to do is create buildroot cmake packages
> for all
> >     these subprojects using buildroot's cmake infrastructure:
> >     https://github.com/awslabs/aws-c-auth <
> https://github.com/awslabs/aws-c-auth>
> >     https://github.com/awslabs/aws-c-cal <
> https://github.com/awslabs/aws-c-cal>
> >     https://github.com/awslabs/aws-c-common
> >     <https://github.com/awslabs/aws-c-common>
> >     https://github.com/awslabs/aws-c-compression
> >     <https://github.com/awslabs/aws-c-compression>
> >     https://github.com/awslabs/aws-c-event-stream
> >     <https://github.com/awslabs/aws-c-event-stream>
> >     https://github.com/awslabs/aws-checksums
> >     <https://github.com/awslabs/aws-checksums>
> >     https://github.com/awslabs/aws-c-http <
> https://github.com/awslabs/aws-c-http>
> >     https://github.com/awslabs/aws-c-io <
> https://github.com/awslabs/aws-c-io>
> >     https://github.com/awslabs/aws-c-mqtt <
> https://github.com/awslabs/aws-c-mqtt>
> >     https://github.com/awslabs/aws-c-s3 <
> https://github.com/awslabs/aws-c-s3>
> >     https://github.com/awslabs/aws-c-sdkutils
> >     <https://github.com/awslabs/aws-c-sdkutils>
> >     https://github.com/awslabs/aws-lc <https://github.com/awslabs/aws-lc
> >
> >     https://github.com/aws/s2n-tls <https://github.com/aws/s2n-tls>
> >
> >     You will then probably need to modify the setup.py file
> >     (https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py
> >     <https://github.com/awslabs/aws-crt-python/blob/v0.16.10/setup.py>)
> so that
> >     instead of using the cmake build functions have it use the system
> versions
> >     of these libraries pre-installed via the buildroot cmake
> infrastructure.
> >
> >     You can probably use and check for an env variable such as this in
> the setup.py:
> >     PYTHON_AWSCRT_USE_SYSTEM_CRT=1
> >
> >     When present have it disable building the cmake libraries itself and
> search
> >     for the installed system crt libraries instead of using the vendored
> >     cmake build.
> >
> >     You should upstream this setup.py functionality to the
> aws-crt-project as well
> >     so that we don't need to carry a patch in buildroot for
> python-awscrt to use
> >     the system crt libraries.
> >
> >     Then from the python-awscrt buildroot package you would set that env
> >     variable and add all the cmake subprojects as buildroot package
> dependencies.
> >
> >     First thing you should start with is adding the cmake buildroot
> packages for
> >     the crt subprojects to buildroot then work on modifying
> aws-crt-python to
> >     work correctly with them instead of trying to use its broken cmake
> setuptools
> >     wrapper.
> >
> >      >
> >      > Thanks in advance
> >      >
> >      > On Thu, 9 Feb 2023 at 10:28, Sourabh Hegde <
> hrsourabh011@gmail.com
> >     <mailto:hrsourabh011@gmail.com>> wrote:
> >      >>
> >      >> Hi Maxim,
> >      >>
> >      >> I was missing python setuptools on my host. After installing it,
> I can
> >     add the package. Also, the added package is available in menuconfig
> >      >>
> >      >> Thank you for the support!
> >      >>
> >      >> On Thu, 9 Feb 2023 at 10:10, Maxim Kochetkov <fido_max@inbox.ru
> >     <mailto:fido_max@inbox.ru>> wrote:
> >      >>>
> >      >>>
> >      >>>
> >      >>> On 09.02.2023 12:03, Sourabh Hegde wrote:
> >      >>> > Hello Maxim,
> >      >>> >
> >      >>> > Update:
> >      >>> >
> >      >>> > The above issue resolved by itself!
> >      >>> >
> >      >>> > Now when I do: utils/scanpypi awscrt -o package , it says
> >      >>> >
> >      >>> > spdx_lookup module is not installed. This can lead to an
> inaccurate
> >      >>> > licence detection. Please install it via
> >      >>> > pip install spdx_lookup
> >      >>> > buildroot package name for awscrt: python-awscrt
> >      >>> > Package: python-awscrt
> >      >>> > Fetching package awscrt
> >      >>> > ERROR: Could not find package awscrt.
> >      >>> > Check syntax inside the python package index:
> >      >>> > https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>
> >     <https://pypi.python.org/pypi/ <https://pypi.python.org/pypi/>>
> >      >>> >
> >      >>> > But the package is available at
> https://pypi.org/project/awscrt/
> >     <https://pypi.org/project/awscrt/>
> >      >>> > <https://pypi.org/project/awscrt/ <
> https://pypi.org/project/awscrt/>>
> >      >>>
> >      >>> It works fine for me:
> >      >>>
> >      >>> buildroot package name for awscrt: python-awscrt
> >      >>> Package: python-awscrt
> >      >>> Fetching package awscrt
> >      >>> Downloading package awscrt from
> >      >>>
> >
> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz.
> <
> https://files.pythonhosted.org/packages/ae/98/dda092078f2d47bad08e184ab9d364b8f89166497062bc1cf811c0bbbde2/awscrt-0.16.10.tar.gz
> .>..
> >      >>> Checking if package package/python-awscrt already exists...
> >      >>> Creating package/python-awscrt/python-awscrt.mk...
> >      >>> More than one file found for license: LICENSE,
> crt/aws-c-common/LICENSE,
> >      >>> crt/aws-c-io/LICENSE, crt/aws-lc/LICENSE,
> >      >>> crt/aws-lc/third_party/fiat/LICENSE, crt/aws-c-mqtt/LICENSE,
> >      >>> crt/aws-checksums/LICENSE, crt/aws-c-s3/LICENSE,
> >      >>> crt/aws-c-compression/LICENSE, crt/aws-c-http/LICENSE,
> >      >>> crt/aws-c-sdkutils/LICENSE, crt/s2n/LICENSE,
> crt/aws-c-cal/LICENSE,
> >      >>> crt/aws-c-auth/LICENSE, crt/aws-c-event-stream/LICENSE
> >      >>> Creating package/python-awscrt/python-awscrt.hash...
> >      >>> Creating package/python-awscrt/Config.in...
> >      >>> NOTE: Remember to also make an update to the DEVELOPERS file
> >      >>>        and include an entry for the pkg in packages/Config.in
> >      >>>
> >      > _______________________________________________
> >      > buildroot mailing list
> >      > buildroot@buildroot.org <mailto:buildroot@buildroot.org>
> >      > https://lists.buildroot.org/mailman/listinfo/buildroot
> >     <https://lists.buildroot.org/mailman/listinfo/buildroot>
> >
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>

[-- Attachment #1.2: Type: text/html, Size: 23450 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-02-14 21:22 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 16:07 [Buildroot] How to install custom sdk in buildroot? Sourabh Hegde
2023-02-08 16:14 ` Ramon Crichlow
2023-02-08 18:19   ` Sourabh Hegde
2023-02-08 20:07     ` Maxim Kochetkov via buildroot
2023-02-08 21:28       ` Sourabh Hegde
2023-02-09  5:35         ` Maxim Kochetkov via buildroot
2023-02-09  8:14           ` Sourabh Hegde
2023-02-09  8:58             ` Maxim Kochetkov via buildroot
2023-02-09  9:03               ` Sourabh Hegde
2023-02-09  9:10                 ` Maxim Kochetkov
2023-02-09  9:28                   ` Sourabh Hegde
2023-02-09 12:09                     ` Sourabh Hegde
2023-02-09 20:12                       ` James Hilliard
2023-02-14  7:27                         ` Sourabh Hegde
2023-02-14 20:55                           ` Arnout Vandecappelle
2023-02-14 21:22                             ` Sourabh Hegde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.