Lazarus

Announcements => Free Pascal => Topic started by: marcov on March 29, 2020, 08:20:09 pm

Title: FPC 3.2.0rc1 released!
Post by: marcov on March 29, 2020, 08:20:09 pm
Hello,

We have placed the first release candidate of the Free Pascal Compiler
version 3.2.0 on our ftp servers.

You can help improve the upcoming 3.2.0 release by downloading and
testing this release. If you want you can report what you have done here:
http://wiki.freepascal.org/Testers_3.2.0 or in the maillist.

Changes that may break backwards compatibility will be documented at:
http://wiki.freepascal.org/User_Changes_3.2

Downloads are available at the main FTP server,

ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/

Enjoy!

The Free Pascal Compiler Team

For an overview of what is new see

https://wiki.freepascal.org/FPC_New_Features_3.2
Title: Re: FPC 3.2.0rc1 released!
Post by: Otto on March 29, 2020, 09:03:34 pm
Great news.
Title: Re: FPC 3.2.0rc1 released!
Post by: nouzi on March 29, 2020, 09:14:55 pm
Good news thanks
Title: Re: FPC 3.2.0rc1 released!
Post by: silvestre on March 29, 2020, 10:41:35 pm
Long hours and hard work behind. Selfless effort made available to many people, thank you for everything.  :)  :)
Title: Re: FPC 3.2.0rc1 released!
Post by: ASBzone on March 29, 2020, 10:48:51 pm
Hello,

We have placed the first release candidate of the Free Pascal Compiler
version 3.2.0 on our ftp servers.

ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/ (ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/)

Enjoy!

The Free Pascal Compiler Team

Thanks, Marcov and team for all the hard work!

Question: What is the relationship between this release and the fixes branch if I updated that, say, this morning Eastern Time?
Title: Re: FPC 3.2.0rc1 released!
Post by: zamtmn on March 29, 2020, 11:42:32 pm
Thanks!

At first glance there are no issues with my projects
Title: Re: FPC 3.2.0rc1 released!
Post by: Martin_fr on March 30, 2020, 12:01:06 am
For anyone looking to test those with Lazarus on Windows.
I have build Lazarus installers for
 - Lazarus 2.1 (trunk) + FPC 3.2rc1
 - Lazarus 2.0.7 (fixes 2.0) + FPC 3.2rc1

https://sourceforge.net/projects/lazarus-snapshots/files/

Those installers
- offer the option of a 2ndary install. So your main install will not be affected.
- are otherwise untested (not installed them myself to verify that the installed files work)
- contain a "lazarus build" of FPC RC1. That is, like all releases, the included FPC is not downloaded from FPC, but build from SVN (in this case from the 3.2RC1 tag).
Title: Re: FPC 3.2.0rc1 released!
Post by: kveroneau on March 30, 2020, 01:53:09 am
Awesome.  Since this is a release candidate, I am going to try and reproduce the same FCL memory leak I detected in csvdataset here where the variable FParser isn't being freed correctly.  I'd rather the release not contain this same bug. :D

You can read about my research into this leak, and how I managed to eventually resolve it by reading my last post on this thread:

https://forum.lazarus.freepascal.org/index.php/topic,49096.0.html

And if this isn't a bug, then please let me know how I should be freeing FParser in my own code.  I will update this post once I test the RC against the leak mentioned in my thread.

Looks like this memory leak is addressed in FPC 3.2.0 RC1!  Thank you guys!  Glad I wasn't the first one to notice this issue, however, it would have been nice if someone in the forums let me know it was an issue, and is going to be resolved in the next release.  After I did a test compile, heaptrc no longer showed a memory leak.  I checked the source code in FPC trunk, and I see that a FreeAndNil(FParser); was definitely added to the Destroy destructor, resolving the memory leak.
Title: Re: FPC 3.2.0rc1 released!
Post by: valdir.marcos on March 30, 2020, 03:28:51 am
For anyone looking to test those with Lazarus on Windows.
I have build Lazarus installers for
 - Lazarus 2.1 (trunk) + FPC 3.2rc1
 - Lazarus 2.0.7 (fixes 2.0) + FPC 3.2rc1

https://sourceforge.net/projects/lazarus-snapshots/files/

Those installers
- offer the option of a 2ndary install. So your main install will not be affected.
- are otherwise untested (not installed them myself to verify that the installed files work)
- contain a "lazarus build" of FPC RC1. That is, like all releases, the included FPC is not downloaded from FPC, but build from SVN (in this case from the 3.2RC1 tag).
Should we expect Lazarus 2.2.0 to be released shortly after FPC 3.2.0?
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on March 30, 2020, 05:04:53 am
Downloads are available at the main FTP server,
ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/

