[GRASSLIST:10834] Bus Error in g.remove

I am using Grass 6.1CVS on Macintosh with the most recent Macintosh binaries.

g.remove gives the following error.

child killed: bus error
child killed: bus error
while executing
“exec – $cmd --tcltk”
(procedure “execute” line 4)
invoked from within
"execute g.remove "
(menu invoke)

This started quite suddenly, possibly consistent with messing with AWK post I had yesterday.

I get the same error with g.copy, g.rename but not g.list

I have reinstalled the binaries and the application.

There was a not too similar message in the archives which relates to the environmental variable file being corrupted. I cannot find this file and haven’t tried removing it.

I am at a bit of a loss on what to do.

Any help would be appreciated.

Thanks

Dave

This is probably the same bug Michael Barton reported yesterday (#4152) and I reported last August (#3585). Specifically, when GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres support. It's probably happening for you in Tiger because Lorenzo builds with Panther compatibility - either on Panther, or on Tiger using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.

It's a strange bug - I can build GRASS with GDAL without Postgres support, then update GDAL to include Postgres support and it still works. It's only when GDAL has Postgres support *at the time GRASS is built*. I've tried various combinations of static and dynamic Postgres libraries (and the exact same ones used for Postgres support in GRASS) and other options in GDAL and GRASS and GRASS with/without its own Postgres support.

On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:

I am using Grass 6.1CVS on Macintosh with the most recent Macintosh binaries.

g.remove gives the following error.

child killed: bus error
    while executing
"exec -- $cmd --tcltk"
    (procedure "execute" line 4)
    invoked from within
"execute g.remove "
    (menu invoke)

This started quite suddenly, possibly consistent with messing with AWK post I had yesterday.

I get the same error with g.copy, g.rename but not g.list

I have reinstalled the binaries and the application.

There was a not too similar message in the archives which relates to the environmental variable file being corrupted. I cannot find this file and haven't tried removing it.

I am at a bit of a loss on what to do.

Any help would be appreciated.

Thanks

Dave

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

[Trillian] What are you supposed to do WITH a maniacally depressed robot?

[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy

Thanks for the insight. I went back to the Nov 05 binaries and Janurary CVS version and things work. That will be fine for now. I guess learning how to build wouldn't be a bad thing.

Thanks for your help.

Dave

On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:

This is probably the same bug Michael Barton reported yesterday (#4152) and I reported last August (#3585). Specifically, when GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres support. It's probably happening for you in Tiger because Lorenzo builds with Panther compatibility - either on Panther, or on Tiger using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.

It's a strange bug - I can build GRASS with GDAL without Postgres support, then update GDAL to include Postgres support and it still works. It's only when GDAL has Postgres support *at the time GRASS is built*. I've tried various combinations of static and dynamic Postgres libraries (and the exact same ones used for Postgres support in GRASS) and other options in GDAL and GRASS and GRASS with/without its own Postgres support.

On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:

I am using Grass 6.1CVS on Macintosh with the most recent Macintosh binaries.

g.remove gives the following error.

child killed: bus error
    while executing
"exec -- $cmd --tcltk"
    (procedure "execute" line 4)
    invoked from within
"execute g.remove "
    (menu invoke)

This started quite suddenly, possibly consistent with messing with AWK post I had yesterday.

I get the same error with g.copy, g.rename but not g.list

I have reinstalled the binaries and the application.

There was a not too similar message in the archives which relates to the environmental variable file being corrupted. I cannot find this file and haven't tried removing it.

I am at a bit of a loss on what to do.

Any help would be appreciated.

Thanks

Dave

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

[Trillian] What are you supposed to do WITH a maniacally depressed robot?

[Marvin] You think you have problems? What are you supposed to do if you ARE a maniacally depressed robot? No, don't try and answer, I'm 50,000 times more intelligent than you and even I don't know the answer...

- HitchHiker's Guide to the Galaxy

Just a thought,

in the past weeks some code was changed to replace system calls with
their C equivalents. Maybe this has something to do with it. I can't
connect to the CVS-web interface currently to check.

Look for recent changes in:
  http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/

Hamish

On Wed, 08 Mar 2006 21:04:54 -0600
Dave Kent <dkent@sasktel.net> wrote:

Thanks for the insight. I went back to the Nov 05 binaries and
Janurary CVS version and things work. That will be fine for now. I
guess learning how to build wouldn't be a bad thing.

Thanks for your help.

Dave

On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:

> This is probably the same bug Michael Barton reported yesterday
> (#4152) and I reported last August (#3585). Specifically, when
> GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
> support. It's probably happening for you in Tiger because Lorenzo
> builds with Panther compatibility - either on Panther, or on Tiger
> using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.
>
> It's a strange bug - I can build GRASS with GDAL without Postgres
> support, then update GDAL to include Postgres support and it still
> works. It's only when GDAL has Postgres support *at the time GRASS
>
> is built*. I've tried various combinations of static and dynamic
> Postgres libraries (and the exact same ones used for Postgres
> support in GRASS) and other options in GDAL and GRASS and GRASS
> with/without its own Postgres support.
>
> On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:
>
>> I am using Grass 6.1CVS on Macintosh with the most recent
>> Macintosh binaries.
>>
>> g.remove gives the following error.
>>
>> child killed: bus error
>> child killed: bus error
>> while executing
>> "exec -- $cmd --tcltk"
>> (procedure "execute" line 4)
>> invoked from within
>> "execute g.remove "
>> (menu invoke)
>>
>> This started quite suddenly, possibly consistent with messing with
>
>> AWK post I had yesterday.
>>
>> I get the same error with g.copy, g.rename but not g.list
>>
>> I have reinstalled the binaries and the application.
>>
>> There was a not too similar message in the archives which relates
>> to the environmental variable file being corrupted. I cannot find
>> this file and haven't tried removing it.

Except that I reported this bug last August, and it happens with 6.0.1 and 6.1CVS. I haven't tried 6.0.2 yet.

On Mar 9, 2006, at 1:33 AM, Hamish wrote:

Just a thought,

in the past weeks some code was changed to replace system calls with
their C equivalents. Maybe this has something to do with it. I can't
connect to the CVS-web interface currently to check.

Look for recent changes in:
  http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/

Hamish

On Wed, 08 Mar 2006 21:04:54 -0600
Dave Kent <dkent@sasktel.net> wrote:

Thanks for the insight. I went back to the Nov 05 binaries and
Janurary CVS version and things work. That will be fine for now. I
guess learning how to build wouldn't be a bad thing.

Thanks for your help.

Dave

On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:

This is probably the same bug Michael Barton reported yesterday
(#4152) and I reported last August (#3585). Specifically, when
GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
support. It's probably happening for you in Tiger because Lorenzo
builds with Panther compatibility - either on Panther, or on Tiger
using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.

It's a strange bug - I can build GRASS with GDAL without Postgres
support, then update GDAL to include Postgres support and it still
works. It's only when GDAL has Postgres support *at the time GRASS

is built*. I've tried various combinations of static and dynamic
Postgres libraries (and the exact same ones used for Postgres
support in GRASS) and other options in GDAL and GRASS and GRASS
with/without its own Postgres support.

On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:

I am using Grass 6.1CVS on Macintosh with the most recent
Macintosh binaries.

g.remove gives the following error.

child killed: bus error
    while executing
"exec -- $cmd --tcltk"
    (procedure "execute" line 4)
    invoked from within
"execute g.remove "
    (menu invoke)

This started quite suddenly, possibly consistent with messing with

AWK post I had yesterday.

I get the same error with g.copy, g.rename but not g.list

I have reinstalled the binaries and the application.

There was a not too similar message in the archives which relates
to the environmental variable file being corrupted. I cannot find
this file and haven't tried removing it.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy

I've made those changes in mid-February this year. Could you try running the
following code and let me know what this does? Don't worry, it's like "find
dir" command.

cc -o list list.c -Wall
./list /

---<list.c>---
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>

static int recursive_list(const char *path);

int
main(int argc, char *argv)
{
  if(argv[1])
    return recursive_list(argv[1]);
  return 1;
}

static int
recursive_list(const char *path)
{
        DIR *dirp;
        struct dirent *dp;
        struct stat sb;
        char path2[1024];

        if(lstat(path, &sb))
                return 1;
        if(!S_ISDIR(sb.st_mode))
  {
    printf("file: %s\n", path);
    return 0;
  }

        if((dirp = opendir(path)) == NULL)
                return 1;
        while((dp = readdir(dirp)) != NULL)
        {
                if(dp->d_name[0] == '.')
                        continue;
                sprintf(path2, "%s/%s", path, dp->d_name);
                recursive_list(path2);
        }
        closedir(dirp);

  printf(" dir: %s/\n", path);
        return 0;
}
--------------

On Thu, Mar 09, 2006 at 08:33:26PM +1300, Hamish wrote:

Just a thought,

in the past weeks some code was changed to replace system calls with
their C equivalents. Maybe this has something to do with it. I can't
connect to the CVS-web interface currently to check.

Look for recent changes in:
  http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/

Hamish

On Wed, 08 Mar 2006 21:04:54 -0600
Dave Kent <dkent@sasktel.net> wrote:

> Thanks for the insight. I went back to the Nov 05 binaries and
> Janurary CVS version and things work. That will be fine for now. I
> guess learning how to build wouldn't be a bad thing.
>
> Thanks for your help.
>
> Dave
>
> On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:
>
> > This is probably the same bug Michael Barton reported yesterday
> > (#4152) and I reported last August (#3585). Specifically, when
> > GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
> > support. It's probably happening for you in Tiger because Lorenzo
> > builds with Panther compatibility - either on Panther, or on Tiger
> > using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.
> >
> > It's a strange bug - I can build GRASS with GDAL without Postgres
> > support, then update GDAL to include Postgres support and it still
> > works. It's only when GDAL has Postgres support *at the time GRASS
> >
> > is built*. I've tried various combinations of static and dynamic
> > Postgres libraries (and the exact same ones used for Postgres
> > support in GRASS) and other options in GDAL and GRASS and GRASS
> > with/without its own Postgres support.
> >
> > On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:
> >
> >> I am using Grass 6.1CVS on Macintosh with the most recent
> >> Macintosh binaries.
> >>
> >> g.remove gives the following error.
> >>
> >> child killed: bus error
> >> child killed: bus error
> >> while executing
> >> "exec -- $cmd --tcltk"
> >> (procedure "execute" line 4)
> >> invoked from within
> >> "execute g.remove "
> >> (menu invoke)
> >>
> >> This started quite suddenly, possibly consistent with messing with
> >
> >> AWK post I had yesterday.
> >>
> >> I get the same error with g.copy, g.rename but not g.list
> >>
> >> I have reinstalled the binaries and the application.
> >>
> >> There was a not too similar message in the archives which relates
> >> to the environmental variable file being corrupted. I cannot find
> >> this file and haven't tried removing it.

This turned out to be a problem in compiling the Mac OSX binary. It has
something to do with GDAL.

Michael

On 3/9/06 8:14 AM, "William Kyngesburye" <woklist@kyngchaos.com> wrote:

Except that I reported this bug last August, and it happens with
6.0.1 and 6.1CVS. I haven't tried 6.0.2 yet.

On Mar 9, 2006, at 1:33 AM, Hamish wrote:

Just a thought,

in the past weeks some code was changed to replace system calls with
their C equivalents. Maybe this has something to do with it. I can't
connect to the CVS-web interface currently to check.

Look for recent changes in:
  http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/

Hamish

On Wed, 08 Mar 2006 21:04:54 -0600
Dave Kent <dkent@sasktel.net> wrote:

Thanks for the insight. I went back to the Nov 05 binaries and
Janurary CVS version and things work. That will be fine for now. I
guess learning how to build wouldn't be a bad thing.

Thanks for your help.

Dave

On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:

This is probably the same bug Michael Barton reported yesterday
(#4152) and I reported last August (#3585). Specifically, when
GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
support. It's probably happening for you in Tiger because Lorenzo
builds with Panther compatibility - either on Panther, or on Tiger
using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.

It's a strange bug - I can build GRASS with GDAL without Postgres
support, then update GDAL to include Postgres support and it still
works. It's only when GDAL has Postgres support *at the time GRASS

is built*. I've tried various combinations of static and dynamic
Postgres libraries (and the exact same ones used for Postgres
support in GRASS) and other options in GDAL and GRASS and GRASS
with/without its own Postgres support.

On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:

I am using Grass 6.1CVS on Macintosh with the most recent
Macintosh binaries.

g.remove gives the following error.

child killed: bus error
child killed: bus error
    while executing
"exec -- $cmd --tcltk"
    (procedure "execute" line 4)
    invoked from within
"execute g.remove "
    (menu invoke)

This started quite suddenly, possibly consistent with messing with

AWK post I had yesterday.

I get the same error with g.copy, g.rename but not g.list

I have reinstalled the binaries and the application.

There was a not too similar message in the archives which relates
to the environmental variable file being corrupted. I cannot find
this file and haven't tried removing it.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Earth: "Mostly harmless"

- revised entry in the HitchHiker's Guide to the Galaxy

___________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Arizona State University
Tempe, AZ 85287

WWW - http://www.public.asu.edu/~cmbarton
Phone: 480-965-6262
Fax: 480-965-7671

Hi:

I ran the program. It listed every file and directory in the system. I aborted it after a few minutes before it finished. There were no error messages.

Note that I have reinstalled older GRASS version that works and the system is not the same as when the problem occurred.

Hope this is helpful.

Dave

On Mar 9, 2006, at 9:48 PM, Huidae Cho wrote:

I've made those changes in mid-February this year. Could you try running the
following code and let me know what this does? Don't worry, it's like "find
dir" command.

cc -o list list.c -Wall
./list /

---<list.c>---
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>

static int recursive_list(const char *path);

int
main(int argc, char *argv)
{
  if(argv[1])
    return recursive_list(argv[1]);
  return 1;
}

static int
recursive_list(const char *path)
{
        DIR *dirp;
        struct dirent *dp;
        struct stat sb;
        char path2[1024];

        if(lstat(path, &sb))
                return 1;
        if(!S_ISDIR(sb.st_mode))
  {
    printf("file: %s\n", path);
    return 0;
  }

        if((dirp = opendir(path)) == NULL)
                return 1;
        while((dp = readdir(dirp)) != NULL)
        {
                if(dp->d_name[0] == '.')
                        continue;
                sprintf(path2, "%s/%s", path, dp->d_name);
                recursive_list(path2);
        }
        closedir(dirp);

  printf(" dir: %s/\n", path);
        return 0;
}
--------------

On Thu, Mar 09, 2006 at 08:33:26PM +1300, Hamish wrote:

Just a thought,

in the past weeks some code was changed to replace system calls with
their C equivalents. Maybe this has something to do with it. I can't
connect to the CVS-web interface currently to check.

Look for recent changes in:
  http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/

Hamish

On Wed, 08 Mar 2006 21:04:54 -0600
Dave Kent <dkent@sasktel.net> wrote:

Thanks for the insight. I went back to the Nov 05 binaries and
Janurary CVS version and things work. That will be fine for now. I
guess learning how to build wouldn't be a bad thing.

Thanks for your help.

Dave

On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:

This is probably the same bug Michael Barton reported yesterday
(#4152) and I reported last August (#3585). Specifically, when
GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
support. It's probably happening for you in Tiger because Lorenzo
builds with Panther compatibility - either on Panther, or on Tiger
using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.

It's a strange bug - I can build GRASS with GDAL without Postgres
support, then update GDAL to include Postgres support and it still
works. It's only when GDAL has Postgres support *at the time GRASS

is built*. I've tried various combinations of static and dynamic
Postgres libraries (and the exact same ones used for Postgres
support in GRASS) and other options in GDAL and GRASS and GRASS
with/without its own Postgres support.

On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:

I am using Grass 6.1CVS on Macintosh with the most recent
Macintosh binaries.

g.remove gives the following error.

child killed: bus error
    while executing
"exec -- $cmd --tcltk"
    (procedure "execute" line 4)
    invoked from within
"execute g.remove "
    (menu invoke)

This started quite suddenly, possibly consistent with messing with

AWK post I had yesterday.

I get the same error with g.copy, g.rename but not g.list

I have reinstalled the binaries and the application.

There was a not too similar message in the archives which relates
to the environmental variable file being corrupted. I cannot find
this file and haven't tried removing it.

OK, it doesn't matter whether you installed an older GRASS version or not
because if the code is working, the bus error has nothing to do with the change
that I made recently. Maybe it's related to PostgreSQL or GDAL compilation?

Huidae Cho

On Sun, Mar 12, 2006 at 03:51:37PM -0600, Dave Kent wrote:

Hi:

I ran the program. It listed every file and directory in the system. I
aborted it after a few minutes before it finished. There were no error
messages.

Note that I have reinstalled older GRASS version that works and the system is
not the same as when the problem occurred.

Hope this is helpful.

Dave

On Mar 9, 2006, at 9:48 PM, Huidae Cho wrote:

>I've made those changes in mid-February this year. Could you try running
>the
>following code and let me know what this does? Don't worry, it's like "find
>dir" command.
>cc -o list list.c -Wall
>./list /
>---<list.c>---
>#include <stdio.h>
>#include <string.h>
>#include <unistd.h>
>#include <sys/types.h>
>#include <sys/stat.h>
>#include <dirent.h>
>static int recursive_list(const char *path);
>int
>main(int argc, char *argv)
>{
> if(argv[1])
> return recursive_list(argv[1]);
> return 1;
>}
>static int
>recursive_list(const char *path)
>{
> DIR *dirp;
> struct dirent *dp;
> struct stat sb;
> char path2[1024];
> if(lstat(path, &sb))
> return 1;
> if(!S_ISDIR(sb.st_mode))
> {
> printf("file: %s\n", path);
> return 0;
> }
> if((dirp = opendir(path)) == NULL)
> return 1;
> while((dp = readdir(dirp)) != NULL)
> {
> if(dp->d_name[0] == '.')
> continue;
> sprintf(path2, "%s/%s", path, dp->d_name);
> recursive_list(path2);
> }
> closedir(dirp);
> printf(" dir: %s/\n", path);
> return 0;
>}
>--------------
>On Thu, Mar 09, 2006 at 08:33:26PM +1300, Hamish wrote:
>>Just a thought,
>>in the past weeks some code was changed to replace system calls with
>>their C equivalents. Maybe this has something to do with it. I can't
>>connect to the CVS-web interface currently to check.
>>Look for recent changes in:
>> http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/
>>Hamish
>>On Wed, 08 Mar 2006 21:04:54 -0600
>>Dave Kent <dkent@sasktel.net> wrote:
>>>Thanks for the insight. I went back to the Nov 05 binaries and
>>>Janurary CVS version and things work. That will be fine for now. I
>>>guess learning how to build wouldn't be a bad thing.
>>>Thanks for your help.
>>>Dave
>>>On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:
>>>>This is probably the same bug Michael Barton reported yesterday
>>>>(#4152) and I reported last August (#3585). Specifically, when
>>>>GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
>>>>support. It's probably happening for you in Tiger because Lorenzo
>>>>builds with Panther compatibility - either on Panther, or on Tiger
>>>>using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.
>>>>It's a strange bug - I can build GRASS with GDAL without Postgres
>>>>support, then update GDAL to include Postgres support and it still
>>>>works. It's only when GDAL has Postgres support *at the time GRASS
>>>>is built*. I've tried various combinations of static and dynamic
>>>>Postgres libraries (and the exact same ones used for Postgres
>>>>support in GRASS) and other options in GDAL and GRASS and GRASS
>>>>with/without its own Postgres support.
>>>>On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:
>>>>>I am using Grass 6.1CVS on Macintosh with the most recent
>>>>>Macintosh binaries.
>>>>>g.remove gives the following error.
>>>>>child killed: bus error
>>>>>child killed: bus error
>>>>> while executing
>>>>>"exec -- $cmd --tcltk"
>>>>> (procedure "execute" line 4)
>>>>> invoked from within
>>>>>"execute g.remove "
>>>>> (menu invoke)
>>>>>This started quite suddenly, possibly consistent with messing with
>>>>>AWK post I had yesterday.
>>>>>I get the same error with g.copy, g.rename but not g.list
>>>>>I have reinstalled the binaries and the application.
>>>>>There was a not too similar message in the archives which relates
>>>>>to the environmental variable file being corrupted. I cannot find
>>>>>this file and haven't tried removing it.

Huidae and Dave,

This cropped up on the Mac binaries. I didn't realize that it was affecting the Win binaries too. Lorenzo Moretti solved it. It had to do with changed to how gdal interfaces with GRASS.

Michael

______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

-----Original Message-----
From: Huidae Cho [mailto:grass4u@gmail.com]
Sent: Sun 3/12/2006 11:36 PM
To: Dave Kent
Cc: Hamish; kyngchaos@kyngchaos.com; grasslist@baylor.edu
Subject: [GRASSLIST:30] Re: Bus Error in g.remove

OK, it doesn't matter whether you installed an older GRASS version or not
because if the code is working, the bus error has nothing to do with the change
that I made recently. Maybe it's related to PostgreSQL or GDAL compilation?

Huidae Cho

On Sun, Mar 12, 2006 at 03:51:37PM -0600, Dave Kent wrote:

Hi:

I ran the program. It listed every file and directory in the system. I
aborted it after a few minutes before it finished. There were no error
messages.

Note that I have reinstalled older GRASS version that works and the system is
not the same as when the problem occurred.

Hope this is helpful.

Dave

On Mar 9, 2006, at 9:48 PM, Huidae Cho wrote:

>I've made those changes in mid-February this year. Could you try running
>the
>following code and let me know what this does? Don't worry, it's like "find
>dir" command.
>cc -o list list.c -Wall
>./list /
>---<list.c>---
>#include <stdio.h>
>#include <string.h>
>#include <unistd.h>
>#include <sys/types.h>
>#include <sys/stat.h>
>#include <dirent.h>
>static int recursive_list(const char *path);
>int
>main(int argc, char *argv)
>{
> if(argv[1])
> return recursive_list(argv[1]);
> return 1;
>}
>static int
>recursive_list(const char *path)
>{
> DIR *dirp;
> struct dirent *dp;
> struct stat sb;
> char path2[1024];
> if(lstat(path, &sb))
> return 1;
> if(!S_ISDIR(sb.st_mode))
> {
> printf("file: %s\n", path);
> return 0;
> }
> if((dirp = opendir(path)) == NULL)
> return 1;
> while((dp = readdir(dirp)) != NULL)
> {
> if(dp->d_name[0] == '.')
> continue;
> sprintf(path2, "%s/%s", path, dp->d_name);
> recursive_list(path2);
> }
> closedir(dirp);
> printf(" dir: %s/\n", path);
> return 0;
>}
>--------------
>On Thu, Mar 09, 2006 at 08:33:26PM +1300, Hamish wrote:
>>Just a thought,
>>in the past weeks some code was changed to replace system calls with
>>their C equivalents. Maybe this has something to do with it. I can't
>>connect to the CVS-web interface currently to check.
>>Look for recent changes in:
>> http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/
>>Hamish
>>On Wed, 08 Mar 2006 21:04:54 -0600
>>Dave Kent <dkent@sasktel.net> wrote:
>>>Thanks for the insight. I went back to the Nov 05 binaries and
>>>Janurary CVS version and things work. That will be fine for now. I
>>>guess learning how to build wouldn't be a bad thing.
>>>Thanks for your help.
>>>Dave
>>>On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:
>>>>This is probably the same bug Michael Barton reported yesterday
>>>>(#4152) and I reported last August (#3585). Specifically, when
>>>>GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
>>>>support. It's probably happening for you in Tiger because Lorenzo
>>>>builds with Panther compatibility - either on Panther, or on Tiger
>>>>using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.
>>>>It's a strange bug - I can build GRASS with GDAL without Postgres
>>>>support, then update GDAL to include Postgres support and it still
>>>>works. It's only when GDAL has Postgres support *at the time GRASS
>>>>is built*. I've tried various combinations of static and dynamic
>>>>Postgres libraries (and the exact same ones used for Postgres
>>>>support in GRASS) and other options in GDAL and GRASS and GRASS
>>>>with/without its own Postgres support.
>>>>On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:
>>>>>I am using Grass 6.1CVS on Macintosh with the most recent
>>>>>Macintosh binaries.
>>>>>g.remove gives the following error.
>>>>>child killed: bus error
>>>>>child killed: bus error
>>>>> while executing
>>>>>"exec -- $cmd --tcltk"
>>>>> (procedure "execute" line 4)
>>>>> invoked from within
>>>>>"execute g.remove "
>>>>> (menu invoke)
>>>>>This started quite suddenly, possibly consistent with messing with
>>>>>AWK post I had yesterday.
>>>>>I get the same error with g.copy, g.rename but not g.list
>>>>>I have reinstalled the binaries and the application.
>>>>>There was a not too similar message in the archives which relates
>>>>>to the environmental variable file being corrupted. I cannot find
>>>>>this file and haven't tried removing it.

I thought it had something to do with GDAL. So, what did Lorenzo do? That should close the two bugs opened on this problem (mine and yours, now merged I see).

On Mar 14, 2006, at 1:21 PM, Michael Barton wrote:

Huidae and Dave,

This cropped up on the Mac binaries. I didn't realize that it was affecting the Win binaries too. Lorenzo Moretti solved it. It had to do with changed to how gdal interfaces with GRASS.

Michael

______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

-----Original Message-----
From: Huidae Cho [mailto:grass4u@gmail.com]
Sent: Sun 3/12/2006 11:36 PM
To: Dave Kent
Cc: Hamish; kyngchaos@kyngchaos.com; grasslist@baylor.edu
Subject: [GRASSLIST:30] Re: Bus Error in g.remove

OK, it doesn't matter whether you installed an older GRASS version or not
because if the code is working, the bus error has nothing to do with the change
that I made recently. Maybe it's related to PostgreSQL or GDAL compilation?

Huidae Cho

On Sun, Mar 12, 2006 at 03:51:37PM -0600, Dave Kent wrote:

Hi:

I ran the program. It listed every file and directory in the system. I
aborted it after a few minutes before it finished. There were no error
messages.

Note that I have reinstalled older GRASS version that works and the system is
not the same as when the problem occurred.

Hope this is helpful.

Dave

On Mar 9, 2006, at 9:48 PM, Huidae Cho wrote:

I've made those changes in mid-February this year. Could you try running
the
following code and let me know what this does? Don't worry, it's like "find
dir" command.
cc -o list list.c -Wall
./list /
---<list.c>---
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
static int recursive_list(const char *path);
int
main(int argc, char *argv)
{
  if(argv[1])
    return recursive_list(argv[1]);
  return 1;
}
static int
recursive_list(const char *path)
{
       DIR *dirp;
       struct dirent *dp;
       struct stat sb;
       char path2[1024];
       if(lstat(path, &sb))
               return 1;
       if(!S_ISDIR(sb.st_mode))
  {
    printf("file: %s\n", path);
    return 0;
  }
       if((dirp = opendir(path)) == NULL)
               return 1;
       while((dp = readdir(dirp)) != NULL)
       {
               if(dp->d_name[0] == '.')
                       continue;
               sprintf(path2, "%s/%s", path, dp->d_name);
               recursive_list(path2);
       }
       closedir(dirp);
  printf(" dir: %s/\n", path);
       return 0;
}
--------------
On Thu, Mar 09, 2006 at 08:33:26PM +1300, Hamish wrote:

Just a thought,
in the past weeks some code was changed to replace system calls with
their C equivalents. Maybe this has something to do with it. I can't
connect to the CVS-web interface currently to check.
Look for recent changes in:
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/general/manage/
Hamish
On Wed, 08 Mar 2006 21:04:54 -0600
Dave Kent <dkent@sasktel.net> wrote:

Thanks for the insight. I went back to the Nov 05 binaries and
Janurary CVS version and things work. That will be fine for now. I
guess learning how to build wouldn't be a bad thing.
Thanks for your help.
Dave
On Mar 8, 2006, at 6:40 PM, William Kyngesburye wrote:

This is probably the same bug Michael Barton reported yesterday
(#4152) and I reported last August (#3585). Specifically, when
GRASS is built on OS 10.3 Panther (GCC 3.3), and GDAL has Postgres
support. It's probably happening for you in Tiger because Lorenzo
builds with Panther compatibility - either on Panther, or on Tiger
using the Panther SDK. A Tiger-only build (GCC 4) is unaffected.
It's a strange bug - I can build GRASS with GDAL without Postgres
support, then update GDAL to include Postgres support and it still
works. It's only when GDAL has Postgres support *at the time GRASS
is built*. I've tried various combinations of static and dynamic
Postgres libraries (and the exact same ones used for Postgres
support in GRASS) and other options in GDAL and GRASS and GRASS
with/without its own Postgres support.
On Mar 8, 2006, at 6:14 PM, Dave Kent wrote:

I am using Grass 6.1CVS on Macintosh with the most recent
Macintosh binaries.
g.remove gives the following error.
child killed: bus error
   while executing
"exec -- $cmd --tcltk"
   (procedure "execute" line 4)
   invoked from within
"execute g.remove "
   (menu invoke)
This started quite suddenly, possibly consistent with messing with
AWK post I had yesterday.
I get the same error with g.copy, g.rename but not g.list
I have reinstalled the binaries and the application.
There was a not too similar message in the archives which relates
to the environmental variable file being corrupted. I cannot find
this file and haven't tried removing it.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

"History is an illusion caused by the passage of time, and time is an illusion caused by the passage of history."

- Hitchhiker's Guide to the Galaxy


Hi all

I thought it had something to do with GDAL. So, what did Lorenzo do? That should close the two bugs opened on this problem (mine and yours, now merged I see).

On Mar 14, 2006, at 1:21 PM, Michael Barton wrote:

Huidae and Dave,

This cropped up on the Mac binaries. I didn’t realize that it was affecting the Win binaries too. Lorenzo Moretti solved it. It had to do with changed to how gdal interfaces with GRASS.

Michael

I have resolved this problem. I use a gdal very poor of features when I build grass and I use /usr/local/grasslib without many libs only linked to gdal. A simple library.

My GDAL configuration for GRASS source in Mac OS X:

./configure
–prefix=/usr/local/grasslib
–mandir=/usr/local/grasslib/share/man
–without-python
–with-threads
–with-static-proj4=/usr/local/grasslib
–with-libtiff=internal
–with-geotiff=internal
–with-jpeg=internal
–with-gif=internal
–with-png=internal
–with-pg=no

After I build GRASS.

After I put other libs for GDAL and I rebuild a GDAL complete:

At last I build gdal-grass plug-in

The only important missing format in Mac OS X is ECW because it creates an error in GDAL but the problem is in the ECW library.

The problems in g.* modules are gone.

Bye


|| Lorenzo Moretti e-mail: lorenzo.moretti@bologna.enea.it
||/|/| ENEA prot/idr Web: http://wwwamb.bologna.enea.it/
|| | via Don Fiammelli, 2 FTP: ftp://ftpamb.bologna.enea.it/ (ris.)

ENEA - Ente Nazionale per le Nuove Tecnologie, l'Energia e l'Ambiente
ENEA - The Italian Agency for New Technologies, Energy and the Environment
__________________________________________________________________________