Recent

Author Topic: Lazarus 1.4.2 on OSX Yosemite 10.10.5  (Read 13895 times)

corpusgemini

  • New Member
  • *
  • Posts: 19
Lazarus 1.4.2 on OSX Yosemite 10.10.5
« on: September 20, 2015, 04:48:11 pm »
Hello,

I upgraded from Lazarus 1.4.0 to 1.4.2 using the dmg files available on the sourceforge website. After that, everytime I want to compile a project, the message window gives this message:
Compile Project, Target: project1: Exit code 1, Errors: 1
Fatal: Compilation aborted

Then, when right-clicking on the first line and choosing the 'About Compiling Project...' option, I get  the details for command options sent to FPC compiler.
From what I see here, I suspect that the compiler does not get the full path to the .lpr file.
Can someone help me and tell which option should be enabled in Lazarus so the IDE sends the full path of the lpr file to the compiler?

Thanks in advance,
Tony

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #1 on: September 20, 2015, 06:25:38 pm »
you should also mention the usage of Xcode 7.0
« Last Edit: September 20, 2015, 06:47:30 pm by skalogryz »

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #2 on: September 20, 2015, 06:26:42 pm »
try this.

Create a file with the following content:
Code: [Select]
begin
  writeln('hello world');
end.
;
try to compile it with FPC via command line

Code: [Select]
  fpc test.pas
See what's the output and the error message.

corpusgemini

  • New Member
  • *
  • Posts: 19
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #3 on: September 20, 2015, 07:25:20 pm »
The .pas file compiled without errors and the executable file runs nicely.
So I did some experimenting and created a project in Lazarus and remade the test program.

Below you find the output that the compiler gave in the same window as described earlier.

Funny enough, I copied the command line out of this message and pasted it into a terminal window. It ran without problems and created the test executable file.
I would suspect that something is not set right in my IDE.

Best regards,
Tony

Compile Project, Target: project1

Compile Reason: Source file "/Users/Tony/tmp/project1.lpr" of Project outdated:
  Source age=09/20/15 07:18:59 PM
  State file age=09/20/15 07:17:33 PM
  State file=/Users/Tony/tmp/project1.compiled


Executable:
/usr/local/bin/ppc386

CurrentDirectory:
/Users/Tony/tmp/

Parameters:
-MObjFPC
-Scghi
-O1
-g
-gl
-l
-vewnhibq
-Filib/i386-darwin
-FUlib/i386-darwin/
/Users/Tony/tmp/project1.lpr

Command Line:
/usr/local/bin/ppc386 -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Filib/i386-darwin -FUlib/i386-darwin/ /Users/Tony/tmp/project1.lpr

ProcessID:
99205

ExitStatus:
1

Fout:Exit code 1



littlepaul476

  • New member
  • *
  • Posts: 9
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #4 on: September 20, 2015, 08:18:21 pm »
The same for me, OSX El Capitan + XCode 7. I run command line from empty project and got this:
Code: [Select]
MacMini:~ User$ /usr/local/bin/ppc386 -MObjFPC -Scghi -O1 -g -gl -k-framework -kCarbon -k-framework -kOpenGL -k-dylib_file -k/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -l -vewnhibq -Filib/i386-darwin -Fu/Developer/lazarus/lcl/units/i386-darwin/carbon -Fu/Developer/lazarus/lcl/units/i386-darwin -Fu/Developer/lazarus/components/lazutils/lib/i386-darwin -Fu/Developer/lazarus/packager/units/i386-darwin -FUlib/i386-darwin/ -dLCL -dLCLcarbon /private/tmp/project1.lpr
Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.4 [2014/02/26] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
(1002) Target OS: Darwin for i386
(3104) Compiling /private/tmp/project1.lpr
(3104) Compiling /private/tmp/unit1.pas
(9001) Assembling (pipe) lib/i386-darwin/unit1.s
clang -cc1as: error: unable to open output file 'lib/i386-darwin/unit1.o': 'No such file or directory'
unit1.pas(27) Error: (9032) Can't write resource file "lib/i386-darwin/unit1.lfm"
unit1.pas(27) Fatal: (10026) There were 2 errors compiling module, stopping
Fatal: (1018) Compilation aborted

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #5 on: September 20, 2015, 08:44:40 pm »
what are files in "lib/i386-darwin"?