There is no x86_64-macos version - this rules out any Mac user with the current 64 bit only macOS 10.15.x Catalina operating system.
Title: Re: FPC 3.2.0rc1 released!
Post by: chenyuchih on March 30, 2020, 06:38:57 am
What a exciting news! (Even it's a release candidate.)

I've expected 3.2.0 for a long time. Thank you for all hard work of the FPC team!

Sincerely,
chenyuchih
Title: Re: FPC 3.2.0rc1 released!
Post by: avk on March 30, 2020, 07:53:00 am
Very good news, thanks to the FPC team!
Title: Re: FPC 3.2.0rc1 released!
Post by: guest58172 on March 30, 2020, 08:28:08 am
Thanks, it's very welcome. Nice to see that the interface helpers are here, I wanted them since years, although I almost dont program in FPC.
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on March 30, 2020, 09:40:59 am
Question: What is the relationship between this release and the fixes branch if I updated that, say, this morning Eastern Time?

The RC is based on the RC1 tag (https://svn.freepascal.org/cgi-bin/viewvc.cgi/tags/release_3_2_0_rc1/). So anything that happened in the fixes branch (https://svn.freepascal.org/cgi-bin/viewvc.cgi/branches/fixes_3_2/) since then isn't included in this release.

There is no x86_64-macos version - this rules out any Mac user with the current 64 bit only macOS 10.15.x Catalina operating system.

The i386-macosx (http://ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/i386-macosx/) release is a "fat" release. It contains both i386 and x86_64 compilers. See the Getting Started (Intel).rtf file inside the package.
Title: Re: FPC 3.2.0rc1 released!
Post by: soerensen3 on March 30, 2020, 10:40:57 am
Thanks for the hard work!  :)
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on March 30, 2020, 10:51:02 am
Question: What is the relationship between this release and the fixes branch if I updated that, say, this morning Eastern Time?

The fixes branch has a few handfuls of extra revisions. The rc1 branch is from 23feb.
Title: Re: FPC 3.2.0rc1 released!
Post by: zeljko on March 30, 2020, 11:32:15 am
Should we expect Lazarus 2.2.0 to be released shortly after FPC 3.2.0?

IMO no, first we must branch 2.2_fixes and I hope that it'll happen in 2-8 weeks after 3.2.0 release, after that RC candidates and then release, so with most optimistic scenario
major stable version could be released 6 months after 3.2.0 is released.
Title: Re: FPC 3.2.0rc1 released!
Post by: Bi0T1N on March 30, 2020, 11:46:42 am
Nice that there will be an official new version soon! :)

Changes that may break backwards compatibility will be documented at:
http://wiki.freepascal.org/User_Changes_3.2.0

There is no content on that site. Maybe it should be https://wiki.freepascal.org/User_Changes_3.2 (https://wiki.freepascal.org/User_Changes_3.2)?

There is no x86_64-macos version - this rules out any Mac user with the current 64 bit only macOS 10.15.x Catalina operating system.

The i386-macosx (http://ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/i386-macosx/) release is a "fat" release. It contains both i386 and x86_64 compilers. See the Getting Started (Intel).rtf file inside the package.
Maybe add an x86_64-macosx folder which redirects to i386-macosx ;)
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on March 30, 2020, 12:00:33 pm

There is no content on that site. Maybe it should be https://wiki.freepascal.org/User_Changes_3.2 (https://wiki.freepascal.org/User_Changes_3.2)?

I changed the first post, thanks.

As for the x86_64, for final releases there are webpages to explain them.
Title: Re: FPC 3.2.0rc1 released!
Post by: JuhaManninen on March 30, 2020, 12:02:42 pm
IMO no, first we must branch 2.2_fixes and I hope that it'll happen in 2-8 weeks after 3.2.0 release, after that RC candidates and then release, so with most optimistic scenario
major stable version could be released 6 months after 3.2.0 is released.
Well, the Lazarus 2.2 fixes could be branched even before FPC 3.2.0 release if we decided so. I am afraid 3.2.0 release is still far away.
On the other hand, there is no need to hurry now. Instead we should improve Lazarus trunk as much as possible before branching, thus preventing the extra effort of merging commits from trunk to fixes branch.
Also new features added now in trunk would make it to Lazarus 2.2, justifying and adding substance to a new major version number.
I believe many people now must restrict their activities and stay home more than usually. The time at home can be used for bug fixing. I personally study and fix Code Explorer now.
Patches are welcome! :)
Title: Re: FPC 3.2.0rc1 released!
Post by: argb32 on March 30, 2020, 12:06:12 pm
Great news!
But I downloaded the file:
ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/x86_64-linux/fpc-3.2.0rc1.x86_64-linux.tar
and when I run "bin/fpc" extracted from nested archive "base.x86_64-linux.tar.gz" it says:
[0.004] Free Pascal Compiler version 3.0.4 [2018/10/29] for x86_64
Not 3.2.0.
Is it intended?
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on March 30, 2020, 12:26:29 pm
Great news!
But I downloaded the file:
ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/x86_64-linux/fpc-3.2.0rc1.x86_64-linux.tar
and when I run "bin/fpc" extracted from nested archive "base.x86_64-linux.tar.gz" it says:
[0.004] Free Pascal Compiler version 3.0.4 [2018/10/29] for x86_64
Not 3.2.0.
Is it intended?

Yes. fpc searches for the real compiler in your path. Probably you have 3.0.4 installed, and that binary is in the path, and the just extracted 3.2.0 not.
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on March 30, 2020, 05:34:13 pm
IMO no, first we must branch 2.2_fixes and I hope that it'll happen in 2-8 weeks after 3.2.0 release, after that RC candidates and then release, so with most optimistic scenario
major stable version could be released 6 months after 3.2.0 is released.
Well, the Lazarus 2.2 fixes could be branched even before FPC 3.2.0 release if we decided so. I am afraid 3.2.0 release is still far away.
On the other hand, there is no need to hurry now. Instead we should improve Lazarus trunk as much as possible before branching, thus preventing the extra effort of merging commits from trunk to fixes branch.
Also new features added now in trunk would make it to Lazarus 2.2, justifying and adding substance to a new major version number.
I believe many people now must restrict their activities and stay home more than usually. The time at home can be used for bug fixing. I personally study and fix Code Explorer now.
Patches are welcome! :)

