Details Ticket 4021


Comment | Reply | Take | Open


Serial Number 4021
Subject error compiling r.le.setup in cvs
Area grass6
Queue grass
Requestors steko@iosa.it
Owner none
Status resolved
Last User Contact Thu Feb 16 21:10:24 2006 (3 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Sun Feb 19 17:39:32 2006 (3 yr ago)
Created Thu Jan 19 17:25:38 2006 (3 yr ago)

Transaction History Ticket 4021


Thu, Jan 19 2006 17:25:38    Request created by guest  
Subject: error compiling r.le.setup in cvs

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: CVS checked out at 20060119

compiled from CVS with the following configure line

CFLAGS="-O3 -mtune=pentium-m -Wall" LDFLAGS="-s" ./configure --with-tcltk-includes=/usr/include/tcl8
.3
--with-postgres-includes=/usr/include/postgresql --with-sqlite --with-cxx --with-fftw
--with-freetype-includes=/usr/includes/freetype2/

after make:

Generating HTML manual pages index (help system)...
Generated HTML docs in ../dist.i686-pc-linux-gnu/docs/html/index.html
----------------------------------------------------------------------
Following modules are missing the 'description.html' file in src code:
g.pnmcomp
----------------------------------------------------------------------
GRASS GIS compilation log
-------------------------
Started compilation: gio gen 19 16:56:41 CET 2006
--
Errors in:
/home/steko/src/grass6/raster/r.le/r.le.setup
--
Finished compilation: gio gen 19 17:13:48 CET 2006
(In case of errors please change into the directory with error and run 'make')
then I followed the instructions but the make in the subdir didn't go well:
steko@cycnus:~/src/grass6/raster/r.le/r.le.setup$ make
Makefile:16: warning: overriding commands for target `clean'
../../../include/Make/Rules.make:34: warning: ignoring old commands for target
`clean'
gcc -I/home/steko/src/grass6/include -I/home/steko/src/grass6/dist.i686-pc-linux-gnu/include/grass
-O3 -mtune=pentium-m -Wall  -Wall -Wconversion -Wno-implicit-int   -I/usr/local/include
-DPACKAGE=\""grassmods"\"  -I/home/steko/src/grass6/include -I/home/steko/src/grass6/dist.i686-pc-li
nux-gnu/include/grass
\
        -o OBJ.i686-pc-linux-gnu/sample.o -c sample.c
sample.c: In function ‘sample’:
sample.c:39: warning: unused variable ‘btn’
sample.c: In function ‘man_unit’:
sample.c:554: warning: passing argument 1 of ‘G_calloc’ as unsigned due to
prototype
sample.c:555: warning: passing argument 1 of ‘G_calloc’ as unsigned due to
prototype
sample.c:121: warning: unused variable ‘wind’
sample.c:120: warning: unused variable ‘sites_mapset’
sample.c:117: warning: unused variable ‘au_l’
sample.c:117: warning: unused variable ‘au_w’
sample.c:117: warning: unused variable ‘ab’
sample.c:117: warning: unused variable ‘at’
sample.c:117: warning: unused variable ‘ar’
sample.c:117: warning: unused variable ‘al’
sample.c:115: warning: unused variable ‘itmp’
sample.c:114: warning: unused variable ‘randflag’
sample.c:114: warning: unused variable ‘t0’
sample.c:114: warning: unused variable ‘l0’
sample.c:113: warning: unused variable ‘dy’
sample.c:113: warning: unused variable ‘dx’
sample.c: In function ‘draw_grid’:
sample.c:653: warning: unused variable ‘tmp’
sample.c:653: warning: unused variable ‘itmp’
sample.c:653: warning: unused variable ‘k’
sample.c: In function ‘calc_unit_loc’:
sample.c:821: warning: suggest parentheses around assignment used as truth value
sample.c:730: warning: unused variable ‘tmp’
sample.c:729: warning: unused variable ‘k’
sample.c:727: warning: unused variable ‘region’
sample.c: In function ‘graph_unit’:
sample.c:1052: warning: unused variable ‘tmpl’
sample.c:1052: warning: unused variable ‘tmpw’
sample.c: In function ‘draw_circle’:
sample.c:1487: warning: unused variable ‘yr’
sample.c:1487: warning: unused variable ‘x2’
sample.c: In function ‘numtrap’:
sample.c:1537: warning: unused variable ‘j’
sample.c: In function ‘calc_num’:
sample.c:1013: warning: ‘max’ may be used uninitialized in this function
sample.c: In function ‘calc_unit_loc’:
sample.c:865: internal compiler error: in fold_convert, at fold-const.c:1922
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
make: *** [OBJ.i686-pc-linux-gnu/sample.o] Error 1
steko@cycnus:~/src/grass6/raster/r.le/r.le.setup$

HTH, regards

Stefano
Sun, Jan 22 2006 22:27:50    Mail sent by guest  
Stefano,

since it compiles on RHEL4 and Mandriva 2006 and Suse 9.x, I
wonder about the
'internal compiler error'. Doesn't look good to me!

On the other hand the r.le code isn't really clean.

Markus
Mon, Feb 6 2006 22:53:40    Mail sent by msieczka  
Stephano

Builds well on Ubuntu Breezy here.

Do you still experience this problem or can I close it now? Need more help?
Maciek
Tue, Feb 7 2006 10:55:54    Mail sent by steko@iosa.it  
Return-Path <steko@iosa.it>
Delivered-To grass-bugs@lists.intevation.de
Date Tue, 07 Feb 2006 10:58:08 +0100
From Stefano Costa <steko@iosa.it>
Subject Re: [bug #4021] (grass) error compiling r.le.setup in cvs
In-reply-to <20060206215340.E4CF9100159@lists.intevation.de>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Message-id <1139306288.8255.52.camel@localhost.localdomain>
MIME-version 1.0
X-Mailer Evolution 2.4.1
Content-type text/plain
Content-transfer-encoding 7bit
References <20060206215340.E4CF9100159@lists.intevation.de>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Il giorno lun, 06/02/2006 alle 22.53 +0100, Maciek Sieczka via RT ha
scritto:
> Stephano
> 
> Builds well on Ubuntu Breezy here.
> 
> Do you still experience this problem or can I close it now? Need more help?
Maciek,

I downloaded a fresh CVS right now, but it keeps giving me this problem.
It sounds odd to me, too.

This is my ./configure line:

CFLAGS="-O3 -mtune=pentium-m -Wall" LDFLAGS="-s" ./configure
--with-tcltk-includes=/usr/include/tcl8.3
--with-postgres-includes=/usr/include/postgresql --with-sqlite
--with-cxx --with-fftw --with-freetype-includes=/usr/includes/freetype2/
--with-readline

I'll try again to see if I can find some clue.

Thanks,
Stefano


Tue, Feb 7 2006 11:49:27    Mail sent by msieczka  
Stefano,

One thing I can see is taht you are propably using Gcc 4.0 ar above right?
pentium-m is not availbale in older versions.

If turn off  optimization, does that work? (NOTE: use march= instead of mtune=
if you optimise. mtune is deprecated afaik in newer GCC; and march also
implies mtune - refer to GNU GCC www).

Can you try GCC 3.4?

I on Breezy am using gcc3.4, though I have 4.0 also installed. If you have
different gcc versions installed you can choose the prefferred version by
managing symlinks in your /usr/bin (and /etc/alternatives if you have it).

What distro are you using?

Maciek
Tue, Feb 7 2006 12:38:40    Mail sent by steko@iosa.it  
Return-Path <steko@iosa.it>
Delivered-To grass-bugs@lists.intevation.de
Date Tue, 07 Feb 2006 12:41:03 +0100
From Stefano Costa <steko@iosa.it>
Subject Re: [bug #4021] (grass) error compiling r.le.setup in cvs
In-reply-to <20060207104927.C98B41005A4@lists.intevation.de>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Message-id <1139312463.8255.97.camel@localhost.localdomain>
MIME-version 1.0
X-Mailer Evolution 2.4.1
Content-type text/plain
Content-transfer-encoding 7bit
References <20060207104927.C98B41005A4@lists.intevation.de>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Il giorno mar, 07/02/2006 alle 11.49 +0100, Maciek Sieczka via RT ha
scritto:
> Stefano,
> 
> One thing I can see is taht you are propably using Gcc 4.0 ar above right?
> pentium-m is not availbale in older versions.
> 
> If turn off  optimization, does that work? (NOTE: use march= instead of mtune=
> if you optimise. mtune is deprecated afaik in newer GCC; and march also
> implies mtune - refer to GNU GCC www).
> 
> Can you try GCC 3.4?
> 
> I on Breezy am using gcc3.4, though I have 4.0 also installed. If you have
> different gcc versions installed you can choose the prefferred version by
> managing symlinks in your /usr/bin (and /etc/alternatives if you have it).
> 
> What distro are you using?
> 
> Maciek

Maciek,

I am using Ubuntu Breezy, it's up-to-date.

/usr/bin/gcc points to gcc-4.0, it's the only compiler I have
installed. I'm going to install gcc-3.4 too right now.

On GCC www I can see that `-mtune' is not deprecated, while `-mcpu' is.
I'll try the `march' option, too, however. I try to use optimization
while compiling but I'm not a programmer at all, so I just follow
step-by-step the instructions I found in GRASS and GCC docs. In fact, I
see that `-mtune' and `-march' are accepted by gcc-3.4 too:

http://gcc.gnu.org/onlinedocs/gcc-3.4.5/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Opt
ions
http://gcc.gnu.org/onlinedocs/gcc-4.0.2/gcc/i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Opt
ions
Compiling with gcc-3.4 WITHOUT optimization gives me no errors.
Compiling with gcc-3.4 WITH optimization: CFLAGS="-O3 -march=pentium-m
-Wall" LDFLAGS="-s" gives the known error in r.le.setup.

So perhaps it has something to do with the optimization options. I'll
be back from lunch in a hour, then continue to check it, but I have to
do some work for my exams too! :)

Stefano


Tue, Feb 7 2006 22:56:40    Mail sent by msieczka  
> On GCC www I can see that `-mtune' is not deprecated, while `-mcpu' is.

Sorry about that. I must have thought of -mcpu then. Note -march gives more
optimization than -mtune alone however _and_ implies -mtune.

I'm a non-programmer too. My flags on a pentium dothan pentium m based laptop,
gcc 3.4:

NOTE: propably I should be rather using pentium-m instead of pentium4, but I'm
still not 100% sure - isn't pentium-m for Banias Pentium M cpus only, not for
Dothan ones? Maybe you know?

---
export LDFLAGS="-Wl,-s -Wl,-z,combreloc -Wl,--sort-common -Wl,-O,2"

export CXXFLAGS="-march=pentium4 -O2 -mmmx -msse -msse2 -mfpmath=sse -s -pipe"
export CFLAGS="-march=pentium4 -O2 -mmmx -msse -msse2 -mfpmath=sse -s
-fomit-frame-pointer -pipe"

export FFLAGS="-march=pentium4 -O2 -mmmx -msse -msse2 -mfpmath=sse -s -pipe"
export PYTHON_OPT="-march=pentium4 -O2 -mmmx -msse -msse2 -mfpmath=sse -s
-pipe -fomit-frame-pointer"
---

I put them into a txt file, and source it when I need optimization. They will
remain set only for the current terminal session, not affecting your general
environment.

Those are the safe but stil pretty good optimization. -O3 might give opposite
effect in many cases I read. Or, as we can see, it will fail for some dirtier
code.

If you finally sort out what's the problem - gcc 4.0 alone or the -O3 with
either gcc 3.4 or 4.0 please report to grass devel list. There's been some
ongoing code cleanup, devs might be interested in this case.

Maciek
Wed, Feb 8 2006 09:21:10    Mail sent by steko@iosa.it  
Return-Path <steko@iosa.it>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 08 Feb 2006 09:23:41 +0100
From Stefano Costa <steko@iosa.it>
Subject Re: [bug #4021] (grass) error compiling r.le.setup in cvs
In-reply-to <20060207215640.BF47D1006A1@lists.intevation.de>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Message-id <1139387021.8228.15.camel@localhost.localdomain>
MIME-version 1.0
X-Mailer Evolution 2.4.1
Content-type text/plain
Content-transfer-encoding 7bit
References <20060207215640.BF47D1006A1@lists.intevation.de>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Il giorno mar, 07/02/2006 alle 22.56 +0100, Maciek Sieczka via RT ha
scritto:
> > On GCC www I can see that `-mtune' is not deprecated, while `-mcpu' is.
> 
> Sorry about that. I must have thought of -mcpu then. Note -march gives more
> optimization than -mtune alone however _and_ implies -mtune.

Yes, thanks to your advice I noticed that.

> I'm a non-programmer too. My flags on a pentium dothan pentium m based laptop,
> gcc 3.4:
> 
> NOTE: propably I should be rather using pentium-m instead of pentium4, but
I'm
> still not 100% sure - isn't pentium-m for Banias Pentium M cpus only, not for
> Dothan ones? Maybe you know?

I really never heard about Banias nor Dothan at all :(
My laptop is a Centrino, if it helps!

I figured out that it's not a 3.4 vs 4.0 issue, because compiling
without optimization flags works well with both versions. So it must be
something that has to do with the `-03 -march=pentium-m' part

I'm trying `-02 -march=pentium-m' and it gives no errors. Now I'm
double-checking again in `-03' gives that error, then I'll post it to
the grass devel list.

Thanks for your support,
Stefano


-- 
Stefano Costa
http://www.iosa.it Software Open Source per l'Archeologia
Jabber: steko@jabber.linux.it
GnuPG Key ID 1024D/0xD0D30245
Linux Registered User #385969 counter.li.org


Wed, Feb 8 2006 09:57:30    Mail sent by msieczka  
> I really never heard about Banias nor Dothan at all :(
> My laptop is a Centrino, if it helps!

There are 2 flavors of Penium M - Banias and Dothan.
Banias has 1 MB cache L2 and is more like PIII
Dothan has 2 MB cache L2 and is more like PIV, but not exactly.

Centrino is a hardware platform for laptops - a combination of severeal pieces
of hardware, Pentium M CPU among them.

The Banias Pentium M based laptop hardware platfom is called Centrino.
The Dothan Pentium M based laptop hardware platfom is called Centrino Sonoma.
That's what I know briefly, for whatever it matters.

> Now I'm double-checking again in `-03' gives that error

Good. Make sure you use only -O3 optimization _alone_ for a test - we'll be
sure then it is the culprit.

Best,
Maciek
Wed, Feb 8 2006 10:56:37    Mail sent by steko@iosa.it  
Return-Path <steko@iosa.it>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 08 Feb 2006 10:59:07 +0100
From Stefano Costa <steko@iosa.it>
Subject Re: [bug #4021] (grass) error compiling r.le.setup in cvs
In-reply-to <20060208085730.CA9F41006C5@lists.intevation.de>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Message-id <1139392747.8228.21.camel@localhost.localdomain>
MIME-version 1.0
X-Mailer Evolution 2.4.1
Content-type text/plain
Content-transfer-encoding 7bit
References <20060208085730.CA9F41006C5@lists.intevation.de>
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Il giorno mer, 08/02/2006 alle 09.57 +0100, Maciek Sieczka via RT ha
scritto:
> > Now I'm double-checking again in `-03' gives that error
> 
> Good. Make sure you use only -O3 optimization _alone_ for a test - we'll be
> sure then it is the culprit.

Right, that's it.
Compiling with `-03' alone returns the error. I'll post it to the
grass-devel list, should I? Are all our messages stored in the bug
tracker?

Best regards,
Stefano


Wed, Feb 8 2006 12:00:35    Mail sent by msieczka  
> Right, that's it.
> Compiling with `-03' alone returns the error.

Good job.

> I'll post it to the grass-devel list, should I?

Please do it.

> Are all our messages stored in > the bug tracker?

Yes. In your message put the link to our discussion:
https://intevation.de/rt/webrt?serial_num=4021

Maciek
Thu, Feb 9 2006 11:09:26    Mail sent by msieczka  
Check this:

http://gentoo-wiki.com/Talk:CFLAGS_matrix

It says -O3 implies  -frename-registers, which is claimed to be problematic -
on the same page and on http://gentoo-wiki.com/CFLAGS_matrix.

Some gcc whiz would need to express his opinion.

Maciek
Thu, Feb 9 2006 11:25:50    Mail sent by msieczka  
Check this:

http://gentoo-wiki.com/Talk:CFLAGS_matrix

It says -O3 implies  -frename-registers, which is claimed to be problematic -
on the same page and on http://gentoo-wiki.com/CFLAGS_matrix.

Some gcc whiz would need to express his opinion.

Maciek
Thu, Feb 9 2006 11:56:49    Mail sent by msieczka  
Check this:

http://gentoo-wiki.com/Talk:CFLAGS_matrix

It says -O3 implies  -frename-registers, which is claimed to be problematic -
on the same page and on http://gentoo-wiki.com/CFLAGS_matrix.

Some gcc whiz would need to express his opinion.

Maciek
Thu, Feb 16 2006 14:35:46    Mail sent by msieczka  
The author seems to have lost his interest, so I'll forward to the list.

I have confirmed the bug with today's Grass 6.1 CVS, using GCC 3.4.4, Ubuntu
Breezy.

It shows that building Grass 6.1 with -O3 optimization always leads to errors
in /home/steko/src/grass6/raster/r.le/r.le.setup


This is important because the Grass INSTALL file itself recommends using -O3:
$ cat src/straight/grass6/INSTALL | grep O3
  CFLAGS="-O3 -msse -msse2 -mfpmath=sse -minline-all-stringops" # Intel XEON
64bit processor
  CFLAGS="-O3 -mcpu=<cpu_see_above> -Wall" LDFLAGS="-s" ./configure

Even despite the error at building r.le.setup - does it really make sense for
Grass to be -O3 optimized? As far as I have read it is rather not advised to
use it...

Maciek
Thu, Feb 16 2006 14:54:33    Mail sent by steko@iosa.it  
Return-Path <steko@iosa.it>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <1140098057.43f48409018a4@cp.tophost.it>
Date Thu, 16 Feb 2006 14:54:17 +0100
From Stefano Costa <steko@iosa.it>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [bug #4021] (grass) error compiling r.le.setup in cvs
References <20060216133546.DED581005DE@lists.intevation.de>
In-Reply-To <20060216133546.DED581005DE@lists.intevation.de>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
User-Agent Internet Messaging Program (IMP) 3.2.5
X-Originating-IP 193.205.5.2
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Scrive Maciek Sieczka via RT <grass-bugs@intevation.de>:

> The author seems to have lost his interest, so I'll forward to the list.
>
> I have confirmed the bug with today's Grass 6.1 CVS, using GCC 3.4.4, Ubuntu
> Breezy.
>
> It shows that building Grass 6.1 with -O3 optimization always leads to errors
> in /home/steko/src/grass6/raster/r.le/r.le.setup

I think that, if one has the time to do some tests (I don't), it would be useful
to perform compiling with the various optimization options that -03 enables[1],
just one by one instead of using the cumulative option -03.

to see which one gives problems. In particular I can see it is frename-registers
that is likely to cause trouble, though not being that much useful.

Does William Baker[2] still participates in GRASS development?

[1]
http://gcc.gnu.org/onlinedocs/gcc-3.4.4/gcc/Optimize-Options.html#index-O3-364
[2] http://grass.itc.it/grass61/manuals/html61_user/r.le.setup.html

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Thu, Feb 16 2006 21:10:24    Mail sent by neteler@itc.it  
Return-Path <neteler@itc.it>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 16 Feb 2006 21:10:17 +0100
From Markus Neteler <neteler@itc.it>
To Maciek Sieczka via RT <grass-bugs@intevation.de>
Cc steko@iosa.it, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #4021] (grass) error compiling r.le.setup in cvs
Message-ID <20060216201017.GA31678@bartok.itc.it>
Mail-Followup-To Maciek Sieczka via RT <grass-bugs@intevation.de>, steko@iosa.it, grass5@grass.itc.it
References <20060216133546.DED581005DE@lists.intevation.de>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
In-Reply-To <20060216133546.DED581005DE@lists.intevation.de>
User-Agent Mutt/1.4.1i
X-PGP-Key http://www.gdf-hannover.de/neteler/markus_gpgkey.asc
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Maciek, Stefano,


I have changed the INSTALL file (also for 6.0.2) from
-O3 to -O2.


Thanks for pointing out the problem. I think we can close
the report now.

Markus


On Thu, Feb 16, 2006 at 02:35:46PM +0100, Maciek Sieczka via RT wrote:
> The author seems to have lost his interest, so I'll forward to the list.
> 
> I have confirmed the bug with today's Grass 6.1 CVS, using GCC 3.4.4, Ubuntu
> Breezy.
> 
> It shows that building Grass 6.1 with -O3 optimization always leads to errors
> in /home/steko/src/grass6/raster/r.le/r.le.setup
> 
> 
> This is important because the Grass INSTALL file itself recommends using -O3:
> 
> 
> $ cat src/straight/grass6/INSTALL | grep O3
>   CFLAGS="-O3 -msse -msse2 -mfpmath=sse -minline-all-stringops" # Intel XEON
> 64bit processor
>   CFLAGS="-O3 -mcpu=<cpu_see_above> -Wall" LDFLAGS="-s" ./configure
> 
> Even despite the error at building r.le.setup - does it really make sense for
> Grass to be -O3 optimized? As far as I have read it is rather not advised to
> use it...
> 
> Maciek
> 
> 
> -------------------------------------------- Managed by Request Tracker
> 
> _______________________________________________
> grass5 mailing list
> grass5@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5

-- 
Markus Neteler     <neteler itc it>       http://mpa.itc.it
ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18        -       38050 Povo (Trento), Italy


Sun, Feb 19 2006 17:39:32    Status changed to resolved by mneteler  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request