Sign in Join

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

Mailing lists / fpc-devel / 2011-03

Re-installing fpc

13 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Michael Schnell

I re-installed Linux, trashing the root director<y while keeping the user's home directories.

Now I need to re-install fpc (which I provide the newest svn version to all users in /usr/bin).

In one of the home directories I have the svn and an older fpc version to compile it.

I can do

sudo make clean all FPC=/home/mschnell/Downloads/fpc/ppc386

To compile fpc just fine.

But when I tried to install fpc to /usr/bin with (as root)

make install INSTALL_PREFIX=/usr

I dot some an error message about something missing, but not saying what would be missing where).

So I copied some flc* files from the old installation to /usr/bin.

not I get

Makefile:199: *** The Makefile doesn't support target can't-executed,, please run fpcmake first. Stop.

but when I try to do fpcmake in the source directory this does not help and when I try to do fpcmake in /usr/bin I get

Processing makefile.fpc
Error: Unable to open file "makefile.fpc"

and of course there is no makefile.fpc in /usr/bin, but in the old installation there was no, either.

What to do ?

Thanks,
-Michael

Reply by email

Henry Vermaak
to Michael Schnell
Michael Schnell wrote 12 lines
I re-installed Linux, trashing the root director<y while keeping the user's home directories. Now I need to re-install fpc (which I provide the newest svn version to all users in /usr/bin). In one of the home directories I have the svn and an older fpc version to compile it. I can do sudo make clean all FPC=/home/mschnell/Downloads/fpc/ppc386

There is no need to build as root. This is a very bad idea.

Show quoted text 9 lines
To compile fpc just fine. But when I tried to install fpc to /usr/bin with (as root) make install INSTALL_PREFIX=/usr I dot some an error message about something missing, but not saying what would be missing where).

It's hard to tell without the error message.

Henry

Reply by email

Thomas Schatzl
to Michael Schnell: I re-installed Linux, trashing the root director<y while keeping the user's home…

Hi,

Michael Schnell wrote 8 lines
I re-installed Linux, trashing the root director<y while keeping the user's home directories. Now I need to re-install fpc (which I provide the newest svn version to all users in /usr/bin). [...] But when I tried to install fpc to /usr/bin with (as root)

"make install" requires fpcmake in the path, or invoking it manually as you did, or put it into the FPCMAKE environment. I.e. "export FPCMAKE=/path/to/fpcmake".

Show quoted text 14 lines
make install INSTALL_PREFIX=/usr I dot some an error message about something missing, but not saying what would be missing where). So I copied some flc* files from the old installation to /usr/bin. not I get Makefile:199: *** The Makefile doesn't support target can't-executed,, please run fpcmake first. Stop. but when I try to do fpcmake in the source directory this does not help and when I try to do fpcmake in /usr/bin I get

Did you run "fpcmake -R -Tall" in the source directory? (-R means recursively dive into subdirectories and -Tall means for all targets)

What to do ?

Above should fix the issue.

Thomas

Reply by email

Jonas Maebe
to Thomas Schatzl: "make install" requires fpcmake in the path, or invoking it manually as you did, or put…
Thomas Schatzl wrote 8 lines
On Mon, 14 Mar 2011 10:48:50 +0100, Michael Schnell wrote: > Makefile:199: *** The Makefile doesn't support target > can't-executed,, please run fpcmake first. Stop. > > but when I try to do fpcmake in the source directory this does not > help and when I try to do fpcmake in /usr/bin I get Did you run "fpcmake -R -Tall" in the source directory? (-R means recursively dive into subdirectories and -Tall means for all targets)

That should not be necessary, all makefiles in svn contain support for all targets. The error "The Makefile doesn't support target can't-executed" indicates that the Makefile tried to execute the compiler to figure out for what target it should install files, but could not execute it (hence the "can't-executed" target name).

It's possible that fpcmake also needs to be in the path (I also remember that for some reason it's executed during make install), but it's not the cause of this particular error.

Jonas

Reply by email

Michael Schnell
to Henry Vermaak: There is no need to build as root. This is a very bad idea. It's hard to tell without…
Henry Vermaak wrote
There is no need to build as root. This is a very bad idea.

OK, I once was not able to do this as a normal user. I was not able to find out why. (supposedly some files were owned by root and could not be overwritten when making fpc as a user)

OTOH, I think I need to do make install as root if I want to provide fpc in /usr/bin to all users.

