It's likely to be a python version issue. I have 'Python 2.6.5' on my Linux distribution.
Leif, I think you add a similar issue once on your system. Maybe you were using Python 3.x.
-----Original Message----- From: linaro-uefi-bounces@lists.linaro.org [mailto:linaro-uefi- bounces@lists.linaro.org] On Behalf Of Leif Lindholm Sent: 20 October 2014 16:09 To: Linaro UEFI; Olivier Brunel Subject: [Linaro-uefi] Fwd: Building UEFI (14.09)
Hi Olivier,
Not sure. What is your build environment?
And what did you do to be able to build BaseTools?
/ Leif
---------- Forwarded message ---------- From: Olivier Brunel Olivier.Brunel@synopsys.com Date: 17 October 2014 17:11 Subject: RE: Building UEFI (14.09) To: Leif Lindholm leif.lindholm@linaro.org
Hi, Well OK now I manage to build using this command: make -C BaseTools
Now the problem I have is that it cannot compile Tests. This directory is added to SUBDIRS in GNUmakefile under BaseTools and I can't compile it.
I am using the tag 'linaro-edk2-2014.09'.
I have traces like: FAIL: test_build_build (CheckPythonSyntax.Tests)
Traceback (most recent call last): File "/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm- base/software/Vanilla-Cortex-Test/uefi-image-linaro-edk2- 2014.09/BaseTools/Tests/CheckPythonSyntax.py", line 55, in <lambda> newmethod = lambda self: self.SingleFileTest(filename) File "/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm- base/software/Vanilla-Cortex-Test/uefi-image-linaro-edk2- 2014.09/BaseTools/Tests/CheckPythonSyntax.py", line 33, in SingleFileTest self.fail('syntax error: %s, Error is %s' % (filename, str(e))) AssertionError: syntax error: /localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm- base/software/Vanilla-Cortex-Test/uefi-image-linaro-edk2- 2014.09/BaseTools/Source/Python/build/build.py, Error is File "/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm- base/software/Vanilla-Cortex-Test/uefi-image-linaro-edk2- 2014.09/BaseTools/Source/Python/build/build.py", line 677 class PeImageInfo(): ^ SyntaxError: invalid syntax
Ran 247 tests in 0.950s
FAILED (failures=37) make[1]: Leaving directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm- base/software/Vanilla-Cortex-Test/uefi-image-linaro-edk2- 2014.09/BaseTools/Tests' make: Leaving directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm- base/software/Vanilla-Cortex-Test/uefi-image-linaro-edk2- 2014.09/BaseTools' -build/uefi-image> build -a ARM -b DEBUG -t GCC48 -p ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA5s.dsc -D EDK2_ARMVE_STANDALONE=1 File "/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm- base/software/Vanilla-Cortex-Test/uefi-image-linaro-edk2- 2014.09/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build .py", line 677 class PeImageInfo(): ^ SyntaxError: invalid syntax
Any idea where this could come from? I have made some research on the internet but nothing maybe I miss something...
Thanks, Olivier
-----Original Message----- From: Leif Lindholm [mailto:leif.lindholm@linaro.org] Sent: Thursday, October 16, 2014 5:11 PM To: Olivier Brunel Subject: Re: Building UEFI (14.09)
Hi Olivier,
Adding linaro-uefi list to cc. Comments inline.
On 16 October 2014 16:03, Olivier Brunel Olivier.Brunel@synopsys.com wrote:
Hi there,
I have been on this page:
https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build
and tried to build the hard way UEFI:
# Get Linaro UEFI sources from git.
$ git clone git://git.linaro.org/uefi/linaro-edk2.git
$ cd linaro-edk2
$ git checkout master
# Set up UEFI build environment.
$. edksetup.sh
$ make -C BaseTools
When I try the last line of this $ make -C BaseTools I have the following trace:
sh-3.2$ make -C BaseTools/
make: Entering directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm-
base/software/Vanilla-Cortex-Test/linaro-edk2/edk2-linaro-edk2- 0.1+git26+20140926+9e6f69e/BaseTools'
make -C Source/C
Attempting to detect ARCH from 'uname -m': x86_64
Detected ARCH of X64 using uname.
make[1]: Entering directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm-
base/software/Vanilla-Cortex-Test/linaro-edk2/edk2-linaro-edk2- 0.1+git26+20140926+9e6f69e/BaseTools/Source/C'
mkdir -p .
make -C Common
make[2]: Entering directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm-
base/software/Vanilla-Cortex-Test/linaro-edk2/edk2-linaro-edk2- 0.1+git26+20140926+9e6f69e/BaseTools/Source/C/Common'
mkdir ../libs
gcc -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/ BasePeCoff.c -o
BasePeCoff.o
BasePeCoff.c: In function 'PeCoffLoaderGetPeHeader':
BasePeCoff.c:149:49: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
BasePeCoff.c:149:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c: In function 'PeCoffLoaderImageAddress':
BasePeCoff.c:581:10: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c: In function 'PeCoffLoaderRelocateImage':
BasePeCoff.c:647:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:700:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:709:17: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:715:51: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
BasePeCoff.c:715:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:729:19: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:736:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:737:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:775:35: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
BasePeCoff.c:775:35: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
BasePeCoff.c:775:35: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c: In function 'PeCoffLoaderLoadImage':
BasePeCoff.c:942:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:945:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:950:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:963:29: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:966:25: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:968:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1006:26: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1006:15: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1007:26: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1007:15: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1063:51: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1121:20: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1144:36: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c: In function 'PeCoffLoaderGetPdbPointer':
BasePeCoff.c:1264:43: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1264:16: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1285:60: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1285:24: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1355:24: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1354:24: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1385:37: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1384:36: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c: In function 'PeCoffLoaderGetEntryPoint':
BasePeCoff.c:1433:43: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1433:16: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1446:20: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1447:28: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1447:19: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1450:19: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1452:22: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1454:22: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
BasePeCoff.c:1456:35: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1456:56: error: cast from pointer to integer of
different
size [-Werror=pointer-to-int-cast]
BasePeCoff.c:1456:19: error: cast to pointer from integer of
different
size [-Werror=int-to-pointer-cast]
cc1: all warnings being treated as errors
make[2]: *** [BasePeCoff.o] Error 1
make[2]: Leaving directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm-
base/software/Vanilla-Cortex-Test/linaro-edk2/edk2-linaro-edk2- 0.1+git26+20140926+9e6f69e/BaseTools/Source/C/Common'
make[1]: *** [Common] Error 2
make[1]: Leaving directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm-
base/software/Vanilla-Cortex-Test/linaro-edk2/edk2-linaro-edk2- 0.1+git26+20140926+9e6f69e/BaseTools/Source/C'
make: *** [Source/C] Error 2
make: Leaving directory `/localdev/obrunel/obrunel_armvdk_stormcs315/j-liv-arm-
base/software/Vanilla-Cortex-Test/linaro-edk2/edk2-linaro-edk2- 0.1+git26+20140926+9e6f69e/BaseTools'
I have noticed that you have edited the document last, can you tell
me
if you have had this kind of error as well?
So, I think I might have seen this at some point, but I'm not getting it now. Could your gcc be defaulting to 32-bit or something?
/ Leif
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-uefi