Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-04

bugreport: FPC 1.9.8 installer, i386-FreeBSD

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andres K. Foerster

Hello,

I really had trouble installing FPC on FreeBSD.

I downloaded the big tar archive and unpacked it. Then I saw the file "install.sh" there. Because of the file-extension ".sh" I thought it was a simple shellscript for sh. So I tried to start it with "sh install.sh". That didn't work. So I looked into the script and saw, that it needs a special shell, namely bash. The extension ".sh" is very misleading!

Well, bash wasn't installed on my system, so I had to install it. You should say so in the docs. Or better rewrite it to be usable with a standard-shell. You cannot silently expect, that everyone in the world is using GNU!

But then again it didn't work. I looked into the script again and replaced the line "VERSION=%version%" with "VERSION=1.9.8". Then at last it worked. Just still the IDE seems not to be installed properly, but I don't use it anyway.

Apropos GNU: You still use the old Cambridge address for the FSF. They are now in Boston. As I've heard, they plan to move again within Boston this summer. So look out for their actual address on their homepage: http://www.fsf.org

And another comment on a new "feature". FPC doesn't let me manipulate the for-loop-variable anymore. That's annoying! Well Pascal was always said to be a bondage-and-discipline-language, but please don't force that any further.

AKFoerster

Reply by email

Jonas Maebe
to Andres K. Foerster
Andres K. Foerster wrote
And another comment on a new "feature". FPC doesn't let me manipulate the for-loop-variable anymore. That's annoying! Well Pascal was always said to be a bondage-and-discipline-language, but please don't force that any further.

The for-construct allows the compiler to optimize stuff. If you want to modify the "loop" variable, use while..do or repeat..until

Jonas

Reply by email

Peter Vreman
to Andres K. Foerster: I really had trouble installing FPC on FreeBSD. I downloaded the big tar archive and…
Show quoted text 15 lines
Hello, I really had trouble installing FPC on FreeBSD. I downloaded the big tar archive and unpacked it. Then I saw the file "install.sh" there. Because of the file-extension ".sh" I thought it was a simple shellscript for sh. So I tried to start it with "sh install.sh". That didn't work. So I looked into the script and saw, that it needs a special shell, namely bash. The extension ".sh" is very misleading! Well, bash wasn't installed on my system, so I had to install it. You should say so in the docs. Or better rewrite it to be usable with a standard-shell. You cannot silently expect, that everyone in the world is using GNU!

You are welcome to supply a patch. You can't demand from us to not use bash.

And another comment on a new "feature". FPC doesn't let me manipulate the for-loop-variable anymore. That's annoying! Well Pascal was always said to be a bondage-and-discipline-language, but please don't force that any further.

It is now only allowed to in tp mode. In delphi it isn't allowed either.

Reply by email

Marco van de Voort
to Andres K. Foerster: I really had trouble installing FPC on FreeBSD. I downloaded the big tar archive and…
I really had trouble installing FPC on FreeBSD.

Ah?

Show quoted text 6 lines
I downloaded the big tar archive and unpacked it. Then I saw the file "install.sh" there. Because of the file-extension ".sh" I thought it was a simple shellscript for sh. So I tried to start it with "sh install.sh". That didn't work. So I looked into the script and saw, that it needs a special shell, namely bash. The extension ".sh" is very misleading!

bash is a superset of a sh shell, the .sh extension for bash scripts is common, and has nothing to do with GNU. It was already that way on 4.4BSD.

Well, bash wasn't installed on my system, so I had to install it. You should say so in the docs.

Maybe. Note that the shellscript _is_ human readable, and the bash is on the first line, and the script is fixed so that it doesn't hardcode the location of bash.

Or better rewrite it to be usable with a standard-shell.

I prefer not, it is not worth the effort. I prefer to work on the ports tree entries more, which are IMHO more important than the tgzs. Unfortunately, I haven't had much time for that. It is still on the 1.9.2 level.

I could use some help there.

You cannot silently expect, that everyone in the world is using GNU!

