On Wed, Apr 29, 2009 at 10:19 AM, Lisandro Dalcin <span dir="ltr"><<a href="mailto:dalcinl@gmail.com">dalcinl@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Today I had a hard time helping a student trying to build PETSc on a<br>
Ubuntu box he has at home... For some unknow reason, the configure<br>
step let pass '-PIC' as a valid GCC flag... The relevant parts of the<br>
configure log are shown below... (the <...> represent uninteresting<br>
output)<br>
<br>
TEST checkPIC from<br>
config.setCompilers(/home/nisi/petsc-3.0.0-p5/config/BuildSystem/config/setCompilers.py:807)<br>
TESTING: checkPIC from<br>
config.setCompilers(config/BuildSystem/config/setCompilers.py:807)<br>
  Determine the PIC option for each compiler<br>
       - There needs to be a test that checks that the functionality<br>
is actually working<br>
        Pushing language C<br>
      Trying C compiler flag -PIC<br>
<.....><br>
sh: gcc  -o conftest  -PIC    conftest.o<br>
Executing: gcc  -o conftest  -PIC    conftest.o<br>
sh:<br>
Possible ERROR while running linker: gcc: no se reconoce la opción '-PIC'<br>
 output: error message = {gcc: no se reconoce la opción '-PIC'<br>
}<br>
<.....><br>
        Valid C linker flag -PIC<br>
      Adding C compiler flag -PIC<br>
sh: gcc -c -o conftest.o  -PIC   conftest.c<br>
Executing: gcc -c -o conftest.o  -PIC   conftest.c<br>
sh:<br>
Possible ERROR while running compiler: error message = {gcc: no se<br>
reconoce la opción '-PIC'<br>
}<br>
<.....><br>
Added C compiler flag -PIC<br>
<br>
What's going on?? My guess was that BuildSystem is not prepared for<br>
Spanish words :-)</blockquote><div><br>What a good guess this is exactly right. I will patch BuildSystem-dev now.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I asked the guy to start the whole process again, but this time begin doing:<br>
<br>
$ export LANG=en_US.UTF-8<br>
<br>
and now things worked out of the box...<br>
<br>
Is this  issue documented somewhere? There is anything we can do to<br>
improve this? What is the minimal Python version BuildSystem should<br>
require? Scanning stdout/stderr for guessing failures is really<br>
fragile...</blockquote><div><br>You would think, but its not nearly as fragile as trusting a stupid compiler. Compiler<br>people are the most stubborn jackasses in computing. They refuse to consider anything<br>but<br><br>
  1) command line input<br><br>  2) screen message output<br><br>Why bother with APIs when you can have text? No compiler that I know of produces<br>error codes for warnings, including gcc, so we have no way other than scanning the<br>
output to determine what options are valid (certainly not an interface call for this).<br>After working on this stuff for a few years, I really really hate people who build compilers.<br>Some more than others, but all of them are bad.<br>
<br> Thanks for letting me have my rant time this morning,<br> <br>   Matt<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font color="#888888"><br>

--<br>
Lisandro Dalcín<br>
---------------<br>
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)<br>
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)<br>
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)<br>
PTLC - Güemes 3450, (3000) Santa Fe, Argentina<br>
Tel/Fax: +54-(0)342-451.1594<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>