Recent

Author Topic: Can't find Free Pascal Compiler after install  (Read 4084 times)

Asmus

  • Newbie
  • Posts: 3
Can't find Free Pascal Compiler after install
« on: June 15, 2016, 10:53:16 pm »
Using the fpc-3.0.0.intel-macosx.pkg installer on the fpc-3.0.0.intel-macosx.dmg disc I successfully installed the Free Pascal Compiler v.3.0.0  (or so the final installer message assured me). However, I can find no trace of the compiler.

Can anybody tell me where and under what name the compiler is installed by default?

I searched for "fpc", "Free Pascal" and "Lazarus" on my machine (2.5 GHz Intel Core i5 Mac mini with OS X Yosemite v.10.10.5), as well as for ANY new files and came up blank.

Any tips appreciated.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Can't find Free Pascal Compiler after install
« Reply #1 on: June 16, 2016, 01:43:25 am »
Typing "fpc" at a Terminal window command line will run by default the ppc386 (32-bit) compiler. Search for it like this:

mdfind -name ppc386

Should say:

/usr/local/lib/fpc/3.0.0/ppc386

The 64-bit compiler is ppcx64.

-Phil

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: Can't find Free Pascal Compiler after install
« Reply #2 on: June 16, 2016, 09:29:50 am »
That's correct Phill, but there should also be a symlink (or two) in /usr/local/bin that point to usr/local/lib/fpc/3.0.0 to be able to start fpc without any hassle.

So check if these are there.

You can create these with
Code: [Select]
ln -sf /usr/local/lib/fpc/3.0.0/ppc386 /usr/local/bin/ppc386
ln -sf /usr/local/lib/fpc/3.0.0/fpc /usr/local/bin/fpc

For 64bit change the first to:
Code: [Select]
ln -sf /usr/local/lib/fpc/3.0.0/ppcx64 /usr/local/bin/ppcx64

Normally  a package installer would take care of that, but nothing happens when you are building from source so you'll have to do it manually.
Otherwise the - if present - symlink may point to the bootstrap compiler. -sf means force/replace symbolic link.

To summarize:
If you build from source and bootstrap with 2.6.4 to build 3.0.0 do the above.
If you build trunk from source and bootstrap with 3.0.0 replace 3.0.0 in the above with 3.1.1. You'll get the idea.

On some platforms it is not /usr/local/bin  but simply /usr/bin. Note that /usr/bin has preference over /usr/local/bin so also check if there is not a rogue symlink in /usr/bin
« Last Edit: June 16, 2016, 09:46:19 am by Thaddy »
Specialize a type, not a var.

Asmus

  • Newbie
  • Posts: 3
Re: Can't find Free Pascal Compiler after install
« Reply #3 on: June 18, 2016, 08:15:26 pm »
Thank you Phil. Great tips.

You were correct in every instance:
I found not only

/usr/local/lib/fpc/3.0.0/ppc386

but also

/usr/local/lib/fpc/2.2.2/ppc386,

indicating an earlier (failed) attempt to use Free Pascal.

And the fpc command in Terminal did indeed launch the compiler.

Asmus

  • Newbie
  • Posts: 3
Re: Can't find Free Pascal Compiler after install
« Reply #4 on: June 18, 2016, 08:29:40 pm »
Thanks to you also, Thaddy.

These:

/usr/local/man/man1/ppc386.1.gz
/usr/local/lib/fpc/3.0.0/ppc386
/usr/local/man/man1/ppc386.1
/usr/local/lib/fpc/2.2.2/ppc386

were the only items listed after using the

mdfind -name ppc386

command. When I tried the

ln -sf /usr/local/lib/fpc/3.0.0/ppc386 /usr/local/bin/ppc386
ln -sf /usr/local/lib/fpc/3.0.0/fpc /usr/local/bin/fpc

commands, I got the answers

ln: /usr/local/bin/ppc386: Permission denied
and
ln: /usr/local/bin/fpc: Permission denied,

respectively.

What are the symlinks that these commands are supposed to enable? Why is it advantageous to have them?

I am afraid my grasp of these matters is still pretty feeble. Can you recommend any weblinks which explain the basics of Free Pascal to total newcomers? Sort of a "Free Pascal for Dummies"?

Thaddy

  • Hero Member
  • *****
  • Posts: 14201
  • Probably until I exterminate Putin.
Re: Can't find Free Pascal Compiler after install
« Reply #5 on: June 18, 2016, 09:20:25 pm »
You need superuser or root rights.

This one is the one that needs the symlink:
Code: [Select]
/usr/local/lib/fpc/3.0.0/ppc386
You probably have also:
Code: [Select]
/usr/local/lib/fpc/3.0.0/fpc
Try
Code: [Select]
sudo ln -sf /usr/local/lib/fpc/3.0.0/ppc386 /usr/local/bin/ppc386
sudo ln -sf /usr/local/lib/fpc/3.0.0/fpc /usr/local/bin/fpc

Or open a root terminal if your system hasn't implemented sudo and then create the symlinks.
« Last Edit: June 18, 2016, 09:22:12 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018