We never did such thing, the script is already made more generic for all kinds of non linux distro's in multiple ways:
- the script properly lists bash as the shell
- further, the location of bash is not hardcoded
- some GNU sed specific constructs have been replaced by awk

We could maybe add a small footnote somewhere, but the chances are slim that it will help anyone, since any decent sysadmin would look at a script before he runs it anyway.

But then again it didn't work. I looked into the script again and replaced the line "VERSION=%version%" with "VERSION=1.9.8". Then at last it worked. Just still the IDE seems not to be installed properly, but I don't use it anyway.

Define _properly_? The IDE is not configured by the installer. Does it start?

Show quoted text 7 lines
Apropos GNU: You still use the old Cambridge address for the FSF. They are now in Boston. As I've heard, they plan to move again within Boston this summer. So look out for their actual address on their homepage: http://www.fsf.org And another comment on a new "feature". FPC doesn't let me manipulate the for-loop-variable anymore. That's annoying!

That's by design. The whole purpose of the for loop construct is optimization. Changing the loopvar frustrates that. Use while or repeat

Well Pascal was always said to be a bondage-and-discipline-language, but please don't force that any further.

Pascal is said to be a B&D language by people that don't grasp certain concepts, usually newbies using Basic, or even plain C because it is l33t.

Reply by email

Andres K. Foerster
to Marco van de Voort

Hello,

first of all, please don't get me wrong. I didn't want to complain. All in all I find FPC is really great.
I wrote this just to show how it could be further improved.

Marco van de Voort wrote
bash is a superset of a sh shell, the .sh extension for bash scripts is common, and has nothing to do with GNU. It was already that way on 4.4BSD.

4.4BSD had bash???
And why do you say, it has nothing to do with GNU? Bash is the Boune Shell replacement from GNU.

Okay, bash is very common nowadays. But for example zsh is also a superset of sh, but if you use it's extentions without mentioning it, you also might get very irritated reactions. ;-)

Maybe. Note that the shellscript _is_ human readable,

Okay. But there should IMHO also be a hint in the docs.

> Or better rewrite it to be usable with a standard-shell. I prefer not, it is not worth the effort.

I'm going have a look at it this week.
Shall I send it to the list, or to whom?

[ports tree]

I could use some help there.

Errm, sorry <duck>

> You cannot silently expect, that everyone in the world is using GNU! We never did such thing

Again: bash is from GNU.

Define _properly_? The IDE is not configured by the installer. Does it start?

Okay I could install it by hand...
But nevertheless it's a bug in the installer-script.

I had a deeper script says:
| rm -f $EXECDIR/fp
| ln -sf $LIBDIR/fp $EXECDIR/fp
but the package has the binary in bin/, not in lib/... So the binary is deleted and the symlink points to nowhere.

Pascal is said to be a B&D language by people that don't grasp certain concepts, usually newbies using Basic, or even plain C because it is l33t.

Even ESR says so.
Well, okay, I can live with it, I just was surprised, because I was used to do so.

AKFoerster

Reply by email

Marco van de Voort
to Andres K. Foerster
Show quoted text 5 lines
> bash is a superset of a sh shell, the .sh extension for bash scripts is > common, and has nothing to do with GNU. It was already that way on 4.4BSD. 4.4BSD had bash???

No. Even FreeBSD still has bash as port. However it was commonly installed.

And why do you say, it has nothing to do with GNU?

I meant GNU orientation of OS/distro's in general.

Okay, bash is very common nowadays. But for example zsh is also a superset of sh, but if you use it's extentions without mentioning it, you also might get very irritated reactions. ;-)

zsh is much less common than bash. E.g. FreeBSD comes without it, but if you install a handful of ports, you already have it.

Show quoted text 6 lines
> > Or better rewrite it to be usable with a standard-shell. > > I prefer not, it is not worth the effort. I'm going have a look at it this week. Shall I send it to the list, or to whom?

Look first what needs to be done. The result must be maintainable. (keep in mind that most other devels must be able to maintain and test it)

