some issues with BuildSystem and LANG
Matthew Knepley
knepley at gmail.com
Wed Apr 29 10:31:30 CDT 2009
On Wed, Apr 29, 2009 at 10:19 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> Today I had a hard time helping a student trying to build PETSc on a
> Ubuntu box he has at home... For some unknow reason, the configure
> step let pass '-PIC' as a valid GCC flag... The relevant parts of the
> configure log are shown below... (the <...> represent uninteresting
> output)
>
> TEST checkPIC from
>
> config.setCompilers(/home/nisi/petsc-3.0.0-p5/config/BuildSystem/config/setCompilers.py:807)
> TESTING: checkPIC from
> config.setCompilers(config/BuildSystem/config/setCompilers.py:807)
> Determine the PIC option for each compiler
> - There needs to be a test that checks that the functionality
> is actually working
> Pushing language C
> Trying C compiler flag -PIC
> <.....>
> sh: gcc -o conftest -PIC conftest.o
> Executing: gcc -o conftest -PIC conftest.o
> sh:
> Possible ERROR while running linker: gcc: no se reconoce la opción '-PIC'
> output: error message = {gcc: no se reconoce la opción '-PIC'
> }
> <.....>
> Valid C linker flag -PIC
> Adding C compiler flag -PIC
> sh: gcc -c -o conftest.o -PIC conftest.c
> Executing: gcc -c -o conftest.o -PIC conftest.c
> sh:
> Possible ERROR while running compiler: error message = {gcc: no se
> reconoce la opción '-PIC'
> }
> <.....>
> Added C compiler flag -PIC
>
> What's going on?? My guess was that BuildSystem is not prepared for
> Spanish words :-)
What a good guess this is exactly right. I will patch BuildSystem-dev now.
>
> I asked the guy to start the whole process again, but this time begin
> doing:
>
> $ export LANG=en_US.UTF-8
>
> and now things worked out of the box...
>
> Is this issue documented somewhere? There is anything we can do to
> improve this? What is the minimal Python version BuildSystem should
> require? Scanning stdout/stderr for guessing failures is really
> fragile...
You would think, but its not nearly as fragile as trusting a stupid
compiler. Compiler
people are the most stubborn jackasses in computing. They refuse to consider
anything
but
1) command line input
2) screen message output
Why bother with APIs when you can have text? No compiler that I know of
produces
error codes for warnings, including gcc, so we have no way other than
scanning the
output to determine what options are valid (certainly not an interface call
for this).
After working on this stuff for a few years, I really really hate people who
build compilers.
Some more than others, but all of them are bad.
Thanks for letting me have my rant time this morning,
Matt
> --
> Lisandro Dalcín
> ---------------
> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
>
--
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20090429/9d635e85/attachment.html>
More information about the petsc-dev
mailing list