In that case and as you were the one who commited my PackageRequirements patch: would you maybe take a look at this (https://lists.lazarus-ide.org/pipermail/lazarus/2019-November/237254.html) mail of mine from November where I request some feedback about me implementing selection editors, please? :) The patches won't apply cleanly anymore, but that's not the point right now. The question is in what direction I should go, especially regarding the TPropertyEditor (Note: I'd prefer to discuss this on the mailing list).
Title: Re: FPC 3.2.0rc1 released!
Post by: JuhaManninen on March 30, 2020, 06:19:19 pm
would you maybe take a look at this (https://lists.lazarus-ide.org/pipermail/lazarus/2019-November/237254.html) mail of mine from November where I request some feedback about me implementing selection editors, please? :)
OK. I remember the mail but then I didn't quite understand what the selection editors were about.
I will study and try to understand it soon. (Not today though)
Title: Re: FPC 3.2.0rc1 released!
Post by: kveroneau on March 30, 2020, 07:18:07 pm
May I make a suggestion on how FPC releases could be done in the future to allow for releasing say a patched unit in the FCL, but keep the compiler/RTL coupled?

I think it would be very beneficial for both the FPC project and the developer community if the compiler/RTL were decoupled from the FCL.  This will allow fast and quick patching and/or improvements to the various FCL units, while the compiler/RTL can be released when they are known to be stable enough and production worthy.  This would essentially mimic the current FPC+Lazarus combos we see today, except with this, it will be FPC+FCL+Lazarus.  I understand how it might add some confusion, however when a developer downloads the FPC, they will have the option to also download the current FCL, or if they just want the RTL only for whatever reason, say embedded programming where most FCL units are not fully compatible, they can.  The current distribution of an all-in-one FPC install bundle should also be provided of course, as it currently is.

I'm just saying, it would be really nice to just patch the FCL once in awhile when a unit such as csvdataset is patched, but keep our current compiler/RTL.  As with Lazarus, the various FCL versions will need to denote which versions of the compiler/RTL it has been tested under, but for the most part, users won't be mixing and matching, they will just download the latest compiler/RTL/FCL install bundle as usual, and not even know that the contained FCL is even newer than the compiler/RTL.

I figure that generally FCL patches are easier to test, and usually will contain very critical patches such as for security vulnerabilities, memory leaks, and other bugs which may break applications if it is not patched soon.
Title: Re: FPC 3.2.0rc1 released!
Post by: kveroneau on March 31, 2020, 12:18:42 am
For anybody interested in checking out 3.2.0 through the relative safety of a Docker container, I hereby present a Docker project which will automagically download FPC 3.2.0rc1 from the official FTP, and it also downloads binutils and builds a GO32v2 binutils, and then downloads the 3.2.0rc1 source code, and builds a full cross-compiler for GO32v2!

For clarification, here is what is included through this Docker image:


This image is great if you are compiling anything against either Linux or 16/32-bit MS-DOS targets, but don't want to mess around with your local FPC configuration/installation.  It's nicely contained in the Docker container for your enjoyment.

Something worth noting if you do plan on using this for DOS development, is that you can run the image like this:

Code: Pascal  [Select][+][-]
  1. docker run -it -v `pwd`/src:/usr/src kveroneau/fpc:3.2.0
  2.  

This will bring you inside the docker image into a bash shell where you have all the usual FPC and Linux commands at your disposal.  The default working directory is /usr/src, and this directory is binded to your host operating system.  Knowing this, you can easily create a DOS build and test pipeline on your Linux workstation using DOSBox!  Inside DOSBox just use the mount command to mount the same directory from your host.  Then use the DOSBox disk cache clearing hotkey after a compile to easily run the 16-bit or 32-bit program within DOSBox.

Here is the GitHub repo for this, if you wanted to give it a go:  https://github.com/kveroneau/fpc-docker/tree/master/Builder/fpc320

I am thinking of creating a build and uploading it to my Docker Hub page for anyone can just do a docker pull and use it without having to hit the FPC FTP servers each time someone wants to generate it.

Another fun fact about this Dockerfile, is that you can easily update the version number of FPC without a real hassle, and add additional cross-compile targets as needed.  Neat!  I feel that Docker works better a build tool, than a deployment tool.

I have taken the liberty to push my docker image up to Docker Hub.  I updated the Docker run command above, and also added a simple test along with a Makefile which will build a 16-bit .COM, 16-bit .EXE, and a 32-bit .EXE.  The Makefile can run within the docker container to generate the output binaries.  I tested the created binaries in my local DOSBox and it looks like it's good to go for anybody who wants to jump into the RC1 of FPC 3.2.0 without installing it over their existing FPC production install.

Docker Hub page for image: https://hub.docker.com/layers/kveroneau/fpc/3.2.0/images/sha256-e64ed3081691278903372ef8c5db72338bff6e4af4f5a7f964bc0045db93d4fd?context=explore

The Docker container also has nano installed and I included a Delphi syntax highlighter as well. ;)
Title: Re: FPC 3.2.0rc1 released!
Post by: dbannon on March 31, 2020, 02:19:18 am
Great news, thanks indeed.

It is mentioned above that the snapshots already have a couple of fixes not present in RC1, does that mean that fixes present in the snapshot will flow into RC2 and we should be testing against the snapshot ?

Or is RC1 what we should be testing and that will only change if critical things are found ?

Another matter, I find little or no wiki content about how to install eg FPC 320, beta, RC1 or snapshot.  While I have worked out my own recipe to do so, it would help get people involved in this testing phase is if was, publicly, less of a black art.  Is there a wiki page I just did not find ?  If not, I assume no one is unhappy with me making one ?

Davo

Title: Re: FPC 3.2.0rc1 released!
Post by: kveroneau on March 31, 2020, 02:41:32 am
Another matter, I find little or no wiki content about how to install eg FPC 320, beta, RC1 or snapshot.  While I have worked out my own recipe to do so, it would help get people involved in this testing phase is if was, publicly, less of a black art.  Is there a wiki page I just did not find ?  If not, I assume no one is unhappy with me making one ?

The download tar provided, at least for Linux is formed exactly like a normal release tar.  You can just download the TAR file for Linux, extract it, and then run the usual install.sh as you normally would to install FPC in Linux.  I cannot say the same for either the Windows RC1 or OSX RC1, haven't tried downloading those.

In terms of getting more people involved, the Docker image I put up should give anyone with a recent Linux machine the ability to download a working copy into a Docker container and perform testing from within it.  The Dockerfile can be easily modified to support newer snapshots and/or RCs given it is provided in the same format as RC1 has been. :D

The Dockerfile also acts as a documentation on how to install FPC 3.2.0 as well, here's the full Docker command-line I used to install FPC 3.2.0 into the Docker image, which will also work outside of Docker of course. ;)

Code: Bash  [Select][+][-]
  1. $ cd /tmp && wget -O - ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/x86_64-linux/fpc-3.2.0rc1.x86_64-linux.tar|tar -xvf -
  2. $ cd /tmp/fpc-3.2.0rc1.x86_64-linux && bash install.sh && cd /root && rm -rf /tmp/fpc-3.2.0rc1.x86_64-linux
  3.  

Hope this information helps.
Title: Re: FPC 3.2.0rc1 released!
Post by: ASBzone on March 31, 2020, 03:28:16 am
Question: What is the relationship between this release and the fixes branch if I updated that, say, this morning Eastern Time?

The fixes branch has a few handfuls of extra revisions. The rc1 branch is from 23feb.

Ah, okay.  Thanks.   That is very helpful.
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on March 31, 2020, 09:48:52 am
May I make a suggestion on how FPC releases could be done in the future to allow for releasing say a patched unit in the FCL, but keep the compiler/RTL coupled?

The problem is that everything depending on that unit needs to be recompiled, so basically that already exists, it is called fpcdeluxe :-)
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on March 31, 2020, 10:00:13 am
May I make a suggestion on how FPC releases could be done in the future to allow for releasing say a patched unit in the FCL, but keep the compiler/RTL coupled?

As marcov said the problem is the dependencies. Especially if changes to an interface section are involved.

And what about bug reports? Currently user report against a fixed, released version (e.g. 2.6.4, 3.0.2) or trunk. If we'd separate the FCL or even split it then the user would have to report every version of the packages they use.

That said we're working on moving at least some packages to a more repository based approach (especially those that are simply library packages) with the help of fpmake and fppkg.
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on March 31, 2020, 10:13:27 am
That said we're working on moving at least some packages to a more repository based approach (especially those that are simply library packages) with the help of fpmake and fppkg.

From what I saw at the Berlin conference, that is still some time in the future:-)

Anyway, I just think that the current release form will mostly stay the same, just that the packages that are also in the package system will be registered to it. (though IMHO this means that package registry should not be in a global unit, but in installation directories to allow multiple versions)
Title: Re: FPC 3.2.0rc1 released!
Post by: Xor-el on March 31, 2020, 11:25:40 am
Hi all, the compiler in FPC 3.2.0 rc1 seems to generate bad code when the following optimizations and configurations are used.
-CpCOREAVX2
-OpCOREAVX2
OPTIMIZATION USELOADMODIFYSTORE (enabled by default in -O3).

A quick test indicates that this issue does not exist in 3.0.4.

Yet to draft a simple demo that reproduces this error.  :(
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on March 31, 2020, 11:36:10 am
Hi all, the compiler in FPC 3.2.0 rc1 seems to generate bad code when the following optimizations and configurations are used.
-CpCOREAVX2
-OpCOREAVX2
OPTIMIZATION USELOADMODIFYSTORE (enabled by default in -O3).

A quick test indicates that this issue does not exist in 3.0.4.

Yet to draft a simple demo that reproduces this error.  :(

If you do, please report it at https://bugs.freepascal.org
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on March 31, 2020, 11:43:48 am
would you maybe take a look at this (https://lists.lazarus-ide.org/pipermail/lazarus/2019-November/237254.html) mail of mine from November where I request some feedback about me implementing selection editors, please? :)
OK. I remember the mail but then I didn't quite understand what the selection editors were about.
I will study and try to understand it soon. (Not today though)

Selection editors allow to add/remove properties from the object inspector depending on the selection in the designer. In Delphi it's for example used for the TFlowPanel and TGridPanel to provide some of the non-published properties. To be more precise: if a control that's inside a TFlowPanel is selected then the Top and Left properties will be hidden (they can't be changed anyway) and a ControlIndex property will be added that allows to control the position of the control in the flow panel. With my changes that also works in Lazarus with its TFlowPanel. This mechanism can be used for other "magic" properties as well.
Title: Re: FPC 3.2.0rc1 released!
Post by: Xor-el on March 31, 2020, 11:58:32 am

Yet to draft a simple demo that reproduces this error.  :(

If you do, please report it at https://bugs.freepascal.org

will do.  :)
Title: Re: FPC 3.2.0rc1 released!
Post by: dbannon on March 31, 2020, 02:14:15 pm
OK, I found it easy enough to install RC1 on a beta of (March 30) Ubuntu20.04.  The repo has RPMs but no Debs and I really did not like the look of the install script, run as root ? no thanks.

So, I converted the rpm to a deb with alien  (fakeroot alien --scripts fpc-3.2.0-0.rc1.x86_64.rpm). Lintian found enough problems with the resulting deb to publish in a small paperback but it did install OK on my clean U20.04 vm.  However, seems alien overlooked the dependencies so I found it necessary to "apt install binutils make gcc" before using apt to install the deb (remembering, of course to set an explicit path to the deb).

The result was a working compiler, so, I got confident and pulled down Lazarus trunk and, sure enough it compiled that fine too. Manually installed the fpc scr tar.gz and up came Lazarus in all its glory !  Did have a problem with running the default demo empty form in Lazarus but thats probably some Lazarus issue I have overlooked. Tomorrow's problem.

Posting this, as much as anything else, so other in the Debian fold can easily install.

Davo
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on March 31, 2020, 03:45:42 pm
OK, I found it easy enough to install RC1 on a beta of (March 30) Ubuntu20.04.  The repo has RPMs but no Debs and I really did not like the look of the install script, run as root ? no thanks.

You can just as well install into a custom directory. Just make sure that the bin directory is in PATH and that there are symlinks to the compiler binaries in the lib subdirectory so that you can call the compiler driver fpc and that in turn can call the real compiler ppc386, ppcx64, etc.
Title: Re: FPC 3.2.0rc1 released!
Post by: kveroneau on March 31, 2020, 05:39:43 pm
OK, I found it easy enough to install RC1 on a beta of (March 30) Ubuntu20.04.  The repo has RPMs but no Debs and I really did not like the look of the install script, run as root ? no thanks.

You can just as well install into a custom directory. Just make sure that the bin directory is in PATH and that there are symlinks to the compiler binaries in the lib subdirectory so that you can call the compiler driver fpc and that in turn can call the real compiler ppc386, ppcx64, etc.

When I use the install.sh script to install whichever version, I run the script as my user, and place the installation into my home directory on Debian.  Has been working perfectly, no issues besides needing to recompile the TextMode IDE if I plan to use it, so that it links to the correct libraries on my system.
Title: Re: FPC 3.2.0rc1 released!
Post by: DonAlfredo on April 01, 2020, 09:58:21 am
Fpcupdeluxe, latest release, now has the possibility to install release candidates.

Navigate towards the tags-tab.
The lists will be filled from online sources.
Select the tag you want to use.
Press add tag.
It will be added towards the bottom of the normal target selection list in the basic tab.

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/latest
Title: Re: FPC 3.2.0rc1 released!
Post by: Bi0T1N on April 01, 2020, 12:38:13 pm
Downloads are available at the main FTP server,

ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/

Is there any faster mirror? I'm only getting a max download speed of 400kb/s. %)

Also the ftp protocol should be replaced with http/https because webbrowsers are going to remove FTP support completely. Chrome (https://developers.google.com/web/updates/2019/12/chrome-80-deps-rems) this month and Firefox (https://groups.google.com/forum/#!msg/mozilla.dev.platform/FqCZUT9ay_o/jt4DLRDjAwAJ) in beginning of 2021.
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on April 02, 2020, 06:11:54 am
From the release testing procedure:
Code: [Select]
5. open the installed hello.pp in IDE
6. make a minor change in the demo in IDE & save it
7. compile the demo file in IDE
8. run the demo within the IDE (debugger)
9. view documentation in IDE, traverse 2-3 pages (at least one with screenshots)
...
11. run testsuite

Which IDE is being talked about?

Where's the "test suite"?

It's also a little disheartening to see that only two users have signed up for testing (https://wiki.freepascal.org/Testers_3.2.0#Release_Testing_Procedure), and both macOS users.
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on April 02, 2020, 09:36:54 am
From the release testing procedure:
Code: [Select]
5. open the installed hello.pp in IDE
6. make a minor change in the demo in IDE & save it
7. compile the demo file in IDE
8. run the demo within the IDE (debugger)
9. view documentation in IDE, traverse 2-3 pages (at least one with screenshots)
...
11. run testsuite

Which IDE is being talked about?

This is about a FPC release. So it can only talk about the textmode IDE.

Where's the "test suite"?

It's normally located in $fpsrc/tests, though I'm not really sure if a) we distribute it with the releases and b) if it would work without the sources. Also considering that we don't have 0 failures on any platform I don't think it would be that useful of the testers to run them anyway - cause they can't determine whether the test failure is a known one or not.
Title: Re: FPC 3.2.0rc1 released!
Post by: dbannon on April 02, 2020, 12:06:37 pm
trev, the ide ? if you have set your path to the fp bin dir, the command is 'fp'.   Its sure brings back memories !

The tests are in the source tar.gz, its extracted to fpc-3.2.0rc1/tests

Now, my question ?

Having completed the tests, what do we do with the report ?   In my case, its quite detailed -
Code: [Select]
Total = 7754 (25:7729)
Total number of compilations = 4781 (13:4768)
Successfully compiled = 3606
Successfully failed = 1162
Compilation failures = 9
Compilation that did not fail while they should = 4
Total number of runs = 2973 (12:2961)
Successful runs = 2961
Failed runs = 12
Number units compiled = 152
Number program that should not be run = 477
Number of skipped tests = 504
Number of skipped graph tests = 10
Number of skipped interactive tests = 31
Number of skipped known bug tests = 7
Number of skipped tests for other versions = 4
Number of skipped tests for other cpus = 267
Number of skipped tests for other targets = 185
make[1]: Leaving directory '/home/dbannon/fpcsrc/fpc-3.2.0rc1/tests'
We have successful fails, things that should fail but did not, but particularly 12 "Failed Runs". Do we need to provide details of those failed runs ? 

This log seems to have had a number of failures too -

https://www.freepascal.org/testsuite/cgi-bin/testsuite.cgi

Davo
 
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on April 02, 2020, 12:57:41 pm
trev, the ide ? if you have set your path to the fp bin dir, the command is 'fp'.   Its sure brings back memories !

macOS - no such binary in /usr/local/bin, but I do have a (mislocated) man page for it.

Quote
The tests are in the source tar.gz, its extracted to fpc-3.2.0rc1/tests

Thanks!
Title: Re: FPC 3.2.0rc1 released!
Post by: dbannon on April 02, 2020, 01:10:37 pm

macOS - no such binary in /usr/local/bin, but I do have a (mislocated) man page for it.


I think I read a comment from one of the Great Ones recently to the effect that text mode IDE [did not exist; would not exist] on the Mac. But I cannot find it just now.
Might be completely bogus ....

Davo
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on April 02, 2020, 01:51:13 pm
I think I read a comment from one of the Great Ones recently to the effect that text mode IDE [did not exist; would not exist] on the Mac. But I cannot find it just now.

Hmmm - this wiki page (https://wiki.lazarus.freepascal.org/How_to_get_the_fpc_ide_running_under_Mac_OS_X) suggests it did once upon a time run on macOS using Quartz/X11. As it's not in the current macOS RC1, I guess it's no longer supported despite the man page.
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on April 02, 2020, 03:02:51 pm
Having completed the tests, what do we do with the report ?   In my case, its quite detailed -

And that's why I doubt that it's useful for testers to run the tests. :-X At most you could compare your test results against one of the official ones for the same target with the same settings and report differences... (for a list of failed tests you can look at $fpcsrc/tests/output/<cpu>-<os>/faillist)

I think I read a comment from one of the Great Ones recently to the effect that text mode IDE [did not exist; would not exist] on the Mac. But I cannot find it just now.

Hmmm - this wiki page (https://wiki.lazarus.freepascal.org/How_to_get_the_fpc_ide_running_under_Mac_OS_X) suggests it did once upon a time run on macOS using Quartz/X11. As it's not in the current macOS RC1, I guess it's no longer supported despite the man page.

Correct. Jonas does not want to support the IDE on macOS (for many years already), so the best would be a bug report to remove the man page for that target as well.
Title: Re: FPC 3.2.0rc1 released!
Post by: jma_sp on April 02, 2020, 03:52:39 pm
I have installed under Haiku (32 bits & 64) latests builds and seems to works ok with exception of fp IDE.
Menu keyboard not ever works (by example keys combination in menu).
When editing code characteres appear and dissapear or move.
And when mouse moves while editing code it show a stream of numbers.

Thanks for making possible to have freepascal under Haiku  :D

Title: Re: FPC 3.2.0rc1 released!
Post by: trev on April 03, 2020, 07:48:06 am
Hmmm - this wiki page (https://wiki.lazarus.freepascal.org/How_to_get_the_fpc_ide_running_under_Mac_OS_X) suggests it did once upon a time run on macOS using Quartz/X11. As it's not in the current macOS RC1, I guess it's no longer supported despite the man page.

Correct. Jonas does not want to support the IDE on macOS (for many years already), so the best would be a bug report to remove the man page for that target as well.

Done - bug 36861 (https://bugs.freepascal.org/view.php?id=36861).
Title: Re: FPC 3.2.0rc1 released!
Post by: piola on April 04, 2020, 02:13:51 pm
In i386-win32, there's both the native compiler and the cross compiler for 64bit, which is what I'd expect.

In x86_64-win64, however, there seems to be only the native compiler. How do I get the cross-compiler for win32?
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on April 05, 2020, 01:22:56 pm
In i386-win32, there's both the native compiler and the cross compiler for 64bit, which is what I'd expect.

In x86_64-win64, however, there seems to be only the native compiler. How do I get the cross-compiler for win32?

We do not provide a cross compiler from Win64 to any other x86 target, because Win64 does not support the Extended type which is supported by all other x86 targets (there are plans for software emulation, but this is currently not fully implemented).

What you can do however is to simply copy the ppc386 from the distribution as well as the units and copy that into your x86_64 installation (you should copy the binary into %fpcdir%\bin\x86_64-win64 next to the fpc.exe) then you can use fpc -Pi386 just as well.
Title: Re: FPC 3.2.0rc1 released!
Post by: Dmitry24 on April 05, 2020, 02:02:13 pm
Tried to install a DOS version by the link
ftp://ftp.freepascal.org/pub/fpc/beta/3.2.0-rc1/go32v2

fp.exe file was not extracted. Different extractors report a data error for the inner archive idedos.zip (7zip, Windows Explorer, oth.).
Title: Re: FPC 3.2.0rc1 released!
Post by: dbannon on April 08, 2020, 04:46:15 am
And just for the record -

I have used rc1 on 64 bit Linux to build cross compilers (32bit Linux, 32 and 64 bit Windows) and used them to build my 15k line Lazarus project.  No FPC issues.

Davo
Title: Re: FPC 3.2.0rc1 released!
Post by: neerajsati on April 16, 2020, 05:31:45 am
Thanks team.
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on April 16, 2020, 08:03:32 am
It's somewhat disappointing that only three users (2x macOS, 1x Ubuntu) signed up and did the requested tests of FPC 3.2.0RC1 (https://wiki.freepascal.org/Testers_3.2.0).
Title: Re: FPC 3.2.0rc1 released!
Post by: Martin_fr on April 16, 2020, 01:24:35 pm
Well there are a few people testing it with Lazarus: https://sourceforge.net/projects/lazarus-snapshots/files/ there are some downloads for Windows. ( Laz 2.1 & 2.0.7 // the 2.0.8 files are all new, so no one had a chance yet)
(The win installers probably do not have the latest docs included)
Title: Re: FPC 3.2.0rc1 released!
Post by: MathMan on April 21, 2020, 09:46:08 am
Hello all,

First of all thanks to all contributors for the new release candidate. I know I am late to the party but I finally got around testing the Win64 version against my own library. I used O4 plus -CpCOREI - OpCOREI on a Nehalem processor

* the library uses a lot of required typecasting and tricky code linearizations
* all library tests (several thousands) passed
* I saw speed improvements (compared to FPC 3.0.4) of 3%-10% depending on function type and size of operands

From my perspective its looking good.

Kind regards,
MathMan
Title: Re: FPC 3.2.0rc1 released!
Post by: TCH on May 15, 2020, 12:16:15 pm
Any news on FPC 3.2?
Title: Re: FPC 3.2.0rc1 released!
Post by: Thaddy on May 15, 2020, 02:46:03 pm
Shortly. It is tagged for release and being build for supported platforms. weeks not months now, afaik.
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on May 16, 2020, 01:03:02 am
Any news on FPC 3.2?

You could help by  testing RC1 (https://wiki.lazarus.freepascal.org/Testers_3.2.0). The harvest is plentiful, but the workers are few.
Title: Re: FPC 3.2.0rc1 released!
Post by: jiaxing2 on May 16, 2020, 04:33:10 am
Shortly. It is tagged for release and being build for supported platforms. weeks not months now, afaik.

I hope the developer/packager would package a jvm cross compiler for Linux.

They provided one for Windows, didn't they?

On Linux, we only have a cross compiler for msdos.
Title: Re: FPC 3.2.0rc1 released!
Post by: Thaddy on May 16, 2020, 07:56:18 am
It is not too difficult to build the jvm cross compiler on linux your self. Just follow the steps in the wiki and make sure you have the correct toolchain (jasmin etc)
Parent platform does not matter too much as long as it supports Java. https://wiki.freepascal.org/FPC_JVM
Title: Re: FPC 3.2.0rc1 released!
Post by: Zoran on May 16, 2020, 06:58:47 pm
(Tested on Windows 7, 32-bit)

Val procedure (https://www.freepascal.org/docs-html/current/rtl/system/val.html) (and StrToFloat (https://www.freepascal.org/docs-html/current/rtl/sysutils/strtofloat.html) as well) fails with SIGFPE with Math.MaxDouble.

As Val should never raise exception (but only return non-zero value in third parameter), this is even more annoying.

First, take a look at this simple programme. It works with FPC 3.0.4, but not with FPC 3.2:

Code: Pascal  [Select][+][-]
  1. program project1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses SysUtils, Math;
  6.  
  7. var
  8.   D1, D2: Double;
  9.   S: AnsiString;
  10.   E: Integer;
  11. begin
  12.   D1 := Math.MaxDouble;
  13.   WriteLn('D1 = ', D1);
  14.  
  15.   S := FloatToStr(D1);
  16.   // If you replace the previous line with any of the following two, then everything works!
  17.   // But the difference is only in + sign in front of exponent.
  18.   //WriteStr(S, D1);
  19.   //Str(D1, S);
  20.  
  21.   WriteLn('S = ', S);
  22.   Val(S, D2, E);  // SIGFPE here!
  23.   //D2 := StrToFloat(S); // same with this, as it uses Val internally.
  24.  
  25.   WriteLn('D2 = ', D2);
  26.   ReadLn;
  27. end.
  28.  

Now, let's see:
First, the declaration of Math.MaxDouble changed in FPC 3.2
In 3.0.4 it was:
MaxDouble    =  1.7e+308;
And in 3.2 it is:
MaxDouble    =  1.7976931348623157e+308;

Now, if we use old Pascal Str function, or WriteStr, then we get '1.7976931348623157e+308' as result.
FloatToStr gives us '1.7976931348623157e308' (the difference is only in + sign in the exponent).

Then without this + sign, Val gives SIGFPE!

However, it seems that this bug in Val only appears when string value has 16 digits (and MaxDouble has it in FPC 3.2).

Title: Re: FPC 3.2.0rc1 released!
Post by: BeRo on May 21, 2020, 06:51:33 pm
Hm, it seems that the for anti-TEvent-deadlock-on-linux patch https://bugs.freepascal.org/view.php?id=36149 is not merged into 3.2.0 yet. So, my request would be to merge this patch from trunk into 3.2.0.
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on May 21, 2020, 07:05:54 pm
Hm, it seems that the for anti-TEvent-deadlock-on-linux patch https://bugs.freepascal.org/view.php?id=36149 is not merged into 3.2.0 yet. So, my request would be to merge this patch from trunk into 3.2.0.

3.2.0 final sources have already been uploaded.
Title: Re: FPC 3.2.0rc1 released!
Post by: scamp on May 21, 2020, 08:43:38 pm
I know I am very very late to the game, and I know we should have pushed for inclusion of our bug fix earlier, and should have made it clearer that this is not a "minor" issue as it was classifed.

So, I'll be clear NOW:

Each and every multi-threaded FPC/Lazarus application will sooner or later Deadlock on TEvent, causing a complete unrecoverable failure of the program. Finding out what the issues might take the average user weeks.

It's a terrible nasty bug that sometimes may take ages to show up again, but if it does, you are doomed.

I really really REALLY believe this is an absolute must-fix bug for the stable branch of FPC.

Please consider to stop the release and pull in this fix. The fix is heavily tested by us under load for months, is stable and does not have any side effects - it simply stops FPC server deamons to sooner or later deadlock.
Title: Re: FPC 3.2.0rc1 released!
Post by: AlexTP on May 21, 2020, 10:08:26 pm
If the above post is correct (I don't know it) - please merge that fix. I use TEvent in CudaText.
Title: Re: FPC 3.2.0rc1 released!
Post by: AlexTP on May 22, 2020, 07:44:27 pm
Please merge my fixes to TRegExpr upstream
https://github.com/andgineer/TRegExpr/commits/master
Title: Re: FPC 3.2.0rc1 released!
Post by: markusloew on May 23, 2020, 10:21:23 am
Hello,
I would like to contribute to a new FPC version. Who are the people coordinating FPC development? How to join the specific team?
It would be nice to make run FPC on a System 360. TK4 MVS.
Regards markusloew
PS I do not find the method to open a new topic.
sending a message exceeds knowing someone to be adressed.
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on May 23, 2020, 11:28:18 am
Hello,
I would like to contribute to a new FPC version. Who are the people coordinating FPC development? How to join the specific team?
It would be nice to make run FPC on a System 360. TK4 MVS.
Regards markusloew
PS I do not find the method to open a new topic.
sending a message exceeds knowing someone to be adressed.

First of this is the announcement forum, you simply don't have the necessary permissions to start a new topic here. For your topic (a port for System 360) you should look at the Free Pascal -> FPC development forum or use the fpc-devel (https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel) mailing list.
Also you don't simply join the core team. You can get access to your own SVN branch and work there or you fork the unofficial mirror (https://github.com/graemeg/freepascal/) on GitHub. You then work on your port and then present your work (either on the mailing list or the Bugtracker (https://bugs.freepascal.org)) and we core devs will integrate it if it's okay or pass it back to you for improvements. Once your new port is integrated then or if you further "prove your worth" you'll be elevated to a team member.
Additionally someone else has started to work on a port for the ZSeries (https://wiki.freepascal.org/ZSeries). I don't know if they still work on it or if there were any results, but maybe you can use that as a starting point.
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on May 23, 2020, 11:40:19 am
Please merge my fixes to TRegExpr upstream
https://github.com/andgineer/TRegExpr/commits/master

Please provide cleaned up, minimal patches in the bugtracker.
Title: Re: FPC 3.2.0rc1 released!
Post by: AlexTP on May 27, 2020, 05:13:29 pm
Quote
>Please provide cleaned up, minimal patches in the bugtracker.
Sorry, no time for this. I mean to make patch VERSUS CURRENT TRUNK - lot of diffs.
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on May 27, 2020, 05:52:49 pm
Quote
>Please provide cleaned up, minimal patches in the bugtracker.
Sorry, no time for this. I mean to make patch VERSUS CURRENT TRUNK - lot of diffs.

Yes. That is how it should be. If changes are not related, multiple patches even, it makes reviewing easier.
Title: Re: FPC 3.2.0rc1 released!
Post by: Sabria on June 05, 2020, 02:46:15 pm
This is what I was looking for!
Title: Re: FPC 3.2.0rc1 released!
Post by: markusloew on June 14, 2020, 10:57:28 am
Hello,
I would like to contribute to a new FPC version. Who are the people coordinating FPC development? How to join the specific team?
It would be nice to make run FPC on a System 360. TK4 MVS.
Regards markusloew
PS I do not find the method to open a new topic.
sending a message exceeds knowing someone to be adressed.

First of this is the announcement forum, you simply don't have the necessary permissions to start a new topic here. For your topic (a port for System 360) you should look at the Free Pascal -> FPC development forum or use the fpc-devel (https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel) mailing list.
Also you don't simply join the core team. You can get access to your own SVN branch and work there or you fork the unofficial mirror (https://github.com/graemeg/freepascal/) on GitHub. You then work on your port and then present your work (either on the mailing list or the Bugtracker (https://bugs.freepascal.org)) and we core devs will integrate it if it's okay or pass it back to you for improvements. Once your new port is integrated then or if you further "prove your worth" you'll be elevated to a team member.
Additionally someone else has started to work on a port for the ZSeries (https://wiki.freepascal.org/ZSeries). I don't know if they still work on it or if there were any results, but maybe you can use that as a starting point.

THANK YOU VERY MUCH FOR YOUR HELP ::)
Title: Re: FPC 3.2.0rc1 released!
Post by: AlexTP on June 16, 2020, 10:25:54 am
Will FPC 3.2 have fix for FreeBSD 12? Reported on Oct 2019 in mail list, see "freebsd" at
https://lists.freepascal.org/pipermail/fpc-pascal/2019-November/subject.html
https://lists.freepascal.org/pipermail/fpc-pascal/2019-October/subject.html
Title: Re: FPC 3.2.0rc1 released!
Post by: PascalDragon on June 16, 2020, 01:26:47 pm
From what I can see revision 41967 (https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=41967) (which is even older than your mails) has not been merged back to fixes. So no, FPC 3.2 will not have that fix.
Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 16, 2020, 01:37:49 pm
Only fpc installed from official FreeBSD pkg is working (fpc 3.0.4).

Code: Bash  [Select][+][-]
  1. $ sudo pkg install fpc
  2. $ sudo pkg install lang/fpc-units

fpc installed from source (3.0.4, 3.2.0 or 3.3.1) produce not working executable.

http://free-pascal-general.1045716.n5.nabble.com/Segmentation-fault-with-cthreads-on-FreeBSD-td5735669.html#a5735673
 
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on June 16, 2020, 01:39:43 pm
Only fpc installed from official FreeBSD pkg is working (fpc 3.0.4).

Code: Bash  [Select][+][-]
  1. $ sudo pkg install fpc
  2. $ sudo pkg install lang/fpc-units

fpc installed from source (3.0.4, 3.2.0 or 3.3.1) produce not working executable.

http://free-pascal-general.1045716.n5.nabble.com/Segmentation-fault-with-cthreads-on-FreeBSD-td5735669.html#a5735673

It works if you make sure ld points to ld.bfd.
Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 16, 2020, 01:43:49 pm
Quote
It works if you make sure ld points to ld.bfd.

Ha, ok, thanks.

And how do you do this, why FreeBSD pkg do it ok and not gmake MakeFile of fpc source?
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on June 16, 2020, 01:49:05 pm
Quote
It works if you make sure ld points to ld.bfd.

Ha, ok, thanks.

And how do you do this, why FreeBSD pkg do it ok and not gmake MakeFile of fpc source?

pkg install installs prepackaged binaries, probably made on a system with the tweak (or a hack to make FPC call ld.bfd directly) Ports tree is a build only solution
Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 16, 2020, 01:57:33 pm
Quote
pkg install installs prepackaged binaries, probably made on a system with the tweak (or a hack to make FPC call ld.bfd directly) Ports tree is a build only solution

Hum, ok (I was thinking that you are the creator of the FreeBSD pkg).

Do you think that using the -k parameter could do the trick?

Something like this?:

Code: Pascal  [Select][+][-]
  1. fpc -kld.bfd myprog
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on June 16, 2020, 02:05:58 pm
I installed FPC 3.04 from source on FreeBSD 12-STABLE r361007 amd64 with no issues.

I have ld soft-linked to ld.bfd.  I also compile the world + kernel without issue.

Quote
trev@shadow [/usr/local/bin] $ ls -l ld*
lrwxr-xr-x   1 root  wheel         6 26 Jan 21:57 ld -> ld.bfd
-r-xr-xr-x   3 root  wheel  11570136 25 Jan 10:01 ld.bfd
-r-xr-xr-x   2 root  wheel   4464056 25 Jan 10:01 ld.gold
-r-xr-xr-x  74 root  wheel       377  5 Oct  2019 ld.lld60
-r-xr-xr-x  83 root  wheel       377  7 Sep  2019 ld.lld80
-r-xr-xr-x  86 root  wheel       377 17 Apr 14:54 ld.lld90
-r-xr-xr-x  74 root  wheel       377  5 Oct  2019 ld64.lld60
-r-xr-xr-x  83 root  wheel       377  7 Sep  2019 ld64.lld80
-r-xr-xr-x  86 root  wheel       377 17 Apr 14:54 ld64.lld90
Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 16, 2020, 02:18:58 pm
Quote
I have ld soft-linked to ld.bfd.

Thanks for the tip!
[EDIT]
Yes it solves the problems.

But tricky.

On my FreeBSD 12 OS, there are 2 binaries /usr/local/bin/ld.bfd and /usr/local/bin/ld.

And /usr/local/bin/ld is a binary, not a symlink to ld.bfd.

If I may (and this without any hostility, please trust me) it would be great to have a build-in solution in fpc himself.
For example in fpc-compiler code something like this:

Code: Pascal  [Select][+][-]
  1. {$IFDEF freebsd}
  2. // use ld.bfd
  3. {$ENDIF}

With FreeBSD there are only few distros (FreeBSD, Ghost, ...) that use the same architecture, with ld.bfd in same directory, so no risk of incompatibilities.

 
Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 16, 2020, 06:20:11 pm
For fpc 3.2.0 In /compiler/systems/t_bsd.pas, line 163:

Code: Pascal  [Select][+][-]
  1. procedure TLinkerBSD.SetDefaultInfo;
  2. var
  3.   LdProgram: string='ld';
  4. begin
  5.   if (target_info.system in (systems_openbsd+[system_x86_64_dragonfly]))
  6.  or (target_info.system in (systems_freebsd+[system_x86_64_freebsd])) then      // Add this
  7.    LdProgram:='ld.bfd';
  8.  

Title: Re: FPC 3.2.0rc1 released!
Post by: zamronypj on June 17, 2020, 02:32:17 am
Issue I report on mailing list

http://free-pascal-general.1045716.n5.nabble.com/Segmentation-fault-with-cthreads-on-FreeBSD-td5735669.html#a5735673

I was using older FreeBSD 12.

Few days ago, I setup new fresh FreeBSD 12.1 installation. Latest binutils (2.33) does not ship with ld.bfd anymore. So symlink ld to ld.bfd workaround does not work anymore.

I install FPC 3.0.4 from source. Initially, it compiles fine but generated executable cause segmentation fault when executed. Compiling same exact program second time however works flawlessly and executable works. I have no idea why.
Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 17, 2020, 02:44:59 am
Quote
Latest binutils (2.33) does not ship with ld.bfd anymore. So symlink ld to ld.bfd workaround does not work anymore.

Hello.

Not sure to understand.
Are you saying that binutils (2.33) does not give ld.bfd but ld yes.

And that using ld from binutils (2.33) your program test compiles + runs ok?

Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 17, 2020, 03:07:48 am
Quote
Not sure to understand.
Are you saying that binutils (2.33) does not give ld.bfd but ld yes.

Hum, I have downloaded last FreeBSD pkg binutils-2.33.1_2,1.txz but it gives here both ld.bfd and ld.

But, warning, it is not impossible that between 2 sub versions, there can be strange change in FreeBSD package.

(And imho the way that FreeBSD manage his packages is **more** than strange.)
Title: Re: FPC 3.2.0rc1 released!
Post by: zamronypj on June 17, 2020, 03:10:42 am
FreeBSD 12.1 does not have ld.bfd anymore

https://lists.freebsd.org/pipermail/freebsd-current/2018-November/072212.html

A few minutes a go, I just setup another fresh FreeBSD 12.1 X86_64, install FPC 3.0.4 using fpc-3.0.4.x86_64-freebsd11.tar

Using fresh installed FreeBSD and FPC 3.0.4, I compile
Code: Pascal  [Select][+][-]
  1. program test;
  2. {$IFDEF UNIX}
  3. uses cthreads;
  4. {$ENDIF}
  5. begin
  6.      writeln('test');
  7. end.
Compilation works but executable causes segmentation fault. Compiling second time, same segmentation fault.

Then I install binutils

Code: Bash  [Select][+][-]
  1. #pkg install binutils
which install binutils 2.33. Compiling again and this time executable works.

I observe that no ld.bfd binary, and ld still symlink to ld.lld. So I guess it fixed because I install binutils.
Title: Re: FPC 3.2.0rc1 released!
Post by: trev on June 17, 2020, 03:14:08 am
Few days ago, I setup new fresh FreeBSD 12.1 installation. Latest binutils (2.33) does not ship with ld.bfd anymore. So symlink ld to ld.bfd workaround does not work anymore.

FreeBSD 12.1-STABLE amd64 r361007.

I just cd /usr/ports/devel/binutils/ and make deinstall && make install and:

Quote
====> Compressing man pages (compress-man)
===>  Installing for binutils-2.33.1_2,1
===>  Checking if binutils is already installed
===>   Registering installation for binutils-2.33.1_2,1
Installing binutils-2.33.1_2,1...

$ ls -l /usr/local/bin/ld*
-r-xr-xr-x   4 root  wheel  11495128 17 Jun 11:10 /usr/local/bin/ld
-r-xr-xr-x   4 root  wheel  11495128 17 Jun 11:10 /usr/local/bin/ld.bfd
-r-xr-xr-x   2 root  wheel   4570328 17 Jun 11:10 /usr/local/bin/ld.gold
-r-xr-xr-x  74 root  wheel       377  5 Oct  2019 /usr/local/bin/ld.lld60
-r-xr-xr-x  83 root  wheel       377  7 Sep  2019 /usr/local/bin/ld.lld80
-r-xr-xr-x  86 root  wheel       377 17 Apr 14:54 /usr/local/bin/ld.lld90
-r-xr-xr-x  74 root  wheel       377  5 Oct  2019 /usr/local/bin/ld64.lld60
-r-xr-xr-x  83 root  wheel       377  7 Sep  2019 /usr/local/bin/ld64.lld80
-r-xr-xr-x  86 root  wheel       377 17 Apr 14:54 /usr/local/bin/ld64.lld90

$ /usr/local/bin/ld -v
GNU ld (GNU Binutils) 2.33.1

$ /usr/local/bin/ld.bfd -v
GNU ld (GNU Binutils) 2.33.1

So, yes, Binutils v2.33.1 does still install ld.bfd as well as an ld binary which is in fact ld.bfd too. My symlink from earlier in the year has been wiped out and replaced with the ld.bfd binary.
Title: Re: FPC 3.2.0rc1 released!
Post by: zamronypj on June 17, 2020, 03:55:20 am
@trev is correct, binutils still has ld.bfd

Before I install binutils
Code: Text  [Select][+][-]
  1. # freebsd-version
  2. 12.1-RELEASE-p5
  3. # cd /usr/local/bin
  4. # ls -la | grep ld
  5. # cd /usr/bin
  6. # ls -la | grep ld
  7. -r-xr-xr-x   1 root  wheel      44240 Nov  1  2019 colldef
  8. -r-xr-xr-x   1 root  wheel      15480 Nov  1  2019 fold
  9. lrwxr-xr-x   1 root  wheel          6 Nov  1  2019 ld -> ld.lld
  10. -r-xr-xr-x   1 root  wheel   37783520 Nov  1  2019 ld.lld
  11. -r-xr-xr-x   1 root  wheel      19488 Nov  1  2019 ldd
  12. -r-xr-xr-x   1 root  wheel      27024 Nov  1  2019 ldd32
  13. -r-xr-xr-x   1 root  wheel   58013080 Nov  1  2019 lldb
  14. # ld -v
  15. LLD 8.0.1 (FreeBSD 366581-1200008) (compatible with GNU linkers)
  16.  

After install binutils

Code: Text  [Select][+][-]
  1. #cd /usr/bin
  2. # ls -la | grep ld
  3. -r-xr-xr-x   1 root  wheel      44240 Nov  1  2019 colldef
  4. -r-xr-xr-x   1 root  wheel      15480 Nov  1  2019 fold
  5. lrwxr-xr-x   1 root  wheel          6 Nov  1  2019 ld -> ld.lld
  6. -r-xr-xr-x   1 root  wheel   37783520 Nov  1  2019 ld.lld
  7. -r-xr-xr-x   1 root  wheel      19488 Nov  1  2019 ldd
  8. -r-xr-xr-x   1 root  wheel      27024 Nov  1  2019 ldd32
  9. -r-xr-xr-x   1 root  wheel   58013080 Nov  1  2019 lldb
  10. # cd /usr/local/bin
  11. # ls -la | grep ld
  12. -r-xr-xr-x   4 root  wheel  11672576 Jun 11 01:44 ld
  13. -r-xr-xr-x   4 root  wheel  11672576 Jun 11 01:44 ld.bfd
  14. -r-xr-xr-x   2 root  wheel   4472288 Jun 11 01:44 ld.gold
  15. # which ld
  16. /usr/bin/ld
  17. # ld -v
  18. LLD 8.0.1 (FreeBSD 366581-1200008) (compatible with GNU linkers)
  19.  

So there are multiple ld binaries. /usr/local/bin/ld and /usr/local/bin/ld.bfd are same binaries.
Code: Text  [Select][+][-]
  1. # cd /usr/local/bin
  2. # md5 ld
  3. MD5 (ld) = 05314dfb9130039f3d473fd71e34186f
  4. # md5 ld.bfd
  5. MD5 (ld.bfd) = 05314dfb9130039f3d473fd71e34186f
  6.  

Title: Re: FPC 3.2.0rc1 released!
Post by: Fred vS on June 17, 2020, 11:56:17 am
Quote
So there are multiple ld binaries. /usr/local/bin/ld and /usr/local/bin/ld.bfd are same binaries.

Hum, in my FreeBSD 12.0 there are also /usr/local/bin/ld and /usr/local/bin/ld.bfd, with exactly same size.

But using /usr/local/bin/ld for link with fpc crash the program, using /usr/local/bin/ld.bfd is ok.
So it is obvious that the 2 binaries are not the same.

So maybe that in the new binutils, /usr/local/bin/ld and /usr/local/bin/ld.bfd are in fact the same now.

If somebody knows the logical of the FreeBSD package, I am interested to have some explanation.
Title: Re: FPC 3.2.0rc1 released!
Post by: marcov on June 17, 2020, 12:21:21 pm
FreeBSD 12.1 does not have ld.bfd anymore

https://lists.freebsd.org/pipermail/freebsd-current/2018-November/072212.html

This mostly seems to be about ld.bfd in base, for us this doesn't matters that much if the binutils in ports works.
TinyPortal © 2005-2018