View Issue Details

IDProjectCategoryView StatusLast Update
0036273FPCCompilerpublic2019-12-13 19:46
ReporterRick HooverAssigned ToJonas Maebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.4Product Build2019-09-16 
Target VersionFixed in Version3.3.1 
Summary0036273: Command line overflow for macOS with ld
DescriptionWhen including a large number of packages, the link.res file becomes too large for macOS to handle the large command line generated for the linker (ld). macOS limits the command line to 256K and link.res can push near and beyond that limit when linking the IDE with a large number of installed packages.
Steps To ReproduceInclude a large number of packages from the on-line package manager should cause the command link limit to be hit.
Additional InformationA possible fix would be to split the list of object files out of the link.res file into a separate file. The macOS linker allows the use of the -filelist option to provide the list of object files to link. This fix should remove the list of object files from the command line, which is the bulk of what is put on the linker command line.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Alfred

2019-11-14 06:30

reporter   ~0119285

Confirmed. Also on Windows.

When building for Haiku x64 on Windows, the ppas.bat becomes too long (for ld) with all the libraries and object files.
And errors out. If a few, not used, library directories are removed from this file, all runs well.

Alfred

2019-11-14 06:31

reporter   ~0119286

This bug / item should be moved towards fpc (the compiler) !!

Sven Barth

2019-11-15 10:53

manager   ~0119311

Moved to FPC project

Alfred

2019-11-15 11:29

reporter   ~0119312

The filelist option is already added into the compiler t_bsd.pas.
It is only enabled on Windows however, for the benefit of cross-compiling.
(as the [osxcross] linker on Windows understands this option)
It could be enabled on more/all systems, if the linker in use supports filelists.

Jonas Maebe

2019-11-15 21:32

manager   ~0119328

I have fixed several bugs in the filelist support and enabled in all cases when targeting Darwin.

Rick Hoover

2019-12-13 19:46

reporter   ~0119822

Thank you!

Issue History

Date Modified Username Field Change
2019-11-06 23:43 Rick Hoover New Issue
2019-11-14 06:30 Alfred Note Added: 0119285
2019-11-14 06:31 Alfred Note Added: 0119286
2019-11-15 10:52 Sven Barth Project Lazarus => FPC
2019-11-15 10:53 Sven Barth Note Added: 0119311
2019-11-15 10:54 Sven Barth Category Other => Compiler
2019-11-15 10:54 Sven Barth FPCTarget => -
2019-11-15 11:29 Alfred Note Added: 0119312
2019-11-15 21:32 Jonas Maebe Assigned To => Jonas Maebe
2019-11-15 21:32 Jonas Maebe Status new => resolved
2019-11-15 21:32 Jonas Maebe Resolution open => fixed
2019-11-15 21:32 Jonas Maebe Fixed in Version => 3.3.1
2019-11-15 21:32 Jonas Maebe Note Added: 0119328
2019-12-13 19:46 Rick Hoover Status resolved => closed
2019-12-13 19:46 Rick Hoover Note Added: 0119822