public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Error building Python
@ 2019-04-29  4:25 phlamorim
  2019-04-29 16:54 ` [edk2-devel] " Leif Lindholm
  0 siblings, 1 reply; 5+ messages in thread
From: phlamorim @ 2019-04-29  4:25 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]

I want to use python to prototype some UEFI applications, but the build
is not working on my environment, im trying to build in a linux(debian)
which have "gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516" installed, the
EDK2 is properly installed, i build other packages like OVMF and Mde*,
at the first time i tried to build Python just uncommenting
"AppPkg/Applications/Python/PythonCore.inf" the build stopped because
some compiler warnings which are stopping the building bcause the flag
-Werror, so i changed the file tools_def.txt to remove the -Werror flag,
the warnings dont stopped the build, i probably should fix the warnings
one by one, but when i tried to build again the build system stopped at
target
'/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll',
i will leave the entire error message following this message, let me
know if i need to provide another/more information.

--
pymath.obj (symbol from plugin): In function `_Py_get_387controlword':
(.text+0x0): multiple definition of `copysign'
s_copysign.obj (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
GNUmakefile:583: recipe for target
'/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll'
failed
make: ***
[/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll]
Error 1

build.py...
 : error 7000: Failed to execute command
        make tbuild
[/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore]

build.py...
 : error F002: Failed to build module
       
/root/projeto_final/src/edk2/AppPkg/Applications/Python/PythonCore.inf
[X64, GCC5, DEBUG]

- Failed -
Build end time: 06:56:21, Apr.28 2019
Build total time: 00:05:32
--

Thanks,
Paulo Amorim

[-- Attachment #2: Type: text/html, Size: 2209 bytes --]

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

* Re: [edk2-devel] Error building Python
  2019-04-29  4:25 Error building Python phlamorim
@ 2019-04-29 16:54 ` Leif Lindholm
  2019-04-30 16:36   ` Carsey, Jaben
  0 siblings, 1 reply; 5+ messages in thread
From: Leif Lindholm @ 2019-04-29 16:54 UTC (permalink / raw)
  To: devel, phlamorim; +Cc: Daryl McDaniel, Jaben Carsey

+AppPkg maintainers

On Sun, Apr 28, 2019 at 09:25:28PM -0700, phlamorim@riseup.net wrote:
> I want to use python to prototype some UEFI applications, but the build
> is not working on my environment, im trying to build in a linux(debian)
> which have "gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516" installed, the
> EDK2 is properly installed, i build other packages like OVMF and Mde*,
> at the first time i tried to build Python just uncommenting
> "AppPkg/Applications/Python/PythonCore.inf" the build stopped because
> some compiler warnings which are stopping the building bcause the flag
> -Werror, so i changed the file tools_def.txt to remove the -Werror flag,
> the warnings dont stopped the build, i probably should fix the warnings
> one by one, but when i tried to build again the build system stopped at
> target
> '/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll',
> i will leave the entire error message following this message, let me
> know if i need to provide another/more information.
> 
> --
> pymath.obj (symbol from plugin): In function `_Py_get_387controlword':
> (.text+0x0): multiple definition of `copysign'
> s_copysign.obj (symbol from plugin):(.text+0x0): first defined here
> collect2: error: ld returned 1 exit status
> GNUmakefile:583: recipe for target
> '/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll'
> failed
> make: ***
> [/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll]
> Error 1
> 
> build.py...
>  : error 7000: Failed to execute command
>         make tbuild
> [/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore]
> 
> build.py...
>  : error F002: Failed to build module
>        
> /root/projeto_final/src/edk2/AppPkg/Applications/Python/PythonCore.inf
> [X64, GCC5, DEBUG]
> 
> - Failed -
> Build end time: 06:56:21, Apr.28 2019
> Build total time: 00:05:32
> --
> 
> Thanks,
> Paulo Amorim
> 
> 
> 

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

* Re: [edk2-devel] Error building Python
  2019-04-28 14:08 phlamorim
@ 2019-04-29 21:13 ` Brian Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Brian Richardson @ 2019-04-29 21:13 UTC (permalink / raw)
  To: devel@edk2.groups.io; +Cc: phlamorim@riseup.net

Paulo:

A port of the MicroPython Interpreter for UEFI is available in edk2-staging: (MicroPythonPkg). This is a Python 3 compatible alternative for the Python 2.7 implementation in AppPkg.

Can you try this and provide feedback?

https://github.com/tianocore/tianocore.github.io/wiki/MicroPython 

Thanks ... br
---
Brian Richardson -- Director of Firmware Ecosystem Engagements
brian.richardson@intel.com -- @intel_brian
Firmware Ecosystem & Business Development, Firmware Integration & Development (FID)
https://software.intel.com/en-us/meet-the-developers/evangelists/team/brian-richardson 

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of phlamorim@riseup.net
Sent: Sunday, April 28, 2019 10:08 AM
To: devel@edk2.groups.io
Subject: [edk2-devel] Error building Python

