You are not logged in.

#1 2005-03-06 13:40:21

Net@Worm
Member
From: Moscow, Russia
Registered: 2004-05-02
Posts: 214

Compiling lazarus

I have two qustions:
1. This program compiling by command 'make clean all', so how to compile it to $startdir/pkg direcory?
2.[solved] During compiling i have this error:

Error: Target "linux", package "rtl" not found
make[1]: *** [fpc_install] Error 1
make[1]: Leaving directory `/var/abs/local/lazarus/src/lazarus/lcl'
make: *** [lcl_install] Error 2

Offline

#2 2005-03-06 13:53:36

Net@Worm
Member
From: Moscow, Russia
Registered: 2004-05-02
Posts: 214

Re: Compiling lazarus

Ok, found solution for the second problem.

Offline

#3 2005-03-06 19:26:56

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Compiling lazarus

make clean all doesn't compile the program.  It just removes the compiled files and the temporary files from the build directory. To compile and install:

make || return 1
make DESTDIR=$startdir/pkg install

P.S. There is a template PKGBUILD in /var/abs (if you ran abs)

Offline

#4 2005-03-06 20:19:03

Net@Worm
Member
From: Moscow, Russia
Registered: 2004-05-02
Posts: 214

Re: Compiling lazarus

This is from official documentation:

1.2 Under Linux/BSD:

  Make sure, that you have installed X, gtk1 and gtk1-devel.

  Download and install FreePascal. Either the rpm, tgz or the daily snapshot.
  You need at least fpc 1.0.10 (1.0.x is the stable version of fpc, the 1.9 is
  the development version).

  To compile lazarus (LCL + IDE) go to your unpacked lazarus source and do:
  []$ make clean all

  You don't need "./configure" and you don't need "make install". You now have
  already a complete lazarus. You can start the IDE with "./lazarus".
  The "make install" as root will just copy the files and set some nice sym
  links and desktop entries.

But i think that you say is that i want, thnx.

Offline

#5 2005-03-07 17:06:14

Net@Worm
Member
From: Moscow, Russia
Registered: 2004-05-02
Posts: 214

Re: Compiling lazarus

Its doesn work sad.

Offline

#6 2005-03-07 17:16:13

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Compiling lazarus

Net@Worm wrote:

Its doesn work sad.

you need to check what the makefile uses for it's destination... it may use DESTDIR or destdir or prefix, or a bunch of other things... so open up the Makefile and look through it

Offline

#7 2005-03-07 19:33:08

Net@Worm
Member
From: Moscow, Russia
Registered: 2004-05-02
Posts: 214

Re: Compiling lazarus

Problem is lazarus wont compiling, if using command 'make install', but if 'make clean all' all ok.
In lazarus directory are two Makefiles: Makefile(very big) and Makefile.fpc.
In Makefile is INSTALL_PREFIX variable, which set to /usr/local.
But, again lazarus wont compile if using 'make install', he cant find the rtl unit, path to which set in /etc/fpc.cfg.

Offline

#8 2005-03-07 20:13:06

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Compiling lazarus

try:
make clean all
make INSTALL_PREFIX=$startdir/pkg install

Offline

#9 2005-03-07 23:15:49

Net@Worm
Member
From: Moscow, Russia
Registered: 2004-05-02
Posts: 214

Re: Compiling lazarus

Dont work.
'make clean all' - all compiling and work.
'make install' - dont compiling.
'make clean all; make install' - dont compiling.
PS: 'make install' recompiling all source, so i think i need use only 'make install' without 'make clean all'
PPS: 'dont compiling means that appearing this error:

/usr/bin/fpcmake -p -Tlinux Makefile.fpc
Processing Makefile.fpc
Error: Target "linux", package "rtl" not found
make[1]: *** [fpc_install] Error 1
make[1]: Leaving directory `/var/abs/local/lazarus/src/lazarus/lcl'
make: *** [lcl_install] Error 2
==> ERROR: Build Failed.  Aborting...

Then this error appearing for 'make clean all' it was bad configured /etc/fpc.cfg. But now 'make clean all' compiling so this cfg file configured ok.
PPS: 'make clean all' compiling and install lazarus to folder, there has been started 'make clean all', eg to the source folder.

Offline

#10 2005-03-07 23:40:15

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Compiling lazarus

Since 

'make clean all' - all compiling and work.

, I suggest the following:

In your PKGBUILD, use  'make clean all' to compile the program.  Then, copy the files in the foder that is created to $startdir/pkg/usr  (i.e. the executables in  $startdir/pkg/usr/bin, the libs in  $startdir/pkg/usr/lib, etc)

That should work.

Offline

#11 2005-03-07 23:46:17

Net@Worm
Member
From: Moscow, Russia
Registered: 2004-05-02
Posts: 214

Re: Compiling lazarus

It will work, but many files dont need to work lazarus, locating in this folder. And this package willn't looking good.

Offline

#12 2005-03-07 23:52:13

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Compiling lazarus

I thought from your previous post that it was installing lazarus and its components in a new folder.   

Look in the Makefile (probably in the install section) to know which files you need to run lazerus and copy them in $startdir/pkg as I explain in my previous post.

Offline

Board footer

Powered by FluxBB