[edk2] Some errors in building edk2 on linux

Subject: [edk2] Some errors in building edk2 on linux

From: austinro@msu.edu

To: edk2-devel@lists.sourceforge.net

Date: 2010-06-04 09:28:21

Hi, I'm a "Google Summer of Code" student, and my project is to get TianoCore working well as a coreboot payload. I'm trying to follow the "step-by-step" instructions for UNIX-like systems, and have run into a few problems.
First, I'm doing this on two systems, a 64-bit Ubuntu 10.04 and a 64-bit Fedora 13.

When doing it on Fedora 13, I had to add libuuid-devel to get BaseTools to compile (it needed uuid/uuid.h). Also, I started to follow the instructions for Fedora 11 to build mpfr-2.4.1, but that didn't work because that version is no longer available; the site has 2.4.2 up in its place. Then I thought to check the repos, and after I instaledl mpfr-devel and gmp-devel it worked fine.

When building the cross compilers (32 and 64 bit, on both systems), the builds failed because they were set to treat errors as warnings. Specifically, there were two lines in ScsiDisk.c that caused warnings: 1623 and 1747. They both read
MaxBlock = 4294967295;
and the error said something about "this decimal constant is only guaranteed to be unsigned in c99..." [sorry, I forgot to write down the exact error message].
I got past this by removing "-Werror" from line 1553 in Conf/tools_def.txt. I know it would be better to fix the underlying problem so there was no warning, but I'm not sure how.
Also, when building the ia32 cross compiler, the configuration failed because in mingw-gcc-build.py, the required filemingwrt-3.15.2-mingw32-src.tar.gz is apparently no longer available on sourceforge. I looked for it quite a bit in the mingw project files, and I don't think it exists anymore. I mean, I think whatever was in this file has been put into other files or been renamed. I can't even find an older version, at least not on sourceforge. I was able to find a copy here, and when I downloaded it separately it worked.
Maybe you should host a copy of this file yourself, so the script can always find it.
That's all.

Robert Austin