Recent

Author Topic: Lazarus Cannot find "fpcres" (BUT CAN FROM TERMINAL)[SOLVED]  (Read 3063 times)

kevin.black

  • Full Member
  • ***
  • Posts: 121
Lazarus Cannot find "fpcres" (BUT CAN FROM TERMINAL)[SOLVED]
« on: January 14, 2019, 01:19:21 am »
Again, Apologies for what might seem trivial, but is a blocker for me:

As you can see from my reply below, the problem was initially a crazy mis-match of 32 and 64 bit parts. I have finally sorted that. The issue NOW is that I get the fpcres error: Error: (9021) resource compiler "fpcres" not found, switching to external mode

Code: Pascal  [Select][+][-]
  1. Hint: (11030) Start of reading config file /etc/fpc.cfg
  2. Hint: (11031) End of reading config file /etc/fpc.cfg
  3. Free Pascal Compiler version 3.0.4 [2017/11/26] for x86_64
  4. Copyright (c) 1993-2017 by Florian Klaempfl and others
  5. (1002) Target OS: Darwin for x86_64
  6. (3104) Compiling pDYLIBTestAPP.lpr
  7. (3104) Compiling udylibtestapp.pas
  8. /Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(28,28) Hint: (5024) Parameter "Sender" not used
  9. /Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(27,28) Hint: (5024) Parameter "Sender" not used
  10. /Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(26,28) Hint: (5024) Parameter "Sender" not used
  11. (9001) Assembling (pipe) /Users/kevin/Dropbox/Lazarus/DYLIB Test/lib/x86_64-darwin/udylibtestapp.s
  12. (9001) Assembling (pipe) /Users/kevin/Dropbox/Lazarus/DYLIB Test/lib/x86_64-darwin/pDYLIBTestAPP.s
  13. pDYLIBTestAPP.lpr(25) Error: (9021) resource compiler "fpcres" not found, switching to external mode
  14. pDYLIBTestAPP.lpr(25) Fatal: (10026) There were 1 errors compiling module, stopping
  15. Fatal: (1018) Compilation aborted

I've searched and searched etc and nothing. The fpcres binary is in /usr/local/bin (CONFIRMED)
I can run fpcres from a Terminal windows from Anywhere on my VM (CONFIRMED)

Code: Pascal  [Select][+][-]
  1. Lindeman:DYLIB Test kevin$ fpcres
  2. fpcres - resource file converter, version 2.0 [2017/11/26], FPC 3.0.4
  3. Host platform: Darwin - x86_64
  4. Copyright (c) 2008 by Giulio Bernardi.

The version seems correct, ie. Darwin - x86_x64
This would seem that there is no PATH issue?
YET when I do a build I get the NOT FOUND error.

So can anyone suggest WHY I'm getting the CANNOT FIND error and how to fix it PLEASE?

Thanks Kevin
« Last Edit: January 15, 2019, 11:17:03 pm by kevin.black »

kevin.black

  • Full Member
  • ***
  • Posts: 121
Re: Cannot find "forces" - Installation Issue?
« Reply #1 on: January 14, 2019, 11:22:05 pm »
The code is as above, BUT BUT BUT I think the issue to some extent was that there was a miss mash of 32bit/64bit compile options. It is (to a newbie at least) very confusing since, as near as I can figure out there are two places where you need to tell the system your are 64 bitting (sp).

  • Tools>Options>Files you need the compiler to be ppcX64
  • That option wasn't available in my install so I was using ppc386
  • I 'Think' that was the cause of my issues in the original question
  • You also need to (in Project>Options>Config and Target> set it to x86-x64
  • None of the other options in that group work

OK did that and finally the errors Stopped:

ld: symbol(s) not found for architecture i386
An error occurred while linking

Big clue with the i386, but that part of the message wasn't visible unless you copied ALL message data (another trap for young players)

NOW however I am getting an error cannot find fpcres. I can confirm that fpcres is where it should be in /usr/local/bin. So again, how to I set the path so that fpcres can be found and my simple little application build?

here is the complete message details:

Code: Pascal  [Select][+][-]
  1. Hint: (11030) Start of reading config file /etc/fpc.cfg
  2. Hint: (11031) End of reading config file /etc/fpc.cfg
  3. Free Pascal Compiler version 3.0.4 [2017/11/26] for x86_64
  4. Copyright (c) 1993-2017 by Florian Klaempfl and others
  5. (1002) Target OS: Darwin for x86_64
  6. (3104) Compiling pDYLIBTestAPP.lpr
  7. (3104) Compiling udylibtestapp.pas
  8. /Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(28,28) Hint: (5024) Parameter "Sender" not used
  9. /Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(27,28) Hint: (5024) Parameter "Sender" not used
  10. /Users/kevin/Dropbox/Lazarus/DYLIB Test/udylibtestapp.pas(26,28) Hint: (5024) Parameter "Sender" not used
  11. (9001) Assembling (pipe) /Users/kevin/Dropbox/Lazarus/DYLIB Test/lib/x86_64-darwin/udylibtestapp.s
  12. (9001) Assembling (pipe) /Users/kevin/Dropbox/Lazarus/DYLIB Test/lib/x86_64-darwin/pDYLIBTestAPP.s
  13. pDYLIBTestAPP.lpr(25) Error: (9021) resource compiler "fpcres" not found, switching to external mode
  14. pDYLIBTestAPP.lpr(25) Fatal: (10026) There were 1 errors compiling module, stopping
  15. Fatal: (1018) Compilation aborted
  16.  

So the real issue here MUST be that, since I can just type in "fpcres" at any terminal window and it is found and executed, there MUST be some sort of Link/hard coded path to fpcres that is incorrect. This is driving me bonkers, and I cannot proceed pas this point since I cannot compile / build anything.

UPDATE: I reinstalled everything and same error, ie. cannot find fpcres. Now I tried to install a package and of course that blew up with the same error. Essentially the WHOLE Lazarus thing is now broke and I can go no further.

Again, thanks in advanx......
« Last Edit: January 15, 2019, 03:38:46 am by kevin.black »

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: Lazarus Cannot find "fpcres" (BUT CAN FROM TERMINAL)
« Reply #2 on: January 15, 2019, 09:56:15 am »
What does your "fpc.cfg" file look like? Try adding the following line to it, if it's not already there:

Code: Pascal  [Select][+][-]
  1. -FD/usr/local/bin

The "-FD" flag specifies directories where FPC should look for external tool binaries (such as FPCRES.)

kevin.black

  • Full Member
  • ***
  • Posts: 121
Re: Lazarus Cannot find "fpcres" (BUT CAN FROM TERMINAL)
« Reply #3 on: January 15, 2019, 11:56:24 am »
@Akira1364, Thanks that’s a good point, I didn’t know what the -FD meant.

I have, I think, just resolved at least that =issue. I had the folder for the 64 bit compiler pointing to /usr/.../.../ppcx64 (cannot remember exactly where out was pointing) and not to /usr/bin/ppcx64 (IIRC). Changing it to the correct? Folder now allows the DYLIB to compile. So clearly this issue is resolved.

 

TinyPortal © 2005-2018