Recent

Author Topic: [SOLVED] Is the mingw folder necessary?  (Read 1324 times)

GypsyPrince

  • Guest
[SOLVED] Is the mingw folder necessary?
« on: April 10, 2020, 12:53:34 am »
Are the 'mingw' subfolder (C:\Lazarus\mingw) and its enclosed files necessary for the proper functioning of either Free Pascal or Lazarus?
 
The reason I ask is... I have 8 different development environments which installed and use their own copy of the mingw compiler.  I want to map the ones that I can to one central copy of the compiler, then delete all the ones I don't need to free up hard drive space.  The only one I don't think I can successfully remap is Qt, but none others seem to have added their own custom libraries to the installation.

So, can the 'mingw' subfolder be safely deleted?
a. If so, what other subfolders can I safely delete from the Lazarus directory?
b. If the 'mingw' compiler is required and can't be deleted, can I remap Lazarus to a centralized copy?

I wish if all these programs are going to utilize mingw that they would either ask you or search for an existing copy on your hard drive instead of numerous copies of the same compiler being installed. All that wasted space is just annoying...
« Last Edit: April 11, 2020, 07:56:45 pm by GypsyPrince »

mercurhyo

  • Full Member
  • ***
  • Posts: 177
Re: Is the mingw folder necessary?
« Reply #1 on: April 10, 2020, 01:47:58 am »
May God bless us from noobs  :P :D 8-)
DEO MERCHVRIO - Linux Mint latest, Windows 7 - Laz latest fixes- RAD Studio XE7
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

mercurhyo

  • Full Member
  • ***
  • Posts: 177
Re: Is the mingw folder necessary?
« Reply #2 on: April 10, 2020, 01:51:39 am »
Okay

1) FP text IDE is ALWAYS shipped with Free Pascal Compiler, and has nothing to do with releases of Lazarus, to answer your question on another topic (future laz release 2.0.8 )

2) mingw Compilers have NOTHING TO DO with freepascal compiler (except some minimal binutils tools which are.. make tool and very optionaly ld linker tool)
« Last Edit: April 10, 2020, 01:56:41 am by mercurhyo »
DEO MERCHVRIO - Linux Mint latest, Windows 7 - Laz latest fixes- RAD Studio XE7
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6288
    • wiki
Re: Is the mingw folder necessary?
« Reply #3 on: April 10, 2020, 04:36:56 am »
The mingw folder contains a copy of gdb.
If you have gdb in any other place, you can configure the IDE to use that other gdb. (Tools > Option > Debugger)

There is also a copy of LazGDeBugControl.exe. This is only necessary when debugging cross-bitness. (I.e. 64bit vs 32bit)
If you do cross bitness, and use another gdb, copy this file into the folder where gdb.exe is.

Alternatively you can setup the IDE to use the beta LazDebuggerFp. (search for fpdebug on forum/wiki)

Quote
I wish if all these programs are going to utilize mingw that they would either ask you or search for an existing copy on your hard drive instead of numerous copies of the same compiler being installed.
There is no compiler in that folder.
Only gdb.




At least on Windows:
There are a few mingw tools in the fpc folder. (eg make  and ld)
And I advice to keep them.

Fpc may work with other versions, but it could also fail.
No one will be able to solve any strange errors that you get by having another toolchain in your PATH.

And again its not the entire mingw. Only selected files, that take not very much space.

There is a copy of gcc. That is only required for compiling resources (which I think includes lfm files). Its required by windres.exe.
But again it probably needs to be kept.

But well you can try to include them from elsewhere. Until eventually you get mysterious errors. Or if you are lucky it may work....
« Last Edit: April 10, 2020, 04:54:27 am by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6288
    • wiki
Re: Is the mingw folder necessary?
« Reply #4 on: April 10, 2020, 04:41:11 am »
a. If so, what other subfolders can I safely delete from the Lazarus directory?

examples folder?

maybe the tools and install folder (not sure, but at least some of its subfolders)

docs depends on if you need it.

Not sure, but probably images too.


GypsyPrince

  • Guest
Re: Is the mingw folder necessary?
« Reply #5 on: April 10, 2020, 05:44:49 am »
@Martin_fr

Quote
There is no compiler in that folder.
Only gdb.

Well, darn. I feel really stupid now. LOL

I guess I should have thoroughly searched in there before asking the question.  The folder popped up in my search, so I (incorrectly) assumed it was the full compiler program like all the others.

GypsyPrince

  • Guest
Re: Is the mingw folder necessary?
« Reply #6 on: April 10, 2020, 05:55:32 am »
@mercurhyo

Quote
1) FP text IDE is ALWAYS shipped with Free Pascal Compiler, and has nothing to do with releases of Lazarus, to answer your question on another topic (future laz release 2.0.8 )