littlepaul476

  • New member
  • *
  • Posts: 9
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #6 on: September 21, 2015, 07:08:42 pm »
There is Unit1.lfm and also temporarily Unit1.o, but it is deleted immediately after it is created...

corpusgemini

  • New Member
  • *
  • Posts: 19
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #7 on: September 21, 2015, 09:21:53 pm »
I had a bunch of project1.* and unit1.* files in lib/386-darwin.
So I deleted them and tried to compile using the Lazarus IDE. As usual it aborted, and no file were created there.
Again I copied the command line out of the message window as described earlier. It compiled successfully and the lot of the files were created normally. 6 files; project1.o , .or and .res; also unit1.lfm, .o and .ppu .


Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #8 on: September 23, 2015, 09:48:22 am »
Can you try adding the command line parameter "-ap-" and see whether that helps? Additionally, are you also using OS X 10.11 beta ("El Capitan") like littlepaul476, or are you on OS X 10.10 ("Yosemite")?

phaserescu

  • New member
  • *
  • Posts: 7
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #9 on: September 23, 2015, 10:43:52 am »
Hi

I'm having the same issue reported here. I've tried Lazarus 1.4.0 and 1.4.2 with the same results.

OS: OS X Yosemite 10.10.5
Xcode Version 7.0 (7A220)

I've attached the output from FPC.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #10 on: September 23, 2015, 11:00:14 am »
Your output ends with

Code: [Select]
[0.018] Parsing implementation of compilertest.pas
[0.018] Syntax error, "BEGIN" expected but "end of file" found
[0.021] Compilation aborted
That seems to be plain syntax error rather than anything related to FPC, Lazarus or Xcode.

phaserescu

  • New member
  • *
  • Posts: 7
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #11 on: September 23, 2015, 11:35:53 am »
The only thing I did was to install Fpc, fpc-src and Lazarus. I started the IDE and hit run. I got this error!

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #12 on: September 23, 2015, 11:49:12 am »
The only thing I did was to install Fpc, fpc-src and Lazarus. I started the IDE and hit run. I got this error!
You obviously did more, since I don't think the IDE automatically creates a unit called "compilertest.pas". In any case, the error you get has nothing to do with this thread. Please create a new thread and attach the source code that you are trying to compile.

phaserescu

  • New member
  • *
  • Posts: 7
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #13 on: September 23, 2015, 02:59:14 pm »
The only thing I did was to install Fpc, fpc-src and Lazarus. I started the IDE and hit run. I got this error!
You obviously did more, since I don't think the IDE automatically creates a unit called "compilertest.pas". In any case, the error you get has nothing to do with this thread. Please create a new thread and attach the source code that you are trying to compile.

Trust me when I say I did nothing more than what I've stated. I'm not a new programmer and I know my way around with using a lot of tools and IDEs. I was surprised to install a product just to see that it can't even start the default project. I have no idea what is the thing with compilertest.pas (i googled it previously and found nothing, that's why I ended up here). I thought that maybe it is an internal thing of Lazarus and/or FPC that is misconfigured. I have another Mac at home and got the same issue on that as well.

Anyway, thanks for your help! I started a new thread with this.

Have a nice day!

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1071
Re: Lazarus 1.4.2 on OSX Yosemite 10.10.5
« Reply #14 on: September 23, 2015, 04:36:06 pm »

Trust me when I say I did nothing more than what I've stated. I'm not a new programmer and I know my way around with using a lot of tools and IDEs. I was surprised to install a product just to see that it can't even start the default project.
Yes , the problem the recently released Xcode 7, which causes all kinds of trouble due to the removal of its old assembler in favour of Clang.

 

TinyPortal © 2005-2018