It's hard to tell without the error message.

This is obvious but right now I don't get this problem any more. I suppose I could reproduce it by deleting the fpc* files from /usr/bin.

I now think it's likely that fpcmake had been the file make install complained not to have.

Thanks,
-Michael

Reply by email

Michael Schnell
to Thomas Schatzl: "make install" requires fpcmake in the path, or invoking it manually as you did, or put…
Thomas Schatzl wrote
"make install" requires fpcmake in the path,

I did copy it to /usr/bin from the old system. (I never updated this file, could this be problematic ? )

or invoking it manually as you did,

..unsuccessfully :(

or put it into the FPCMAKE environment. I.e. "export FPCMAKE=/path/to/fpcmake".

supposedly not necessary as it can be found in /usr/bin

Did you run "fpcmake -R -Tall" in the source directory? (-R means recursively dive into subdirectories and -Tall means for all targets)

No.

So I did

fpcmake -r -Tall

And this seemed to recreate all make files.

But I still get

Makefile:199: *** The Makefile doesn't support target can't-executed,, please run fpcmake first. Stop.

when I do

make install INSTALL_PREFIX=/usr

Thanks,
-Michael

Reply by email

Michael Schnell
to Jonas Maebe: sudo make FPC=`pwd`/compiler/ppc386 install INSTALL_PREFIX=/usr Jonas
Jonas Maebe wrote
make FPC=`pwd`/compiler/ppc386 install INSTALL_PREFIX=/usr

This in fact runs seemingly without an error message and creates "fpc" and 32 more files in /usr/bin.

(Making me wonder why I did not need the parameter FPC=`pwd`/compiler/ppc386 before reinstalling Linux.)

But when doing "fpc" I get

Error: ppc386 can't be executed, error message: Failed to execute "ppc386", error code: 127

And in fact "ppc386" is not in /usr/bin

What did I do wrong ?

Thanks a lot,
-Michael

Reply by email

Jonas Maebe
to Michael Schnell
Michael Schnell wrote 5 lines
On 03/14/2011 11:14 AM, Jonas Maebe wrote: > make FPC=`pwd`/compiler/ppc386 install INSTALL_PREFIX=/usr This in fact runs seemingly without an error message and creates "fpc" and 32 more files in /usr/bin. (Making me wonder why I did not need the parameter FPC=`pwd`/compiler/ppc386 before reinstalling Linux.)

Because you had a ppc386 in the path, which the Makefile found by itself.

Show quoted text 7 lines
But when doing "fpc" I get Error: ppc386 can't be executed, error message: Failed to execute "ppc386", error code: 127 And in fact "ppc386" is not in /usr/bin What did I do wrong ?

"make install" does not create any symbolic links to change the default compiler to the newly installed one (because normally the latest released version should remain the default compiler, since it's the only one with which you can safely compile newer compiler versions). So if you want to overwrite or create it:

cd compiler
make FPC=./ppc386 installsymlink

Jonas

Reply by email

Michael Schnell
to Jonas Maebe
Jonas Maebe wrote
make FPC=./ppc386 installsymlink

Sorry for my silliness but I really fail to understand this complex stuff and can't help myself here.

I got this:

mschnell-Linux:/home/mschnell/Downloads/svn/fpc/trunk # cd compiler/

mschnell-Linux:/home/mschnell/Downloads/svn/fpc/trunk/compiler # ls -l ppc386
-rwxr-xr-x 1 root root 2349836 Mar 14 12:46 ppc386

mschnell-Linux:/home/mschnell/Downloads/svn/fpc/trunk/compiler # make FPC=./ppc386 installsymlink
make -C utils install
make[1]: Entering directory
`/home/mschnell/Downloads/svn/fpc/trunk/compiler/utils' Makefile:135: *** Compiler ./ppc386 not found. Stop. make[1]: Leaving directory
`/home/mschnell/Downloads/svn/fpc/trunk/compiler/utils' make: *** [utils_install] Error 2

:-(

Thanks
-Michael

Reply by email

Jonas Maebe
to Michael Schnell
Michael Schnell wrote
On 03/14/2011 01:20 PM, Jonas Maebe wrote: > make FPC=./ppc386 installsymlink Sorry for my silliness but I really fail to understand this complex stuff and can't help myself here.

make FPC=`pwd`/ppc386 installsymlink

Jonas

Reply by email