From: Cheng-Chang Wu <che...@ya...> - 2007-07-28 13:12:39
|
Hi, I've downloaded files from SVN and tried to bootstrap GEC. Bootstrap fails because the x bit of generated gec.sh file is not set. Cheng-Chang Wu ____________________________________________________________________________________ 想及時通知通訊錄裡的所有親朋好友好消息,就來 Yahoo!奇摩電子信箱發簡訊! http://tw.mobile.yahoo.com/texts/mail.php |
From: Eric B. <er...@go...> - 2007-07-28 17:42:25
|
Cheng-Chang Wu wrote: > I've downloaded files from SVN and tried to bootstrap > GEC. Bootstrap fails because the x bit of generated > gec.sh file is not set. It is not set because there is not function to set it in the Gobo classes. I will have to look whether this is possible to add that with the current versions of the currently supported Eiffel compilers. But what is strange is that you are the first one to complain about this problem. Does that mean that you are the first one to try to boostrap with gec as Eiffel compiler under Linux/Unix? Colin, could you give it a try? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Colin P. A. <co...@co...> - 2007-07-28 18:27:42
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes: Eric> But what is strange is that you are the first one to Eric> complain about this problem. Does that mean that you are the Eric> first one to try to boostrap with gec as Eiffel compiler Eric> under Linux/Unix? Eric> Colin, could you give it a try? I'm sure I've done it before, but I'm trying it again. However, it might be something as simple as the value returned from umask - If I type umask I get 0002. Anyway, a shell script doesn't need to be executable, as you can execute it by: sh <scriptname> -- Colin Adams Preston Lancashire |
From: Eric B. <er...@go...> - 2007-07-28 18:37:41
|
Colin Paul Adams wrote: >>>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> But what is strange is that you are the first one to > Eric> complain about this problem. Does that mean that you are the > Eric> first one to try to boostrap with gec as Eiffel compiler > Eric> under Linux/Unix? > > Eric> Colin, could you give it a try? > > I'm sure I've done it before, but I'm trying it again. > > However, it might be something as simple as the value returned from > umask - If I type umask I get 0002. > > Anyway, a shell script doesn't need to be executable, as you can > execute it by: > > sh <scriptname> I think that the shell script is invoked by using C's 'system'. Something like: system("/path/to/gec.sh") So, do you think that calling: system("sh /path/to_gec.sh") would work? Or should I write: system("/bin/sh /path/to_gec.sh") (in case 'sh' was not the in the path, or aliased to something else)? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Colin P. A. <co...@co...> - 2007-07-28 18:47:07
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes: Eric> I think that the shell script is invoked by using C's Eric> 'system'. Something like: Eric> system("/path/to/gec.sh") Eric> So, do you think that calling: Eric> system("sh /path/to_gec.sh") Eric> would work? Or should I write: Yes. Eric> system("/bin/sh /path/to_gec.sh") Eric> (in case 'sh' was not the in the path, or aliased to Eric> something else)? Sh should always be in the path. On Linux it is nearly always a symbolic link to /bin/bash (it is here). So I don't think it matters. /bin/sh is safest, I guess. Anyway, as I was typing this, my bootstrap has just finished. No errors were reported. -- Colin Adams Preston Lancashire |
From: Bernd S. <ber...@in...> - 2007-07-28 19:27:47
|
At 28 Jul 2007 19:47:05 +0100, Colin Paul Adams wrote: > > >>>>> "Eric" == Eric Bezault <er...@go...> writes: > > Eric> I think that the shell script is invoked by using C's > Eric> 'system'. Something like: > > Eric> system("/path/to/gec.sh") > > Eric> So, do you think that calling: > > Eric> system("sh /path/to_gec.sh") > > Eric> would work? Or should I write: > > Yes. > > Eric> system("/bin/sh /path/to_gec.sh") > > Eric> (in case 'sh' was not the in the path, or aliased to > Eric> something else)? > > Sh should always be in the path. On Linux it is nearly always a > symbolic link to /bin/bash (it is here). > So I don't think it matters. /bin/sh is safest, I guess. I can confirm that 'sh' should always be in the path on a Unix system, so just calling 'sh <script>' should always work. I am saying "should" as there are some very strange Unix systems out there ... ;-) Bernd |
From: Eric B. <er...@go...> - 2007-07-28 20:57:55
|
Bernd Schoeller wrote: > At 28 Jul 2007 19:47:05 +0100, > Colin Paul Adams wrote: >>>>>>> "Eric" == Eric Bezault <er...@go...> writes: >> Eric> I think that the shell script is invoked by using C's >> Eric> 'system'. Something like: >> >> Eric> system("/path/to/gec.sh") >> >> Eric> So, do you think that calling: >> >> Eric> system("sh /path/to_gec.sh") >> >> Eric> would work? Or should I write: >> >> Yes. >> >> Eric> system("/bin/sh /path/to_gec.sh") >> >> Eric> (in case 'sh' was not the in the path, or aliased to >> Eric> something else)? >> >> Sh should always be in the path. On Linux it is nearly always a >> symbolic link to /bin/bash (it is here). >> So I don't think it matters. /bin/sh is safest, I guess. > > I can confirm that 'sh' should always be in the path on a Unix system, > so just calling 'sh <script>' should always work. I am saying "should" > as there are some very strange Unix systems out there ... ;-) So should I use /bin/sh to be 100% sure? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Franck A. <fr...@ne...> - 2007-07-29 16:13:23
|
> I think that the shell script is invoked by using C's 'system'. > Something like: > > system("/path/to/gec.sh") > > So, do you think that calling: > > system("sh /path/to_gec.sh") > > would work? Or should I write: > > system("/bin/sh /path/to_gec.sh") > > (in case 'sh' was not the in the path, or aliased to something else)? system (". /path/to_gec.sh") might be a neater and more portable variant. and I guess system() is always supposed to operate in a sh-compatible shell, so '.' is going to be the right shell and not the user's current shell with a different syntax. |
From: Eric B. <er...@go...> - 2007-07-28 20:59:19
|
Eric Bezault wrote: > Bernd Schoeller wrote: >> At 28 Jul 2007 19:47:05 +0100, >> Colin Paul Adams wrote: >>>>>>>> "Eric" == Eric Bezault <er...@go...> writes: >>> Eric> I think that the shell script is invoked by using C's >>> Eric> 'system'. Something like: >>> >>> Eric> system("/path/to/gec.sh") >>> >>> Eric> So, do you think that calling: >>> >>> Eric> system("sh /path/to_gec.sh") >>> >>> Eric> would work? Or should I write: >>> >>> Yes. >>> >>> Eric> system("/bin/sh /path/to_gec.sh") >>> >>> Eric> (in case 'sh' was not the in the path, or aliased to >>> Eric> something else)? >>> >>> Sh should always be in the path. On Linux it is nearly always a >>> symbolic link to /bin/bash (it is here). >>> So I don't think it matters. /bin/sh is safest, I guess. >> I can confirm that 'sh' should always be in the path on a Unix system, >> so just calling 'sh <script>' should always work. I am saying "should" >> as there are some very strange Unix systems out there ... ;-) > > So should I use /bin/sh to be 100% sure? In other words, is there a reason why I shouldn't use /bin/sh? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Colin P. A. <co...@co...> - 2007-07-29 04:56:45
|
>>>>> "Eric" == Eric Bezault <er...@go...> writes: >>> I can confirm that 'sh' should always be in the path on a Unix >>> system, so just calling 'sh <script>' should always work. I am >>> saying "should" as there are some very strange Unix systems >>> out there ... ;-) >> So should I use /bin/sh to be 100% sure? Eric> In other words, is there a reason why I shouldn't use Eric> /bin/sh? I can't think of one. As far as I know, all Unix systems require sh to be present in /bin. But I haven't used many Unix systems. -- Colin Adams Preston Lancashire |
From: Bernd S. <ber...@in...> - 2007-07-29 06:45:03
|
At Sat, 28 Jul 2007 22:58:00 +0200, Eric Bezault wrote: > >> I can confirm that 'sh' should always be in the path on a Unix system, > >> so just calling 'sh <script>' should always work. I am saying "should" > >> as there are some very strange Unix systems out there ... ;-) > > > > So should I use /bin/sh to be 100% sure? > > In other words, is there a reason why I shouldn't use /bin/sh? Yes, there are: you are taking away the control y the user of which sh shell to execute. Some people have their own preferred version of 'sh' (for example 'bash' instead of the original bourne shell) with a higher priority in their path. But I do indeed think these are corner cases. /bin/sh should also do fine. Bernd |
From: Colin P. A. <co...@co...> - 2007-07-29 06:52:26
|
>>>>> "Bernd" == Bernd Schoeller <ber...@in...> writes: Bernd> At Sat, 28 Jul 2007 22:58:00 +0200, Bernd> Eric Bezault wrote: >> >> I can confirm that 'sh' should always be in the path on a >> Unix system, >> so just calling 'sh <script>' should always >> work. I am saying "should" >> as there are some very strange >> Unix systems out there ... ;-) >> > >> > So should I use /bin/sh to be 100% sure? >> >> In other words, is there a reason why I shouldn't use /bin/sh? Bernd> Yes, there are: you are taking away the control y the user Bernd> of which sh shell to execute. Some people have their own Bernd> preferred version of 'sh' (for example 'bash' instead of Bernd> the original bourne shell) with a higher priority in their Bernd> path. But it is not their preferred version which is important here - it is the language Eric has written the scripts in that counts. Bernd> But I do indeed think these are corner cases. /bin/sh Bernd> should also do fine. There is also the case of what language the shell-script is written in. If the script uses any bash-specific syntax or features, then you need to execute bash rather than sh. But assuming the script is written for the bourne shell, then sh or /bin/sh is the correct one to use. -- Colin Adams Preston Lancashire |