I want to use python to prototype some UEFI applications, but the build is not working on my environment, im trying to build in a linux(debian) which have "gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516" installed, the
EDK2 is properly installed, i build other packages like OVMF and Mde*, at the first time i tried to build Python just uncommenting "AppPkg/Applications/Python/PythonCore.inf" the build stopped because some compiler warnings which are stopping the building bcause the flag -Werror, so i changed the file tools_def.txt to remove the -Werror flag, the warnings dont stopped the build, i probably should fix the warnings one by one, but when i tried to build again the build system stopped at target '/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll',
i will leave the entire error message following this message, let me know if i need to provide another/more information.

--
pymath.obj (symbol from plugin): In function `_Py_get_387controlword':
(.text+0x0): multiple definition of `copysign'
s_copysign.obj (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
GNUmakefile:583: recipe for target
'/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll'
failed
make: ***
[/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore/DEBUG/Python.dll]
Error 1


build.py...
 : error 7000: Failed to execute command
        make tbuild
[/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Applications/Python/PythonCore]


build.py...
 : error F002: Failed to build module
       
/root/projeto_final/src/edk2/AppPkg/Applications/Python/PythonCore.inf
[X64, GCC5, DEBUG]

- Failed -
Build end time: 06:56:21, Apr.28 2019
Build total time: 00:05:32
--

Thanks,
Paulo Amorim




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

* Re: [edk2-devel] Error building Python
  2019-04-29 16:54 ` [edk2-devel] " Leif Lindholm
@ 2019-04-30 16:36   ` Carsey, Jaben
  2019-04-30 20:47     ` phlamorim
  0 siblings, 1 reply; 5+ messages in thread
From: Carsey, Jaben @ 2019-04-30 16:36 UTC (permalink / raw)
  To: Leif Lindholm, devel@edk2.groups.io, phlamorim@riseup.net; +Cc: Daryl McDaniel

Paulo,

I would urge you to use the minpython instead of the AppPkg python.  The minpython is a python 3 implementation vs. this 2.7 implementation. New development should not start on a version of python that is about to go officially EOL.

That being said, I have not seed that error message before. Maybe Daryl has a better starting point.

-Jaben

> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> Sent: Monday, April 29, 2019 9:54 AM
> To: devel@edk2.groups.io; phlamorim@riseup.net
> Cc: Daryl McDaniel <edk2-lists@mc2research.org>; Carsey, Jaben
> <jaben.carsey@intel.com>
> Subject: Re: [edk2-devel] Error building Python
> Importance: High
> 
> +AppPkg maintainers
> 
> On Sun, Apr 28, 2019 at 09:25:28PM -0700, phlamorim@riseup.net wrote:
> > I want to use python to prototype some UEFI applications, but the build
> > is not working on my environment, im trying to build in a linux(debian)
> > which have "gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516" installed, the
> > EDK2 is properly installed, i build other packages like OVMF and Mde*,
> > at the first time i tried to build Python just uncommenting
> > "AppPkg/Applications/Python/PythonCore.inf" the build stopped because
> > some compiler warnings which are stopping the building bcause the flag
> > -Werror, so i changed the file tools_def.txt to remove the -Werror flag,
> > the warnings dont stopped the build, i probably should fix the warnings
> > one by one, but when i tried to build again the build system stopped at
> > target
> >
> '/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
> plications/Python/PythonCore/DEBUG/Python.dll',
> > i will leave the entire error message following this message, let me
> > know if i need to provide another/more information.
> >
> > --
> > pymath.obj (symbol from plugin): In function `_Py_get_387controlword':
> > (.text+0x0): multiple definition of `copysign'
> > s_copysign.obj (symbol from plugin):(.text+0x0): first defined here
> > collect2: error: ld returned 1 exit status
> > GNUmakefile:583: recipe for target
> >
> '/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
> plications/Python/PythonCore/DEBUG/Python.dll'
> > failed
> > make: ***
> >
> [/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
> plications/Python/PythonCore/DEBUG/Python.dll]
> > Error 1
> >
> > build.py...
> >  : error 7000: Failed to execute command
> >         make tbuild
> >
> [/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
> plications/Python/PythonCore]
> >
> > build.py...
> >  : error F002: Failed to build module
> >
> > /root/projeto_final/src/edk2/AppPkg/Applications/Python/PythonCore.inf
> > [X64, GCC5, DEBUG]
> >
> > - Failed -
> > Build end time: 06:56:21, Apr.28 2019
> > Build total time: 00:05:32
> > --
> >
> > Thanks,
> > Paulo Amorim
> >
> > 
> >

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

* Re: [edk2-devel] Error building Python
  2019-04-30 16:36   ` Carsey, Jaben
@ 2019-04-30 20:47     ` phlamorim
  0 siblings, 0 replies; 5+ messages in thread
From: phlamorim @ 2019-04-30 20:47 UTC (permalink / raw)
  To: devel, jaben.carsey; +Cc: Leif Lindholm, Daryl McDaniel, Brian Richardson

Im sending the feeback through this thread only, regards we have another
at https://edk2.groups.io/g/devel/message/39787 i believe we should keep
just this one, i read about MicroPython and the first thing i noticed is
GCC toolchain is not listed on support toolchain at the moment, but i
tried to compile anyway with the following command:
    # build -p MicroPythonPkg/MicroPythonPkg.dsc -a X64 -t GCC5

The build  finished with success, then i moved 'MicroPythonDxe.efi' and
'micropython.efi' to a fat partition to make a test using OVMF and QEMU,
the Python interpreter initialized with success too, and i just tested
basic operations like assign and basic arithmetics.

The first problem appears when i tried to use import, like in the
example of README, i tried to load 'VirtualConsoleDxe.efi' manually and
then execute 'micropython.efi' the VirtualConsoleDxe is loaded and
interpreter initialized too, but when i tried to do a "import
Lib.Uefi.uefi as uefi" the interpreter hangs and the virtual machine
rebooted.

The sockets module is not supported at the moment on MicroPython as said
on README, the application i want to make a prototype relies on network,
so i probably should build the StdLib package and try to make a
prototype with C, but its worth to notice the MicroPython is finishing
the build in current state, i want to know if sockets module will be
possible provided in a future release.

Thanks,
Paulo Amorim 

On 2019-04-30 13:36, Carsey, Jaben wrote:
> Paulo,
> 
> I would urge you to use the minpython instead of the AppPkg python. 
> The minpython is a python 3 implementation vs. this 2.7
> implementation. New development should not start on a version of
> python that is about to go officially EOL.
> 
> That being said, I have not seed that error message before. Maybe
> Daryl has a better starting point.
> 
> -Jaben
> 
>> -----Original Message-----
>> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
>> Sent: Monday, April 29, 2019 9:54 AM
>> To: devel@edk2.groups.io; phlamorim@riseup.net
>> Cc: Daryl McDaniel <edk2-lists@mc2research.org>; Carsey, Jaben
>> <jaben.carsey@intel.com>
>> Subject: Re: [edk2-devel] Error building Python
>> Importance: High
>>
>> +AppPkg maintainers
>>
>> On Sun, Apr 28, 2019 at 09:25:28PM -0700, phlamorim@riseup.net wrote:
>> > I want to use python to prototype some UEFI applications, but the build
>> > is not working on my environment, im trying to build in a linux(debian)
>> > which have "gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516" installed, the
>> > EDK2 is properly installed, i build other packages like OVMF and Mde*,
>> > at the first time i tried to build Python just uncommenting
>> > "AppPkg/Applications/Python/PythonCore.inf" the build stopped because
>> > some compiler warnings which are stopping the building bcause the flag
>> > -Werror, so i changed the file tools_def.txt to remove the -Werror flag,
>> > the warnings dont stopped the build, i probably should fix the warnings
>> > one by one, but when i tried to build again the build system stopped at
>> > target
>> >
>> '/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
>> plications/Python/PythonCore/DEBUG/Python.dll',
>> > i will leave the entire error message following this message, let me
>> > know if i need to provide another/more information.
>> >
>> > --
>> > pymath.obj (symbol from plugin): In function `_Py_get_387controlword':
>> > (.text+0x0): multiple definition of `copysign'
>> > s_copysign.obj (symbol from plugin):(.text+0x0): first defined here
>> > collect2: error: ld returned 1 exit status
>> > GNUmakefile:583: recipe for target
>> >
>> '/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
>> plications/Python/PythonCore/DEBUG/Python.dll'
>> > failed
>> > make: ***
>> >
>> [/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
>> plications/Python/PythonCore/DEBUG/Python.dll]
>> > Error 1
>> >
>> > build.py...
>> >  : error 7000: Failed to execute command
>> >         make tbuild
>> >
>> [/root/projeto_final/src/edk2/Build/AppPkg/DEBUG_GCC5/X64/AppPkg/Ap
>> plications/Python/PythonCore]
>> >
>> > build.py...
>> >  : error F002: Failed to build module
>> >
>> > /root/projeto_final/src/edk2/AppPkg/Applications/Python/PythonCore.inf
>> > [X64, GCC5, DEBUG]
>> >
>> > - Failed -
>> > Build end time: 06:56:21, Apr.28 2019
>> > Build total time: 00:05:32
>> > --
>> >
>> > Thanks,
>> > Paulo Amorim
>> >
>> >
>> >
> 
> 

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

end of thread, other threads:[~2019-04-30 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-29  4:25 Error building Python phlamorim
2019-04-29 16:54 ` [edk2-devel] " Leif Lindholm
2019-04-30 16:36   ` Carsey, Jaben
2019-04-30 20:47     ` phlamorim
  -- strict thread matches above, loose matches on Subject: below --
2019-04-28 14:08 phlamorim
2019-04-29 21:13 ` [edk2-devel] " Brian Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox