Recent

Author Topic: macOS Larazus exit code 1, error 3  (Read 3740 times)

p.leeflang

  • New member
  • *
  • Posts: 9
Re: macOS Larazus exit code 1, error 3
« Reply #15 on: July 31, 2020, 02:42:37 pm »
It is still not working:

The /usr/local/bin/fpcres are installed
drwxr-xr-x@  root  wheel  /usr   returns:    zsh: command not found: drwxr-xr-x@

I can't change the permissions for /usr or /usr/local and usr/local/bin
the computer tells me:The operation cannot be completed because you do not have the necessary permissions. (translation from Dutch)

I tried: Leef@mbp-van-peter-2 ~ % chflags nohidden ~/usr/local/bin
with result: chflags: /Users/Leef/usr/local/bin: No such file or directory

I tried chflags nohidden /usr
with result: chflags: /usr: Operation not permitted

I am not able to change the System Integrity Protection with the option restart the computer and then press <cmd> R because i use a bluetooth keyboard. Normal keyboard is not working.

cd && echo 'export PATH="/usr/local/bin:$PATH"' > .zsh        worked because
echo $path     returns:    /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /Library/Apple/usr/bin

p.leeflang

  • New member
  • *
  • Posts: 9
Re: macOS Larazus exit code 1, error 3
« Reply #16 on: August 01, 2020, 02:18:41 am »
I fixed the ownership and permissions on the /usr/local/bin and /usr/local directories. By changing the System Integrity Protection.
I was notable to change /usr   It is still only read and hidden.

But with those changes I sill get the error:
  Compile Project, Target: /Users/Leef/tmp/project1: Exit code 1, Errors: 1
  Error: resource compiler "fpcres" not found, switching to external mode

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 929
  • Former Delphi 1-7, 10.2 User
Re: macOS Larazus exit code 1, error 3
« Reply #17 on: August 01, 2020, 02:24:53 am »
It is still not working:

The /usr/local/bin/fpcres are installed
drwxr-xr-x@  root  wheel  /usr   returns:    zsh: command not found: drwxr-xr-x@

Those were not commands - they were showing you what the ownership/permissions should be on those directories if you did an "ls -d /usr", "ls -d /usr/local" and "ls -d /usr/local/bin".

Quote
I am not able to change the System Integrity Protection with the option restart the computer and then press <cmd> R because i use a bluetooth keyboard. Normal keyboard is not working.

This would only be required if the ownership/permissions were incorrect. Are they?

Quote
cd && echo 'export PATH="/usr/local/bin:$PATH"' > .zsh        worked because
echo $path     returns:    /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /Library/Apple/usr/bin

What happens if you type in a Terminal fpcres<return> ?
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

p.leeflang

  • New member
  • *
  • Posts: 9
Re: macOS Larazus exit code 1, error 3
« Reply #18 on: August 01, 2020, 03:21:16 am »
I believe I found it.
This I found: Make sure under Tools > Options that "Compiler Executable" is set to "/usr/local/bin/fpc" to get 64 bit applications.
Described in: https://wiki.freepascal.org/Installing_Lazarus_on_macOS


Compile package LCL 2.0.10: Succes!, Warnings: 34, Hints: 550

Compile Project, Target: /Users/Leef/tmp/project1: Succes!

p.leeflang

  • New member
  • *
  • Posts: 9
Re: macOS Larazus exit code 1, error 3
« Reply #19 on: August 01, 2020, 03:52:13 am »
Thanks Trev, you where a big help.

But still it is funny.

With your suggestion:
2. I suspect that if you go to Lazarus > Tools > Options, your compiler is set to ppc386 (32 bit)
   - If so, you should change it to ppcx64 (64 bit)

I managed the first problem, but later this /usr/local/lib/fpc/3.2.0/ppcx64 was changed into: /usr/local/bin/fpc

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 929
  • Former Delphi 1-7, 10.2 User
Re: macOS Larazus exit code 1, error 3
« Reply #20 on: August 01, 2020, 04:14:15 am »
fpc or ppcx64 is fine - fpc is a wrapper which picks the right 32/64 bit compiler. I was just wanting to make sure you were using the 64 bit compiler.

As for it changing from ppcx64 to fpc - maybe when you reinstalled FPC.

The fact that your /usr/local/bin ownership/permissions were "unexpected" is more curious. Glad you managed to fix it and all is now well.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

 

TinyPortal © 2005-2018