Recent

Author Topic: Fpcupdeluxe  (Read 332442 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 1844
Re: Fpcupdeluxe
« Reply #1185 on: February 26, 2019, 08:27:08 am »
Hello everyone, I think I found a bug in fpc and posted it here:: https://bugs.freepascal.org/view.php?id=35147

As you can read I got this bug through a cross compilation from win64 to win32 (actually I get problems also in cross compilation to darwin cocoa). Now they ask me if it's a real cross compilation or a native compiler. Obviously I installed it from fpcupdeluxe. Can someone help me? Thank you
Ubuntu and Mac
Lazarus: 1.8.0
FPC: 3.0.4

mangakissa

  • Hero Member
  • *****
  • Posts: 902
Re: Fpcupdeluxe
« Reply #1186 on: February 26, 2019, 09:52:25 pm »
I running a linux mint 19 on VM and want to run the latest trunk of lazarus / fpc.
I thought I download fpcupdeluxe for linux. Downloaded this version : fpcupdeluxe-x86_64-linux.

After downloading I iclick on the file., but the OS told me this is not an executable for linux mint.

Is this the right version or should I use a different?
Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10

howardpc

  • Hero Member
  • *****
  • Posts: 2989
Re: Fpcupdeluxe
« Reply #1187 on: February 26, 2019, 10:46:18 pm »
The versions are specific to processor type and bitness.
Is your computer hardware 32-bit or 64-bit?
The i386-linux is for 32-bit processors and operating systems, the x86-64-linux version for 64-bit.

jctaborda

  • New member
  • *
  • Posts: 21
Re: Fpcupdeluxe
« Reply #1188 on: February 26, 2019, 11:17:33 pm »
I running a linux mint 19 on VM and want to run the latest trunk of lazarus / fpc.
I thought I download fpcupdeluxe for linux. Downloaded this version : fpcupdeluxe-x86_64-linux.

After downloading I iclick on the file., but the OS told me this is not an executable for linux mint.

Is this the right version or should I use a different?

I dont use linux mint but it should be something like right click on the file, select properties and in one of the options you should mark this file as executable
Hospital Nacional de Clínicas
Universidad Nacional de Córdoba
www.unc.edu.ar

dbannon

  • Hero Member
  • *****
  • Posts: 564
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Fpcupdeluxe
« Reply #1189 on: February 27, 2019, 12:13:37 am »
...
or from a terminal if the filemanger is not cooperating -
Code: [Select]
chmod u+x fpcupdeluxe-x86_64-linux
Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

mangakissa

  • Hero Member
  • *****
  • Posts: 902
Re: Fpcupdeluxe
« Reply #1190 on: February 27, 2019, 08:58:59 am »
Permissions was the trick. But now I have another problem.
Quote
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: Missing library:
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: libX11.so
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: libgdk_pixbuf-2.0.so
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: libpango-1.0.so
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: libgdk-x11-2.0.so
fpcupdeluxe: WARNING: You need to install at least the libraries to get libX11.so and libgdk_pixbuf-2.0.so and libpango-1.0.so and libgdk-x11-2.0.so, but also make and binutils to build Lazarus !!
fpcupdeluxe: WARNING: Make, binutils, subversion/svn [and gdb] are also required !!
fpcupdeluxe: Start of compile error summary.
Missing some tools: please install missing tools!
fpcupdeluxe: Done !!
Why are these libraries missing? What do I need to get it right?
Lazarus 1.84 (32b) / FPC 3.0.4
Windows 10

dbannon

  • Hero Member
  • *****
  • Posts: 564
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Fpcupdeluxe
« Reply #1191 on: February 27, 2019, 11:39:02 am »

This doc indicates you need to install a range of things before using fpcupdeluxe :

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/blob/master/README.md

(I wonder why its not mentioned in the wiki page ? )

Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

MISV

  • Hero Member
  • *****
  • Posts: 554
Re: Fpcupdeluxe
« Reply #1192 on: February 28, 2019, 02:22:34 am »
I found an issue where compiling with -WM10.6 creates problems with FPCUpDeluxe version of fpc.cfg on Mojave.

See thread
http://forum.lazarus.freepascal.org/index.php?topic=44453.msg

where it is stated one has to run the 3.0.4a installer for it to make appropriate modifications of fpc.cfg for it to work on Mojave

Maybe worth including/considering? I am not sure.


DonAlfredo

  • Hero Member
  • *****
  • Posts: 1090
Re: Fpcupdeluxe
« Reply #1193 on: February 28, 2019, 09:33:14 am »
Fpcupdeluxe tries to detect the OSX version of the system you are installing FPC.
It will add a -WM-switch because of the (compiler) t_bsd.pas contents:
Code: Pascal  [Select]
  1. system_x86_64_darwin:
  2.               begin
  3.                 { 10.8 and later: no crt1.* }
  4.                 if CompareVersionStrings(MacOSXVersionMin,'10.8')>=0 then
  5.                   exit('');
  6.                 { x86: crt1.10.6.o -> crt1.10.5.o -> crt1.o }
  7.                 { others: crt1.10.5 -> crt1.o }
  8.                 if (target_info.system in [system_i386_darwin,system_x86_64_darwin]) and
  9.                    (CompareVersionStrings(MacOSXVersionMin,'10.6')>=0) then
  10.                   exit('crt1.10.6.o');
  11.                 if CompareVersionStrings(MacOSXVersionMin,'10.5')>=0 then
  12.                   exit('crt1.10.5.o');
  13.               end;
So, on anything >= 10.8, fpcupdeluxe (read: FPC) will not try to link with crt1.
It will also not add a library path for this file.

kevin.black

  • Full Member
  • ***
  • Posts: 115
Re: Fpcupdeluxe
« Reply #1194 on: March 01, 2019, 11:47:44 pm »
Hi,

Quote
So, on anything >= 10.8, fpcupdeluxe (read: FPC) will not try to link with crt1.
It will also not add a library path for this file.

That was not my experience. I'm using Lazarus 2.0.0RC3 rexported FPC 3.0.4 x86_64-darwin-cocoa (alpha) on a parallels VM running Mojave 10.14. When I tried to build a simple test application (Darwin/x86_64) with a simple DYLIB, FPC tried to link in both dylib1.10.5.o and crt1.10.5.o (it seemed to me that the 10.5 probably referred to macOS versions, but I don't know enough to make that leap and anyway, why is it trying to link 10.5 libraries on a 10.14 system?). I copied the from see below to /usr/lib and that got over the problem. http://forum.lazarus.freepascal.org/index.php/topic,44495.0.html
Code: Pascal  [Select]
  1. sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/crt1.10.5.o  /usr/lib/crt1.10.5.o

