Sign in Join

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

Mailing lists / lazarus / 2010-08

FPC compiled from latest trunk says version is 2.4.0

8 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Sérgio Lopes

Hi,

I just compiled FPC from trunk, and though it creates the various folders with the name 2.5.1, the binary indicates it's 2.4.0. Is there anything I need to change so that binaries get compiled and give the correct version when run? The only switch I changed when compiling was the install folder, since I have fpc 2.4.0 installed and I didn't want to replace it.

Or is the issue a non issue and I should just ignore it?

Regards,

Knitter

Reply by email

Martin
to Sérgio Lopes
S?rgio Lopes wrote 6 lines
Hi, I just compiled FPC from trunk, and though it creates the various folders with the name 2.5.1, the binary indicates it's 2.4.0. Is there anything I need to change so that binaries get compiled and give the correct version when run? The only switch I changed when compiling was the install folder, since I have fpc 2.4.0 installed and I didn't want to replace it. Or is the issue a non issue and I should just ignore it?

What OS are you on? what are the install locations? Are you sure the right executable is called?

I guess you call fpc or fpc.exe?
That is only a wrapper, and it then looks for a ppc386(.exe). So if your old ppc386 is in the path it may be found first.

Reply by email

Sérgio Miguel Neves Lopes
to Martin
What OS are you on? what are the install locations? Are you sure the right executable is called?

Sorry, should have given more information.

I'm compiling in OS X Snow Leopard.
FPC 2.4.0 was installed using the DMG from daily snapshots, and installed to the default locations. I compiled the trunk with that version of FPC and installed it into my home, ~/Tools/local/freepascal/fpc/bin/ to be exact. Source is in a folder at the same level as bin.

Inside ~/Tools/local/freepascal/fpc/bin I have the expected bin/, lib/ and share/.

I guess you call fpc or fpc.exe? That is only a wrapper, and it then looks for a ppc386(.exe). So if your old ppc386 is in the path it may be found first.

I executed './fpc -help' inside the ~/Tools/local/freepascal/fpc/bin/bin folder.

I'll take a look at the path issue, it probably is related.

Regards,

Knitter

Reply by email

Sérgio Miguel Neves Lopes
to Martin: What OS are you on? what are the install locations? Are you sure the right executable is…

Hi,

That is only a wrapper, and it then looks for a ppc386(.exe). So if your old ppc386 is in the path it may be found first.

From a small test, I think the path is the culprit, if I directly execute ppc386, it shows the correct version. I would like to ask for some instructions on how to properly setup my environment so that I can use FPC from trunk and have it as the system compiler.

My steps so far were:

1) checkout fpc and lazarus
'make all' on both using FPC 2.4.0 nightly builds
'sudo make install' on both
'fpc -help' shows version 2.4.0
couldn't figure out why the new files were not overriding the old ones, nor why I couldn't see a '2.5.1' folder created under /usr/local/lib/fpc.

2) completely removed fpc from the system using the script in the OS X Tips page in the wiki downloaded fpc bootstramp and tried to convert the instruction given for Windows to OS X failed miserably :)
remove all traces of fpc from my system

3) installed FPC 2.4.0 again
recompiled with 'make clean all' on both checkouts (lazarus and fpc) installed fpc to a new location ( as stated in the previous emai) using 'make install INSTALL_PREFIX=~/Tools/local/freepascal/fpc/bin'

Now I have two pascal versions, but the newer one is not being install, before I go ahead and start changing path settings and whatnot, is there any other process or compile/install settings I should try?

As you can see, compiling and installing from source is not something I'm used to doing with this king of building/deployment tools :)

Regards,

Knitter

Reply by email

Marco van de Voort
to Sérgio Lopes: I just compiled FPC from trunk, and though it creates the various folders with the name…
S?rgio Lopes wrote
I just compiled FPC from trunk, and though it creates the various folders with the name 2.5.1, the binary indicates it's 2.4.0. Is there anything I need to change so that binaries get compiled and give the correct version when run? The only switch I changed when compiling was the install folder, since I have fpc 2.4.0 installed and I didn't want to replace it. Or is the issue a non issue and I should just ignore it?

On *nix, the ppc386 or ppcx64 is a symlink to a directory with the version in it. This allows easy switching of versions.

Do a "which ppc386", go the relevant dir, delete the symlink, and remake it with 2.5.1 instead of 2.4.0

Reply by email

Hans-Peter Diettrich
to Sérgio Miguel Neves Lopes: From a small test, I think the path is the culprit, if I directly execute ppc386, it…
Show quoted text 9 lines
3) installed FPC 2.4.0 again recompiled with 'make clean all' on both checkouts (lazarus and fpc) installed fpc to a new location ( as stated in the previous emai) using 'make install INSTALL_PREFIX=~/Tools/local/freepascal/fpc/bin' Now I have two pascal versions, but the newer one is not being install, before I go ahead and start changing path settings and whatnot, is there any other process or compile/install settings I should try?

You can change the Lazarus Environment Options, to use the new fpc.

DoDi

Reply by email

Bernd Kreuss
to Sérgio Lopes: I just compiled FPC from trunk, and though it creates the various folders with the name…
S?rgio Lopes wrote
I just compiled FPC from trunk, and though it creates the various folders with the name 2.5.1, the binary indicates it's 2.4.0.

For some reason (i think it might be intentional) the "make install" does not really complete the installation. It puts everything into the /usr/local/lib/fpc/ sub-folders but it won't update (not even create if its missing) a symlink in your path that points to the newly installed ppc386 binary.

I accidentally stumbled upon this very same problem last week, I had a binary in my path that was from the 2.5.1 branch but some weeks older which suddenly started to produce strange problems with weird ppu version mismatches that I had never seen before. I updated the trunk, compiled and make install and did not notice that I still had this old ppc386 sitting in my path. I expected make install to make a symlink and/or replace what ever was there previously so I could instantaneously use it but it does not touch whatever is already at /usr/bin or /usr/local/bin, not even if there is must *manually* create/update the symlink at /usr/local/bin/ppc386 pointing to the correct binary.

Make sure you don't have any other such old and wrong symlinks elsewhere lying around anywhere in your path (/usr/bin or ~/bin or wherever else).

Reply by email

Sérgio Miguel Neves Lopes
to Hans-Peter Diettrich: You can change the Lazarus Environment Options, to use the new fpc. DoDi

Hi,

You can change the Lazarus Environment Options, to use the new fpc. DoDi

I would prefer to have bash use the new version.

Show quoted text 10 lines
On 17.08.2010 01:08, S?rgio Lopes wrote: > I just compiled FPC from trunk, and though it creates the various folders > with the name 2.5.1, the binary indicates it's 2.4.0. For some reason (i think it might be intentional) the "make install" does not really complete the installation. It puts everything into the /usr/local/lib/fpc/ sub-folders but it won't update (not even create if its missing) a symlink in your path that points to the newly installed ppc386 binary.

I have created the link, though installing from DMGs created ppcppc and ppcx64 and making from source didn't. Nevertheless I have changed the symlink to point to the new version.

Lazarus is also setup to use the sources from trunk and I think everything is working now.

Thanks for the help.

Regards,

Knitter

Reply by email