I understand this. However, since Lazarus does come with a copy of the Free Pascal compiler, I'm just thinking it would be nice to toss in the fp IDE as well, to keep from having to install a separate full copy of fp in order to gain the IDE.

PascalDragon

  • Hero Member
  • *****
  • Posts: 1488
  • Compiler Developer
Re: Is the mingw folder necessary?
« Reply #7 on: April 10, 2020, 10:34:13 am »
1) FP text IDE is ALWAYS shipped with Free Pascal Compiler, and has nothing to do with releases of Lazarus, to answer your question on another topic (future laz release 2.0.8 )

However the textmode IDE is not shipped with the Free Pascal distrubution that's also provided with the Lazarus Windows installer (which makes sense in my opinion).

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6288
    • wiki
Re: Is the mingw folder necessary?
« Reply #8 on: April 10, 2020, 02:07:07 pm »
1) FP text IDE is ALWAYS shipped with Free Pascal Compiler, and has nothing to do with releases of Lazarus, to answer your question on another topic (future laz release 2.0.8 )
It is not going to happen for 2.0.8.
For some reason the fpc make file does not build it the fp.exe. This is not intended, not sure why it is (possible missing gdb object file)

I did check the current test builds with the upcoming 3.2 branch. (I only checked 64bit build)
They seem to build it. If nothing changes in fpc, then it looks like Lazarus 2.2 (no date yet) will contain the fp.exe. (I have not tested if it works....)

The 3.2 based installer can be found here https://sourceforge.net/projects/lazarus-snapshots/files/
(ensure it has 3.2 in the name / they are test versions, the may net be stable)


I do not know which part of the build process changed. So no idea if that persists.

If anyone wants to investigate themself (too late for 2.0.8 though, and maybe/hopefully not needed for 3.2), I can point out the build process, so anyone can test.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8368
  • FPC developer.
Re: Is the mingw folder necessary?
« Reply #9 on: April 10, 2020, 02:09:17 pm »
1) FP text IDE is ALWAYS shipped with Free Pascal Compiler, and has nothing to do with releases of Lazarus, to answer your question on another topic (future laz release 2.0.8 )
It is not going to happen for 2.0.8.
For some reason the fpc make file does not build it the fp.exe. This is not intended, not sure why it is (possible missing gdb object file)

Just "make all" at the toplevel FPC builds the IDE.  You need to pass IDE=0 to skip it.

The makefiles check for the existence of the libgdb files to see if it needs to build with GDB or not, but the IDE should be built any way.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6288
    • wiki
Re: Is the mingw folder necessary?
« Reply #10 on: April 10, 2020, 02:29:23 pm »
Well, I use the same script for the builds.
Yet, the old installers misses the file, the 3.2 seem to have it.

However the build scripts (in the folder tools/install/win do individual make calls for different parts of fpc.
I have no idea why. They were written long ago.


marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8368
  • FPC developer.
Re: Is the mingw folder necessary?
« Reply #11 on: April 10, 2020, 05:12:38 pm »
Well, I use the same script for the builds.
Yet, the old installers misses the file, the 3.2 seem to have it.

That's because 3.2 moves the IDE from ide/ to packages/ide so that it is build intbetween.

Quote
However the build scripts (in the folder tools/install/win do individual make calls for different parts of fpc.
I have no idea why. They were written long ago.

Building times, last byte savings, and probably all outdated. Wouldn't be surprised if this is even FPC 1.x legacy.....

Best clean it out. The extra size will be very small compared to the current FPC/Lazarus combined installation

GypsyPrince

  • Guest
Re: Is the mingw folder necessary?
« Reply #12 on: April 10, 2020, 08:43:19 pm »
LOL
 
I guess I should have said earlier that if it would be a lot of trouble to include the fp IDE with Lazarus, then don't worry about it.  As far as I know, I may be the only person who has inquired about it, so it is definitely not worth the effort to satisfy my whim.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8368
  • FPC developer.
Re: Is the mingw folder necessary?
« Reply #13 on: April 10, 2020, 10:58:13 pm »
LOL
 
I guess I should have said earlier that if it would be a lot of trouble to include the fp IDE with Lazarus, then don't worry about it.  As far as I know, I may be the only person who has inquired about it, so it is definitely not worth the effort to satisfy my whim.

I think it is best to simply be orthogonal, and distribute roughly the same FPC standalone as with Lazarus. The difference might have seemed large in the distance past, but aren't anymore. A FPC 3.2.0rc1 install is about 380MB of which only 2MB is the IDE.

winni

  • Hero Member
  • *****
  • Posts: 1341
Re: Is the mingw folder necessary?
« Reply #14 on: April 10, 2020, 11:16:41 pm »
Hardware:

2 TerraByte Harddisks (internal) are now below 60.- €

That is 3 Cent per Gigabyte.


 

TinyPortal © 2005-2018