* * *

Author Topic: Howto: compile releases from source for a local (user) installation  (Read 1570 times)

hanzer

  • Newbie
  • Posts: 3
Hello,

I am a hardware engineer, working in the sciences, and a fairly experienced Unix user but I am very new to the FPC/Lazarus software and community. I am exploring the possibility of adopting this technology for a new project.

My primary development platform is Scientific Linux (a RHEL clone like CentOS) but I would like to arrange a development process that will enable efficient and reliable product deployment and maintenance for multiple platforms (Linux/Unix, Mac, Windows). I am having some trouble getting started. Typically, I would 'checkout' the most recent release of the software (fpc/lazarus, in this case) from a revision control system then tinker with the build system and explore the organization - this gives me a "feel" for the style of the project and maybe a rough estimation of the quality and stability. Since this is unknown software, and since I probably need to track the latest release, I prefer a local (unprivileged user) installation. After this, I would go to the documentation to experience a few 'cookbook' examples ("hello, world") that demonstrate the technology.

So that is the process with which I am familiar. Is that reasonable or is the fpc/lazarus project arranged for a different installation-development method?


Leledumbo

  • Hero Member
  • *****
  • Posts: 7743
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Howto: compile releases from source for a local (user) installation
« Reply #1 on: June 24, 2017, 08:25:09 pm »
Nope, they're the same. The process is documented here:
http://wiki.lazarus.freepascal.org/Installing_Lazarus

Phil

  • Hero Member
  • *****
  • Posts: 2324
Re: Howto: compile releases from source for a local (user) installation
« Reply #2 on: June 24, 2017, 08:25:38 pm »
So that is the process with which I am familiar. Is that reasonable or is the fpc/lazarus project arranged for a different installation-development method?

I suppose there are a number of ways to get started with the FPC compilers and the Lazarus IDE. Maybe start by installing these:

https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20x86_64%20RPM/Lazarus%201.6.4/

You can also check out the FPC and / or Lazarus trunk sources and build those too. See wiki?

There are also several non-official tools for managing cross-compiling, etc.

If you're serious about cross-platform, you might start new projects with this package:

https://macpgmr.github.io/MacXPlatform/LazXProj.html

Then you'll get installers, etc. for free.

As for stability, I would break things down into tiers. Tier 1 is Windows and Linux - quite stable for quite a while, although the LCL is kind of vintage, late 90s stuff. Tier 2 is Mac - incomplete and really not a Mac IDE, just a Unix IDE that happens to run on Mac. Tier 3 would be the experimental things like Android.

However, even Tier 2 stuff might be sufficient for scientific software if you just need a basic UI.




avra

  • Hero Member
  • *****
  • Posts: 1171
    • Additional info
Re: Howto: compile releases from source for a local (user) installation
« Reply #3 on: June 24, 2017, 09:25:32 pm »
Cross compilation is not for beginners. Luckily, fpcupdeluxe tool makes cross compilation and having several Lazarus/FPC instances on the same pc very easy. Just one click away.

http://wiki.freepascal.org/fpcupdeluxe
ct2laz - Easily convert components and projects between Lazarus and CodeTyphon

hanzer

  • Newbie
  • Posts: 3
Re: Howto: compile releases from source for a local (user) installation
« Reply #4 on: June 24, 2017, 09:45:08 pm »
I suppose there are a number of ways to get started with the FPC compilers and the Lazarus IDE. Maybe start by installing these:

https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20x86_64%20RPM/Lazarus%201.6.4/
I am evaluating the technology. Installing an unknown/untrusted RPM isn't consistent with my goals.

You can also check out the FPC and / or Lazarus trunk sources and build those too. See wiki?
The wiki gives a few hints but it is surprisingly incoherent/incomplete. Perhaps with some guidance from experienced users, once I get the process sorted out I can update the documentation so the next person has a more direct, efficient and comprehensible route to getting started.

I think I might have discovered the location of the source and the basic directory layout for building on Linux, (but I am guessing). It might begin with something like this:

Code: [Select]
cd $BUILD
svn co https://svn.freepascal.org/svn/fpc/tags/release_3_0_2/ fpc
svn co https://svn.freepascal.org/svn/lazarus/tags/lazarus_1_6_4/ lazarus
svn co https://svn.freepascal.org/svn/fpcbuild/tags/release_3_0_2/ fpcbuild
svn co https://svn.freepascal.org/svn/fpcdocs/tags/release_2_6_0/ fpcdocs

There are also several non-official tools for managing cross-compiling, etc.

If you're serious about cross-platform, you might start new projects with this package:

https://macpgmr.github.io/MacXPlatform/LazXProj.html

Then you'll get installers, etc. for free.
Is cross-compiling the way to go? I had (naively?) envisioned a process where the design was developed on one platform then compiled on the other platforms.
 
As for stability, I would break things down into tiers. Tier 1 is Windows and Linux - quite stable for quite a while, although the LCL is kind of vintage, late 90s stuff. Tier 2 is Mac - incomplete and really not a Mac IDE, just a Unix IDE that happens to run on Mac. Tier 3 would be the experimental things like Android.

"LCL is kind of vintage" in what sense?

I don't need a Mac IDE (presuming compilation doesn't require the IDE) but I would like to deploy a Mac version of the product (a software application with GUI). Does that seem like a reasonable expectation for this technology (fpc/lazarus)?

However, even Tier 2 stuff might be sufficient for scientific software if you just need a basic UI.

One of, what I imagine to be, the more complicated interface components will involve embedding and controlling a media player, an interactive waveform viewer, and possibly other interactive data visualizations. Essentially, the GUI aspect of this software application can be thought of as an annotation interface, like a subtitle editor. Does that goal seem like a reasonable use of fpc/lazarus?
« Last Edit: June 24, 2017, 09:51:10 pm by hanzer »

Phil

  • Hero Member
  • *****
  • Posts: 2324
Re: Howto: compile releases from source for a local (user) installation
« Reply #5 on: June 24, 2017, 09:58:27 pm »
I had (naively?) envisioned a process where the design was developed on one platform then compiled on the other platforms.

Yes, that's the way I develop. I never cross-compile.
 
"LCL is kind of vintage" in what sense?

The set of LCL visual controls is really based on what was available with Windows 95 (and thus Delphi). For example, there is no standard Web control, which really is pretty essential these days.

I don't need a Mac IDE (presuming compilation doesn't require the IDE) but I would like to deploy a Mac version of the product (a software application with GUI). Does that seem like a reasonable expectation for this technology (fpc/lazarus)?

You will need the IDE on each platform that you want to compile on since the LCL UI units are included with the IDE. However, you can build with lazbuild on any platform, meaning you can automate the process from script/batch files.

One of, what I imagine to be, the more complicated interface components will involve embedding and controlling a media player, an interactive waveform viewer, and possibly other interactive data visualizations. Essentially, the GUI aspect of this software application can be thought of as a media annotation[/urlhttp://social.cs.uiuc.edu/projects/VCode/imgs/MainWindow.jpg] interface, like a [url=http://static.aegisub.org/img/screenshots/unix/audio-video-f1f81fc2.png]subtitle editor. Does that goal seem like a reasonable use of fpc/lazarus?

There are probably any number of components and packages for what you describe, but like most open source software, they will be of varying completeness, quality and compatibility with the current state of Lazarus.

On Mac, there are a vast number of visual and non-visual frameworks included with OS X, but using these in a Lazarus app is not for beginners.

https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html

hanzer

  • Newbie
  • Posts: 3
Re: Howto: compile releases from source for a local (user) installation
« Reply #6 on: June 25, 2017, 12:23:23 am »
The state of the documentation is beginning to make sense. To reiterate the goals of this thread - a concise, comprehensive method/recipe for compiling a complete development environment from source on Linux is needed.

I will check in on this thread a few more times during the next week or two. In the mean time, it's probably appropriate to redirect my attention towards other technologies.  Any recommendations? (PM or email is welcome).

Phil

  • Hero Member
  • *****
  • Posts: 2324
Re: Howto: compile releases from source for a local (user) installation
« Reply #7 on: June 25, 2017, 12:40:22 am »
The state of the documentation is beginning to make sense. To reiterate the goals of this thread - a concise, comprehensive method/recipe for compiling a complete development environment from source on Linux is needed.

Was this not helpful at all?

http://wiki.lazarus.freepascal.org/Installing_Lazarus#Installing_Lazarus_on_Scientific_Linux

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5875
Re: Howto: compile releases from source for a local (user) installation
« Reply #8 on: June 25, 2017, 12:42:15 am »
Free Pascal is compiled by itself. You will always need a free pascal compiler to compiler Free Pascal in anything but hypothetical cases.  Crosscompiling is easiest to windows, crosscompiling to Linux is possible but more complicated.   Easiest is with a full install, but a bit die-hard can do with just the compiler and one or two other binaries.

Crosscompiling to Mac OS X is a black art. Or at least used to be, I haven't had new Macs in a decade.

Anyway, while crosscompiling is generally doable, I would save it for when you are more experienced.

The buildfaq, while a bit dated document provides some background of the bootstrapping process. Most notably the first chapter, or at least 1.2.5
« Last Edit: June 25, 2017, 12:46:55 am by marcov »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus