Recent

Author Topic: Debugger "Failed to load file: Architecture of file not recognized"  (Read 13474 times)

Alex_Cher

  • Newbie
  • Posts: 4
I have Mac OS 10.5 and Lazarus 0.9.2.7
Package LNet works in Windows but does not work in Mac OS. To make this package work I tried to reconfigure and recompile Lazarus with different options. But this changes did not take any positive effect. But after that on start any project Lazarus shows error message Debugger "Failed to load file: Architecture of file not recognized". To fix it I tried everything, include uninstalling Lazarus with FPC and removing from system all files and folders which tave name like *azarus* and *fpc*. But after new installation of Lazarus and FPC (this or newer or older version) the error appears again.


Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
Re: Debugger "Failed to load file: Architecture of file not recognized"
« Reply #1 on: December 28, 2008, 01:54:03 am »
Open a command prompt and do a "file your_exe"
and paste the results here.

Does your_exe run without debugger ?
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Alex_Cher

  • Newbie
  • Posts: 4
Re: Debugger "Failed to load file: Architecture of file not recognized"
« Reply #2 on: December 28, 2008, 04:07:35 pm »
Thank you for your reply.
My simplest project (p1) conteins only one form and a button on it.
Yes, it runs.
Command prompt's output is:
./open p1.app

TCarbonWindow.SetScrollInfo TODO
TCarbonWindow.SetScrollInfo TODO
TCarbonWindow.SetScrollInfo TODO

« Last Edit: December 28, 2008, 04:58:23 pm by Alex_Cher »

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
Re: Debugger "Failed to load file: Architecture of file not recognized"
« Reply #3 on: December 29, 2008, 02:44:26 pm »
and what if you do
Code: [Select]
gdb p1.app
run
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Alex_Cher

  • Newbie
  • Posts: 4
Re: Debugger "Failed to load file: Architecture of file not recognized"
« Reply #4 on: December 30, 2008, 11:30:25 pm »
Ooops...
GDB returns the same error. Here is terminal's output:

gdb p1.app
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Architecture of file not recognized.

(gdb) run
Starting program: /Users/brother/Documents/p1.app/Contents/MacOS/p1
warning: Couldn't set the process group, error: 0

Program exited with code 055.
(gdb)


So, I see that GDB is configured for i386. Could you explain me how to reconfigure it back to PowerPC.
I really don't remember how I have made this configuration.

Thanks in advance.
Alex.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
Re: Debugger "Failed to load file: Architecture of file not recognized"
« Reply #5 on: December 31, 2008, 12:09:02 am »
are you sure you have a powerPC apple ? All recent models are afaik x86.

The configured for i386 is a configuration during the compilation of gdb, so unless you recently "updated" gdb with the wrong architecture. it is nothing you can configure yourself.

if you have an intel mac, you should use ppc386 as compiler and not ppcppc
« Last Edit: December 31, 2008, 12:11:45 am by Marc »
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Alex_Cher

  • Newbie
  • Posts: 4
Re: Debugger "Failed to load file: Architecture of file not recognized"
« Reply #6 on: January 01, 2009, 08:47:18 am »
 :D :D :D
You are right!
I checked my Mac's configuration. It's  architecture is i386.

Thank you for your replies.

PS:
But it is strange for me, I've installed several programs (include Lazarus) for PowerPC architecture and they work correctly.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
Re: Debugger "Failed to load file: Architecture of file not recognized"
« Reply #7 on: January 02, 2009, 01:05:00 am »
Running ppc programs is made possible by "Rosetta" a ppc emulator
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018