Recent

Author Topic: [Solved] Unable install latest fpc from source  (Read 778 times)

JohnnieK

  • New Member
  • *
  • Posts: 28
[Solved] Unable install latest fpc from source
« on: September 09, 2024, 09:29:38 pm »
Hi

I am trying to build the current version of fpc which I downloaded via git: (git clone https://gitlab.com/freepascal.org/fpc/source.git) I am using the version of fpc that comes with the Lazarus 3.4 installer. I run make clean and then run make all.
Both commands completes without errors.

I then run: make install INSTALL_PREFIX=c:\fpc\

This stops with the following error:

Entering directory `C:/Users/jkotze/source/source/packages'
./fpmake.exe install --localunitdir=.. --os=win64 --cpu=x86_64 -o -Ur -o -Xs -o -O2 -o -n -o -dx86_64 -o -dRELEASE --compiler=C:/Users/jkotze/source/source/compiler/ppcx64.exe -bu --prefix=c:\fpc\ --baseinstalldir=c:\fpc\  -ie -fsp 0
Installing package bzip2
The installer encountered the following error:
Failed to create directory "C:\fpc --baseinstalldir=c:\fpc \units\x86_64-win64\bzip2\"

Does anyone know how to get past this error. Looks like the path that it wants to create has a space in it.
« Last Edit: September 10, 2024, 09:14:01 am by JohnnieK »

JohnnieK

  • New Member
  • *
  • Posts: 28
Re: Unable install latest fpc from source
« Reply #1 on: September 09, 2024, 09:57:12 pm »
if I change to the packages directory and then execute:
fpmake.exe install --localunitdir=.. --os=win64 --cpu=x86_64 -o -Ur -o -Xs -o -O2 -o -n -o -dx86_64 -o -dRELEASE --compiler=C:/Users/jkotze/source/source/compiler/ppcx64.exe -bu --prefix=c:\fpc\ --baseinstalldir=c:\fpc\  -ie -fsp 0
It runs through all the subdirs and completes without errors. The C:\fpc\units\x86_64-win64 now contains all the directories that should be there.
So why does the command fail when called from the script ?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11842
  • FPC developer.
Re: Unable install latest fpc from source
« Reply #2 on: September 09, 2024, 11:03:47 pm »
So why does the command fail when called from the script ?

I assume you mean Make?  Try to make sure it is an FPC packages make you execute, and not some msys or cygwin versions.  Maybe such make ignores windows conventions and treats the backslash as an escape.

 Also the "  -ie -fsp 0" stuff doesn't look very standard, and doesn't exist if I execute your simple make install command.
 

JohnnieK

  • New Member
  • *
  • Posts: 28
Re: Unable install latest fpc from source
« Reply #3 on: September 10, 2024, 09:12:16 am »
Hi Marco

Thanx for the reply. I checked and I am using the make.exe from the fpc 3.2.2 directory. I accidentally ran make install without the prefix and it ran through. I found the installation in c:\pp. It had the complete fpc install in there. So I just used that directory, tweaked an existing fpc.cfg file and used that to build the latest version of lazarus. I now have a working version of the latest version of fpc and Lazarus.

Thaddy

  • Hero Member
  • *****
  • Posts: 15979
  • Censorship about opinions does not belong here.
Re: Unable install latest fpc from source
« Reply #4 on: September 10, 2024, 09:22:00 am »
You are on Windows.
You probably also have Delphi installed?
Then call make with the fully qualified path to the fpc bootstrap bin directory of make,
E.g. (in my case)
Code: Bash  [Select][+][-]
  1. D:\fpcupdeluxe\fpcbootstrap\make clean all install INSTALL_PREFIX="D:\FPC331" PP=D:\fpcupdeluxe\fpcbootstrap\ppcx64.exe
FPC make and Borland/Embarcadero make are not compatible.
You are not using fpcupdeluxe that way: I merely use the build tools that happen to be in an fpcupdeluxe subdirectory. You are building from scratch.
If I smell bad code it usually is bad code and that includes my own code.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11842
  • FPC developer.
Re: Unable install latest fpc from source
« Reply #5 on: September 10, 2024, 10:13:51 am »
Hi Marco

Thanx for the reply. I checked and I am using the make.exe from the fpc 3.2.2 directory. I accidentally ran make install without the prefix and it ran through. I found the installation in c:\pp. It had the complete fpc install in there. So I just used that directory, tweaked an existing fpc.cfg file and used that to build the latest version of lazarus. I now have a working version of the latest version of fpc and Lazarus.

That only strengthens my suspicions that there is something in that path that modified make behaviour (a copy of sh.exe perhaps?)

Try to adjust the path so that it contains the FPC binary dir followed by the default windows directories

Code: Text  [Select][+][-]
  1. path c:\fpc\3.2.2\bin\i386-win32;C:\WINDOWS\system32;C:\WINDOWS

or something like that for your system and try again.

Thaddy: a non GNU make wouldn't come as far as the output that he shows.

dsiders

  • Hero Member
  • *****
  • Posts: 1260
Re: Unable install latest fpc from source
« Reply #6 on: September 10, 2024, 10:27:32 am »
if I change to the packages directory and then execute:
fpmake.exe install --localunitdir=.. --os=win64 --cpu=x86_64 -o -Ur -o -Xs -o -O2 -o -n -o -dx86_64 -o -dRELEASE --compiler=C:/Users/jkotze/source/source/compiler/ppcx64.exe -bu --prefix=c:\fpc\ --baseinstalldir=c:\fpc\  -ie -fsp 0
It runs through all the subdirs and completes without errors. The C:\fpc\units\x86_64-win64 now contains all the directories that should be there.
So why does the command fail when called from the script ?

Check for an unneed trailing space on the install prefix. Or quote it just like Thaddy did in his example.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

JohnnieK

  • New Member
  • *
  • Posts: 28
Re: [Solved] Unable install latest fpc from source
« Reply #7 on: September 13, 2024, 09:12:35 am »
Hi

I do not have Delphi installed and I did a search for make.exe over the entire machine and only the make.exe in the fpc 3.2.2 directory existed. As I said I accidentally ran make install without any prefix and then had a complete fpc install in c:\pp. So it seems that make install used c:\pp as the default.
I now have a working install and I have already deleted the bootstrap fpc, so I cannot test any further

 

TinyPortal © 2005-2018