BUT see my notes on Apple System Integrity Protection (SIP).

Now as I note, why is FPC trying to link 10.5 libraries on a 10.14 system AND is this potentially why I cannot get the simple test application to 'see' the exported function in the simple test dylib (I suspect not, but clutching at straws)?

And now when I go back to setting the build configuration to i386 / Darwin with carbon widgets, when I try to build the simple Dylib I get this:
Quote
Compile Project, CPU: i386, Target: i386-darwin/libpdylibtest.dylib: Exit code 256, Errors: 1, Hints: 3
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Verbose: Free Pascal Compiler version 3.0.4 [2017/11/26] for i386
Verbose: Copyright (c) 1993-2017 by Florian Klaempfl and others
Verbose: Target OS: Darwin for i386
Verbose: Compiling pDYLIBTest.lpr
pDYLIBTest.lpr(22,20) Hint: Parameter "Hello" not used
Verbose: Assembling (pipe) /Users/kevin/Dropbox/Lazarus/DYLIBTest/lib/i386-darwin/pDYLIBTest.s
Verbose: Compiling resource /Users/kevin/Dropbox/Lazarus/DYLIBTest/lib/i386-darwin/pDYLIBTest.or
Verbose: Linking /Users/kevin/Dropbox/Lazarus/DYLIBTest/i386-darwin/libpdylibtest.dylib
ld: file not found: /usr/lib/dylib1.o       <<<<<-------------????????
An error occurred while linking
pDYLIBTest.lpr(49,0) Error: Error while linking
pDYLIBTest.lpr(49,0) Verbose: There were 1 errors compiling module, stopping
Verbose: Compilation aborted

So I (again) copied the file from the location above to /usr/lib and the Dylib now builds successfully.

This was provided by: Jonas Maebe in response to another of my posts:
Quote
Normally, if you installed FPC 3.0.4a (from https://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/3.0.4 ) after you installed macOS 10.14, and if you also (re)installed the command line tools after upgrading to macOS 10.14 (with sudo xcode-select --install), the FPC installer will have created a /etc/fpc.cfg file that contains the appropriate parameters so that this file can be found.

However, from another thread where someone used FPCUpDeluxe, it seems that program creates an alternate configuration file that overrides these settings. See http://forum.lazarus-ide.org/index.php/topic,44453.msg312787.html#msg312787 for the command line parameters to add so that the compiler/linker can find these files in case the fpc.cfg that contains them is not used for some reason.

Kevin
« Last Edit: March 02, 2019, 01:26:40 am by kevin.black »

BeRo

  • New member
  • *
  • Posts: 34
    • My site
Re: Fpcupdeluxe
« Reply #1195 on: March 14, 2019, 09:55:20 pm »
To solve the fppkg problem, find the hidden .fppkg directory under at the users directory and inside that directory delete default file under config directory. Then at the dialog screen, which pops up when starting the Lazarus IDE first time or there is problem with not founding the FPC source directory or other things etc, tell fppkg to create a new configuration file.

Do not work for me under Windows 10.

Cyrax

  • Hero Member
  • *****
  • Posts: 725
Re: Fpcupdeluxe
« Reply #1196 on: March 14, 2019, 10:18:27 pm »
To solve the fppkg problem, find the hidden .fppkg directory under at the users directory and inside that directory delete default file under config directory. Then at the dialog screen, which pops up when starting the Lazarus IDE first time or there is problem with not founding the FPC source directory or other things etc, tell fppkg to create a new configuration file.

Do not work for me under Windows 10.

Which version of FPC are you trying to install? Release (3.0.4) or fixes? Same question for Lazarus. If I recall correctly, there were some fixes - related to this - corrected on trunk versions of both these tools.

You may try to generate fppkg.cfg file and the default file with fpcmkcfg utility.

fppkg.cfg : fpcmkcfg -3
default : fpcmkcfg -4

fppkg.cfg template inside fpcmkcfg utility:
Quote
[Defaults]
ConfigVersion=5
LocalRepository=%LocalRepository%
BuildDir={LocalRepository}build/
ArchivesDir={LocalRepository}archives/
CompilerConfigDir=%CompilerConfigDir%
RemoteMirrors=https://www.freepascal.org/repository/mirrors.xml
RemoteRepository=auto
CompilerConfig=default
FPMakeCompilerConfig=default
Downloader=FPC
InstallRepository=user

[Repository]
Name=fpc
Description=Packages which are installed along with the Free Pascal Compiler
Path=%GlobalPath%
Prefix=%GlobalPrefix%

[IncludeFiles]
FileMask=%CompilerConfigDir%conf.d/*.conf

[Repository]
Name=user
Description=User-installed packages
Path={LocalRepository}%UserPathSuffix%
Prefix={LocalRepository}

Template of the default file:
Quote
[Defaults]
ConfigVersion=5
Compiler=%fpcbin%
OS=%fpctargetos%
CPU=%fpctarget%

ASBzone

  • Full Member
  • ***
  • Posts: 225
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Re: Fpcupdeluxe
« Reply #1197 on: March 19, 2019, 11:04:43 pm »
Introducing fpcupdeluxe.

https://github.com/newpascal/fpcupdeluxe/releases/latest



Feature requests:
1. Please remember previous selections on the Cross, Modules and ExtraSheet tabs.  Currently only remembers Basic.
2. Add a button to check and determine current versions vs installed versions/builds of just FPC and Lazarus.

Awesome app. Love it, love it, love it.
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.3 r61159 / FPC v3.2.0-beta-r42011 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1809 (Build 17763.379)
Other Systems: Windows 10 Pro x64, Version 1803 or greater

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1090
Re: Fpcupdeluxe
« Reply #1198 on: March 20, 2019, 07:31:10 am »
 :D
Could you elaborate on item 2 ? I do not understand exactly what you mean and want !

BeRo

  • New member
  • *
  • Posts: 34
    • My site
Re: Fpcupdeluxe
« Reply #1199 on: March 21, 2019, 12:04:52 am »
Which version of FPC are you trying to install? Release (3.0.4) or fixes? Same question for Lazarus. If I recall correctly, there were some fixes - related to this - corrected on trunk versions of both these tools.

SVN trunk versions of FPC and Lazarus.

But so far I build the SVN trunk versions of FPC and Lazarus mostly most of the time without help tools like fpcupdeluxe (also for several different crosscompiling targets together partly with own compiled binutils).

I just wanted to have a look at fpcupdeluxe for to make my job easier in order to save time, but that obviously causes more problems than building FPC and Lazarus manually without help tools. So I will avoid fpcupdeluxe now for the first time and continue to build FPC and Lazarus manually myself and instead continue my own no-yet-public-published PortableLazarus project as practically-sister project of CrossFPC (even if PortableLazarus is host-side-technical only for Windows in the moment), until fpcupdeluxe has improved in these problem points.

But I hope that fpcupdeluxe will still improve, also up to a point, where I would use it again.