Recent

Author Topic: Getting "Exit code 1., Errors: 1" when compiling my package  (Read 28139 times)

MISV

  • Hero Member
  • *****
  • Posts: 815
Getting "Exit code 1., Errors: 1" when compiling my package
« on: September 19, 2015, 02:07:34 pm »
I am getting an odd error when compiling my package. The "Messages" windows simply says:

Quote
Compiling package PmyLazarus 0.0: Exit code 1, Errors: 1
Fatal: Compilaion aborted


The situation is this... i get no errors of any kind, just "Fatal: Compilation aborted" - where can I see more about what is causing the issue?

I already configured compiler to emit verbose messages... But the compilation log seems very small...

I am using Newest OS X + Lazarus 1.4.0 (and otherwise working)
« Last Edit: September 21, 2015, 04:21:41 pm by MISV »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #1 on: September 20, 2015, 01:00:08 pm »
The situation is this... i get no errors of any kind, jus "Fatal: Compilation aborted"
Right click, you should see an option to copy all compiler messages.

MISV

  • Hero Member
  • *****
  • Posts: 815
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #2 on: September 20, 2015, 05:23:08 pm »
okay 

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

The only thing I can think of is that I have messed around with project options in one of my projects section "Additions and override". Maybe that somehow messed up some internal Lazarus/FCL library?

The error seems to also happen when simply rebuilding the IDE when installing/uninstalling packages
« Last Edit: September 21, 2015, 03:27:51 pm by MISV »

MISV

  • Hero Member
  • *****
  • Posts: 815
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #3 on: September 21, 2015, 03:22:09 pm »
No solution yet, but maybe closer?

I upgraded to 1.4.2... tried build IDE (through packages) and got an error about needding to accept xcode license (maybe that is the cause for all the problems? An xcode update?)

I then separately started xcode and accepted the license.

I then tried to build lazarus again... I removed packages hat packages that errors like lclextensions (never errored in the past)

Removing those I now get this 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'
« Last Edit: September 21, 2015, 04:23:06 pm by MISV »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #4 on: September 21, 2015, 04:27:21 pm »
You also have to (re)install the command Xcode line utilities, as explained at http://www.freepascal.org/down/i386/macosx-netherlands.var

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #5 on: September 21, 2015, 04:39:24 pm »
This is Xcode 7.0, right?

MISV

  • Hero Member
  • *****
  • Posts: 815
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #6 on: September 22, 2015, 12:45:02 pm »
I assumed since xcode 7 has been installed (and I used command line tools before), but no... in App store I can download an update for command line tools.

However, even after a restart it did not make a difference

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'



« Last Edit: September 22, 2015, 01:23:00 pm by MISV »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #7 on: September 22, 2015, 01:21:32 pm »
What happens if you compile a program on the command line? I.e., create a file called hello.pas with just this in it:
Code: [Select]
begin
  writeln('hello');
end.

Then open a terminal window, go in the directory with that file and type "fpc hello". If that gives a similar uninformative error message, try executing "fpc -a -s hello" (this tells the compiler to create a script that calls the assembler, instead of calling it directly from the compiler) and next execute "./ppas.sh" (that's the generated script).

MISV

  • Hero Member
  • *****
  • Posts: 815
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #8 on: September 22, 2015, 01:31:23 pm »
Looks potentially interesting with the 10.4 and 10.10 versions? Anyhow, here's the log:

Quote
fpc hello.pas
Free Pascal Compiler version 2.6.4 [2014/02/26] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling hello.pas
Assembling (pipe) hello.s
Linking hello
ld: warning: object file (hello.o) was built for newer OSX version (10.10) than being linked (10.4)
2 lines compiled, 2.2 sec
MSRDMACLAP:temp thomasschulz$ fpc -a -s hello
Free Pascal Compiler version 2.6.4 [2014/02/26] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling hello.pas
Closing script ppas.sh
2 lines compiled, 0.0 sec

I am open for any suggestion... reinstalling everything ?. I just want to be able to build the IDE again :)
« Last Edit: September 22, 2015, 01:36:01 pm by MISV »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #9 on: September 22, 2015, 01:37:47 pm »
That shows that the compiler can invoke the assembler fine when executed on the command line. Maybe you can try adding the -vtx command line option to your Lazarus project setting, then the compiler will print more information about the files it searches and execute.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #10 on: September 22, 2015, 01:59:50 pm »
So far, it might be an issue a new feature with  new bin utils not supporting stabs any more.

Others are claiming that they're able to build a project from command line (by copying Lazarus generated command-line and running it manually).

ugh... these three topics should be merged :)
« Last Edit: September 22, 2015, 02:04:39 pm by skalogryz »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #11 on: September 22, 2015, 02:05:37 pm »
So far, it might be an issue a new feature with  new bin utils not supporting stabs any more.
Ok, changing the default debug format from Stabs to DWARF2 for Darwin/i386 should be no problem before FPC 3.0 is released.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #12 on: September 22, 2015, 02:20:17 pm »
Ok, changing the default debug format from Stabs to DWARF2 for Darwin/i386 should be no problem before FPC 3.0 is released.
Why Darwin/i386? or did you mean Darwin (any CPU)?

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #13 on: September 22, 2015, 02:23:04 pm »
Ok, changing the default debug format from Stabs to DWARF2 for Darwin/i386 should be no problem before FPC 3.0 is released.
Why Darwin/i386? or did you mean Darwin (any CPU)?
Right now, the only Darwin platforms that use Stabs by default are i386 and PowerPC (32 bit). The new binutils don't support PowerPC at all (I think Xcode 3.2.5 was the last one with PowerPC support), so it doesn't matter if that one keeps using Stabs.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Getting "Exit code 1., Errors: 1" when compiling my package
« Reply #14 on: September 22, 2015, 02:30:11 pm »
ah. I should've known this.

 

TinyPortal © 2005-2018