Show quoted text 12 lines
> Define _properly_? The IDE is not configured by the installer. Does it > start? Okay I could install it by hand... But nevertheless it's a bug in the installer-script. I had a deeper look at it. The script says: | rm -f $EXECDIR/fp | ln -sf $LIBDIR/fp $EXECDIR/fp but the package has the binary in bin/, not in lib/... So the binary is deleted and the symlink points to nowhere.

Ok. Will try to see if we can do something about that for the next release.

> Pascal is said to be a B&D language by people that don't grasp certain > concepts, usually newbies using Basic, or even plain C because it is l33t. Even ESR says so.

ESR is also commonly considered to be a gunwielding maniac :-)

More importantly though, ESR is a C centric, and thus he inherits the lingo. No surprise that he doesn't see the merits of Pascal.

Well, okay, I can live with it, I just was surprised, because I was used to do so.

I think it is best to simply inventarise what the bash specific parts are.

If they are details, and relatively non-intrusive, we can adapt it, and add it to the wiki for future package builders.

If it is problematic, then we simply keep it bash.

Reply by email

Andres K. Foerster
to Marco van de Voort
Marco van de Voort wrote 9 lines
> > > Or better rewrite it to be usable with a standard-shell. > > > > I prefer not, it is not worth the effort. > > I'm going have a look at it this week. > Shall I send it to the list, or to whom? Look first what needs to be done. The result must be maintainable. (keep in mind that most other devels must be able to maintain and test it)

Oh, I'm surprised myself. There are just few things to fix:

The script sometimes uses one "=" and sometimes two "==" for comparisions. The /bin/sh of FreeBSD accepts just one "=" in comparisions. See test(1).

"echo -n" is supported in the shell of FreeBSD, but it's not standard. You could use "printf" instead of "echo -n". That seems more standardized.

Also the tar parameter "--directory" is a extension of GNU-tar. You could use "-C" instead of "--directory", but be careful with that. It seems "-C" is implemented differently.
(My FreeBSD still comes with GNU tar, but I've heard that they switch to their own version of tar... I'll have a look at it.)

That's all as far as I can see.
Then you can use "#!/bin/sh".

AKFoerster

Reply by email

Michael Van Canneyt
to Andres K. Foerster
Andres K. Foerster wrote 30 lines
Am Montag, dem 18. Apr 2005 schrieb Marco van de Voort: > > > > Or better rewrite it to be usable with a standard-shell. > > > > > > I prefer not, it is not worth the effort. > > > > I'm going have a look at it this week. > > Shall I send it to the list, or to whom? > > Look first what needs to be done. The result must be maintainable. (keep in > mind that most other devels must be able to maintain and test it) Oh, I'm surprised myself. There are just few things to fix: The script sometimes uses one "=" and sometimes two "==" for comparisions. The /bin/sh of FreeBSD accepts just one "=" in comparisions. See test(1). "echo -n" is supported in the shell of FreeBSD, but it's not standard. You could use "printf" instead of "echo -n". That seems more standardized. Also the tar parameter "--directory" is a extension of GNU-tar. You could use "-C" instead of "--directory", but be careful with that. It seems "-C" is implemented differently. (My FreeBSD still comes with GNU tar, but I've heard that they switch to their own version of tar... I'll have a look at it.) That's all as far as I can see. Then you can use "#!/bin/sh".

Changed
#!/bin/sh
to
#!/usr/bin/env sh

And applied all suggested changes.

Michael.

Reply by email

Marco van de Voort
to Andres K. Foerster: Oh, I'm surprised myself. There are just few things to fix: The script sometimes uses one…
Show quoted text 8 lines
Am Montag, dem 18. Apr 2005 schrieb Marco van de Voort: > > Shall I send it to the list, or to whom? > > Look first what needs to be done. The result must be maintainable. (keep in > mind that most other devels must be able to maintain and test it) Oh, I'm surprised myself. There are just few things to fix:

Thnx. Added to the wiki:

http://www.freepascal.org/wiki/index.php/FreeBSD_specific_Release_Engineering

I'll keep it in mind while building next release.

Reply by email