Recent

Author Topic: Lazarus IDE / Compiler issue on OS X  (Read 3019 times)

MISV

  • Hero Member
  • *****
  • Posts: 648
Lazarus IDE / Compiler issue on OS X
« on: September 21, 2015, 04:20:24 pm »
After suddently experiencing IDE build problems (after  uninstalling a package / compiling a package) like this in 1.4.0:

Quote
Compiling package FCL 1.0.1: Exit code 1, Errors: 1, Hints 2
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
(i) Verbose: Free Pascal Compiler Version 2.6.4 [2014/02/26] for i386
(i) Verbose: Copyright (c) 1993-2014 by Florian Klaempfl and others
(i) Verbose: Target OS: Darwin for i386
(i) Verbose: Compiling fcllaz.pas
(i) Verbose: Compiling registerfcl.pas
(i) Verbose: Compiling lazaruspackageintf.pas
(i) Verbose: Assembling (pipe) /Developer/packager/units/i386-darwin/lazaruspackageintf.s
(i) lazaruspackageintf.pas(64,27) Verbose: There were 1 errors compiling module, stopping
Fatal: Compilation aborted


I upgraded to 1.4.2... tried build IDE (through packages) and got an error about needding to accept xcode license...

I did so and got further...  Now when I build the IDE I get error:
Quote

Build IDE: Exit code 2, Errors: 1, Hints: 5
Verbose: /Applications/Xcode.app/Contents/Developer/usr/bin/make -C ide idepkg
Verbose: make[1]: Entering directory `/Developer/lazarus/ide'
Verbose: /Applications/Xcode.app/Contents/Developer/usr/bin/make --assume-new=lazarus.pp lazarus OPT=' @/Users/myname/.lazarus/idemake.cfg'
Verbose: make[2]: Entering directory `/Developer/lazarus/ide'
Verbose: /usr/local/bin/ppc386 -gl -vbqewnhi -Sci -dlclcarbon -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../components/custom -Fuframes -Fu. -Fu/usr/local/lib/fpc/2.6.4/units/i386-darwin/rtl -Fu/usr/local/lib/fpc/2.6.4/units/i386-darwin/paszlib -Fu/usr/local/lib/fpc/2.6.4/units/i386-darwin/fcl-process -Fu/usr/local/lib/fpc/2.6.4/units/i386-darwin/hash -Fu/usr/local/lib/fpc/2.6.4/units/i386-darwin/fpmkunit -Fu/usr/local/lib/fpc/2.6.4/units/i386-darwin/regexpr -Fiinclude -Fiinclude/darwin -Fi../images -FE.. -FU../units/i386-darwin/carbon @/Users/myname/.lazarus/idemake.cfg -di386 lazarus.pp
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Hint: Start of reading config file /Users/myname/.lazarus/idemake.cfg
Hint: End of reading config file /Users/myname/.lazarus/idemake.cfg
Verbose: Free Pascal Compiler version 2.6.4 [2014/02/26] for i386
Verbose: Copyright (c) 1993-2014 by Florian Klaempfl and others
Verbose: Target OS: Darwin for i386
Verbose: Compiling lazarus.pp
Verbose: [lazarus] Error 1
Verbose: [idepkg] Error 2
lazarus.pp(41,3) Hint: Unit "redirect_stderr" not used in Lazarus
Verbose: Assembling (pipe) /Developer/lazarus/units/i386-darwin/carbon/lazarus.s
lazarus.pp(138,42) Verbose: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Verbose: make[2]: Leaving directory `/Developer/lazarus/ide'
Verbose: make[1]: Leaving directory `/Developer/lazarus/ide'

My current thinking is that since I don't have this problem at Windows... And my problem seems to correlate to a new version of Xcode being downloaded, my above issues may have been caused by an xcode update?

Hence I am posting this post here to see if anyone else encountered this on OS X?

The main thread for this problem is still:
http://forum.lazarus.freepascal.org/index.php/topic,29722.0.html
(But posted this in hope of someone might have experience with this in OS X and can see what is wrong. I hope that is OK)

Hansaplast

  • Hero Member
  • *****
  • Posts: 549
  • Tweaking4All.com
    • Tweaking4All
Re: Lazarus IDE / Compiler issue on OS X
« Reply #1 on: September 23, 2015, 11:28:50 am »
For starters; I'm by no means an expert, but I'd love to be able to help if I can.


Having said that: Did you upgrade to El Capitan by any chance?
I have two Mac's, one runs 10.10.x and the other one 10.11.x.
On the El Capitan setup I run in a lot of problems when trying to recompile the IDE.


You've already ran into the XCode issues, so did I - I had to re-install the command line tools and agree with the license agreement. I've also run into GDB issues (see this post), which I managed to get running, although it really wants Dwarf debug info (-gw or -gw2 if I recall correctly).


I've tried 1.4.2 and 1.5 SVN, but I gave up on 1.5 SVN after numerous problems (probably due to my lack of experience).


One thing I have also noticed is that it sometimes seems to help to specify Target OS (darwin), Widgetset (Carbon) and CPU (i386). As I have been experimenting with trying to compile the IDE with Cocoa, I occasionally forget to switch back to Carbon (which results in a "unable to link" error). Because I have been toying with Cocoa, I always use the "Clean All" option.


Another tip I found in this forum post is that your computername/directory path should preferably not include spaces or special characters like quotes. Maybe that helps.


Not sure how helpful this is, but the occasional component may be causing problems. This is the list I have used succesful so far. So maybe you'd want to try to build the IDE with just these to see if you can narrow down the problem.



FCL 1.0.1
LazUtils 1.0
CodeTools 1.0.1
LCLBase 1.4.2
DebuggerIntf 0.1
LCL 1.4.2
pascalscript 0.0.0.1
SDFLaz 0.1.1
LazControls 1.0.1
SynEdit 1.0
Printer4Lazarus 0.5
IDEIntf 1.0
EditorMacroScript 0.0
DBFLaz 0.1.1
SQLDBLaz 1.0.2
DateTimeCtrls 1.5.1
ToDoListLaz 1.0.2
TAChartLazarusPkg 1.0
ProjTemplates 1.0
fpcunitide 0.1
ChmHelpPkg 0.2
jcfidelazarus 2.0
TurboPowerIPro 1.0
ExternHelp 1.3
InstantFPCLaz 1.0
MemDSLaz 1.2.1
leakview 1.0
printers4lazide 0.0
RunTimeTypeInfoControls 0.1
SynEditDsgn 1.0
LazDebuggerGdbmi 0.1
TurboPowerIProDsgn 0.0

MISV

  • Hero Member
  • *****
  • Posts: 648
Re: Lazarus IDE / Compiler issue on OS X
« Reply #2 on: September 29, 2015, 04:36:58 am »
Thanks! in the end the problem was resolved in the main thread here:
http://forum.lazarus.freepascal.org/index.php/topic,29722.0.html

Took quite a few tries :)

(Maybe for reference your suggestions should be added as well for people who Google similar problems?)