17

I am trying to run a sample Firemonkey app on a Mac, but I am getting this message in the mac:

dyld: Library not loaded: @rpath/libcgunwind.1.0.dylib
  Referenced from: /Users/nobre/Applications/Embarcadero/PAServer/scratch-dir/rafael_colucci-Nobre/Project37.app/Contents/MacOS/Project37
  Reason: image not found
dyld: Library not loaded: @rpath/libcgunwind.1.0.dylib
  Referenced from: /Users/nobre/Applications/Embarcadero/PAServer/scratch-dir/rafael_colucci-Nobre/Project37.app/Contents/MacOS/Project37
  Reason: image not found
dyld: Library not loaded: @rpath/libcgunwind.1.0.dylib
  Referenced from: /Users/nobre/Applications/Embarcadero/PAServer/scratch-dir/rafael_colucci-Nobre/Project37.app/Contents/MacOS/Project37
  Reason: image not found

I used this tutorial to add a OSX platform:

New Mac and Rad Studio XE2

EDIT

More info about the error:

Process:         Teste2 [34270]
Path:            /Users/User/Applications/Embarcadero/PAServer/scratch-dir/rafael_colucci-VM/Teste2.app/Contents/MacOS/Teste2
Identifier:      Teste2
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  launchd [94]

Date/Time:       2011-09-01 19:36:26.246 +0100
OS Version:      Mac OS X 10.6.8 (10K540)
Report Version:  6

Interval Since Last Report:          3908 sec
Crashes Since Last Report:           4
Per-App Crashes Since Last Report:   4
Anonymous UUID:                      58C242CA-C324-4A23-86ED-96D93C7C1A84

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
  Library not loaded: @rpath/libcgunwind.1.0.dylib
  Referenced from: /Users/User/Applications/Embarcadero/PAServer/scratch-dir/rafael_colucci-VM/Teste2.app/Contents/MacOS/Teste2
  Reason: image not found

Binary Images:
0x8fe00000 - 0x8fe4163b  dyld 132.1 (???) <4CDE4F04-0DD6-224E-ACE5-3C06E169A801> /usr/lib/dyld

Model: VMware Virtual Platform, BootROM 6.00, 1 processor, 30 GHz, 1 GB, SMC 1.30f3
Graphics: VMware SVGA II, VMware SVGA II, PCI, 16 MB
Network Service: Ethernet, Ethernet, en0
Parallel ATA Device: VMware Virtual IDE CDROM Drive
SCSI Device: SCSI Target Device @ 0
USB Device: VMware Virtual USB Hub, 0x0e0f  (VMWare, Inc.), 0x0002, 0x00200000 / 3
USB Device: VMware Virtual USB Keyboard, 0x05ac  (Apple Inc.), 0x020b, 0x00210000 / 4
USB Device: VMware Virtual USB Mouse, 0x0e0f  (VMWare, Inc.), 0x0003, 0x00100000 / 2

EDIT

Some screenshots:

App config

PaServer running

Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121
  • 1
    @Warren Get with the program! ;-) This is post-release software that Rafael has downloaded today. It was released yesterday. – David Heffernan Sep 01 '11 at 13:58
  • What? I can't find any release information.... Or any legit download sites.... – Warren P Sep 01 '11 at 14:01
  • @Warren you aren't looking hard enough: http://shop.embarcadero.com/dr/v2/ec_Main.Entry17C?SID=39696&SP=10023&CID=0&PID=996484&PN=1&V1=996484&CUR=840&DSP=&PGRP=0&ABCODE=&CACHE_ID=0 – David Heffernan Sep 01 '11 at 14:04
  • It's just out -- some software assurance customers got a download e-mail. Patience! – Craig Stuntz Sep 01 '11 at 14:08
  • 1
    Wow! :-) Okay, it's out then! Upvoted for first legit XE2 question. – Warren P Sep 01 '11 at 14:18
  • Don't have SA anymore, man that sucks. How am I going to convince my boss to shell out $499 for an upgrade :( – whosrdaddy Sep 01 '11 at 14:25
  • 1
    @whosrdaddy Easy, get your customers to start demanding 64 bit versions! – David Heffernan Sep 01 '11 at 14:55
  • I'm having the same issue, The file is missing from my Redist folder and thus I can not deploy anything to my MBP. – Richard Holland Sep 01 '11 at 18:35
  • @Warren: it surprised me too. – Rudy Velthuis Sep 02 '11 at 21:36
  • "Hi RBS and Randy, the problem is in the icon. It is not available. If you specify another icon for the app it will build and run" Got it from [Link](http://www.simonjstuart.com/2011/09/03/rad-studio-xe2-setting-it-up-for-a-mac-step-by-step-illustrated-guide/comment-page-1/#comment-3104) – helloworld0101 Sep 06 '11 at 17:57
  • 1
    I see the VMWare window in your Mac Screen shot. Embaracadero has said Hackintosh (Mac on windows) is not supported. It's also against the apple license to do this. – Robert Love Sep 30 '11 at 18:53

13 Answers13

11

I just installed the Delphi XE2 Trial and I'm getting the same issue - unable to start a FireMonkey application on Mac OS X because of the missing libcgunwind.1.0.dylib.

However, I believe I know what the problem is. This file should be inside the ($BDS)\Redist\osx32 folder ready to be deployed with your Delphi OSX application. But, if you only installed the Delphi XE2 product instead of the complete RAD Studio XE2, these redistributable files will be missing, e.g. not installed at all.

Wherever this specific file is mentioned in the documents, it's in relation to C++Builder. So if this really is the issue, it's probably a (not so small) oversight on Embarcadero side.

To answer your question - I believe if you install the C++Builder XE2 trial, or the whole RAD Studio XE2 package, you should get these redistributable files.

Goran Skledar
  • 221
  • 1
  • 6
  • 2
    Ok I managed to get it working. If you installed the PAServer on your Mac, the libcgunwind.1.0.dylib is inside the Embarcadero/PAServer folder on Mac. I copied this file to my Windows machine to ($BDS)\Redist\osx32 folder and deployed the project again from within Delphi XE2 and it correctly copied the file now. Alternatively, could also try and copy the library file somewhere within reach of your system path environment vars on Mac. – Goran Skledar Sep 02 '11 at 00:34
  • 1
    **Travis H**'s answer on this is actually right on the spot - if you install the PAServer on Mac and just launch it with the paserver.command file, it should update the lib paths correctly to find the needed libraries. – Goran Skledar Sep 02 '11 at 00:41
6

If you go to the directory where PAServer was installed on you Mac, you should see that libcgunwind.1.0.dylib is present there.

The installer tries to help by creating a paserver.command file. If you launch using this, it should set your library path correctly so the above file is found.

If you've moved your PAServer location, just manually update the paserver.command file with the appropriate paths and run.

Travis H
  • 61
  • 1
  • libcgunwind.1.0.dylib is there and the paserver.command is ok. But it does not work. – Rafael Colucci Sep 01 '11 at 18:40
  • 1
    Make sure when you launch PAServer, you are running paserver.command, not paserver directly from the command prompt. Then once you have paserver launched that way, execute from Delphi. Is that what you tried? – Travis H Sep 01 '11 at 19:07
  • 1
    Try manually copying the libcgunwind.1.0.dylib to your application package in Contents/MacOS under your scratch directory, then run your application. – Travis H Sep 01 '11 at 19:19
  • 1
    I did, but in that case the app closes even before the form is shown. – Rafael Colucci Sep 01 '11 at 19:26
5

Runtime error 231 at 000169AD

this is a problem under VMWare, see https://forums.embarcadero.com/message.jspa?messageID=393962

Workaround is copy FMX.Filter.pas to your project directory and modify:

function FilterByName(const AName: string): TFilter;
var
  i: Integer;
begin
  Result := nil;
  if Filters = nil then
    Exit;
  if GlobalUseHWEffects  then
  begin
    for i := 0 to Filters.Count - 1 do
      if CompareText(TFilterClass(Filters.Objects[i]).FilterAttr.Name, AName) = 0
      then
      begin
        Result := TFilterClass(Filters.Objects[i]).Create;
        Exit;
      end;
  end;
end;

function FilterClassByName(const AName: string): TFilterClass;
var
  i: Integer;
begin
  Result := nil;
  if Filters = nil then
    Exit;
  if GlobalUseHWEffects  then
  begin
    for i := 0 to Filters.Count - 1 do
      if CompareText(TFilterClass(Filters.Objects[i]).FilterAttr.Name, AName) = 0
      then
      begin
        Result := TFilterClass(Filters.Objects[i]);
        Exit;
      end;
  end;
end;

and in dpr set GlobalUseHWEffects := False;

This is because VMWare and emulating graphics hardware

netcodecz
  • 312
  • 2
  • 9
  • 1
    This issue should also help when running your Mac "headless" (i.e. without a monitor attached, only doing remote connections to it): then your Mac doesn't have the GPU HAL running, and FMX fails. – Jeroen Wiert Pluimers Oct 31 '11 at 08:49
2

You have to install the PA Server here follow these instructions Installing and Running the PA on Mac OS X

helloworld0101
  • 140
  • 1
  • 7
  • It seems he must have installed it but not quite correctly, then? – Warren P Sep 01 '11 at 14:25
  • If you installed it to the correct directory (path) and got the PA server up & running then it should work, did you run it from the XE2 IDE or you just run the binary file? If so try running it from the IDE and make sure you set up the remote profile for the project [Create remote profile on the development PC](http://docwiki.embarcadero.com/RADStudio/en/Creating_a_Remote_Profile_on_the_Development_PC) – helloworld0101 Sep 01 '11 at 14:49
  • I know this for C++ as the documentation says but give it a try it might help you from [Create a remote profile for the Mac OS X target](http://docwiki.embarcadero.com/RADStudio/XE2/en/Building_a_Mac_OS_X_Cross-Platform_Hello_World_Console_Application#Create_a_remote_profile_for_the_Mac_OS_X_target) > On the third page of the wizard (C++ directory information), do the following: Check the checkbox Use this profile with C++ projects. – helloworld0101 Sep 01 '11 at 15:11
  • Do you have some kinda firewall blocking the incoming connection? Did you try Test Connection? What is says? – helloworld0101 Sep 01 '11 at 21:24
  • No firewall, the test connection was fine – Rafael Colucci Sep 02 '11 at 14:29
  • You could check the PAServer_InstallLog.xml to check if eveything went fine? – helloworld0101 Sep 02 '11 at 19:38
2

Embarcadero's instructions on starting the remote server seem to be incorrect. Use the paserver.copmmand file to start the server. Then my project ran fine.

Then Deploying. Change the build configuration to Release instead of Debug. You have to copy the libcgunwind.1.0.dylib to the Redist\osx32 directory or the release will fail. Then tried build/release again. The "project".rsm file is in the debug directory and not in the release directory. I copied the .rsm file to the release directory, Deployed and it worked. This was the case with my own demo project and the controlsDemo project. Either one worked the same way.

A bit rough start but everything is working. Don't know why they put a menubar on the controls demo since it is not very mac-like. Change it to a main menu and everything works great.

Bill

  • I did not have to do any of that. I did project->deploy, used paserver.command, and made sure to run with debug vs without to get rid of the error on my end. – Richard Holland Sep 01 '11 at 23:21
1

I have solved this for me. I was clicking the green run button in the ide which is 'run without debugging'.

Click the run button next to it, which in XE2 is the run button us older people are used to.

Richard Holland
  • 2,663
  • 2
  • 21
  • 35
1

If think you need to open a cmd window and do the following command to populate the Redist folder, after that the the Deployment Manager will locate the necessary files:

C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\Redist> redistsetup default

Deployment Manager has a "Reconcile" button to refresh the list.

David Berneda
  • 490
  • 5
  • 9
1

console "Hello, World"

release - works fine (Hello, World) appears in Platform Assistant

terminal window debug - same as release

empty 2D Form

release - Runtime error 231 at 000169AD
debug - seems to run (bouncing Spartan Helmet icon in dock) but

the form never appears

empty 3D Form

release - Platform Assistant terminal window shows "invalid pixel

format" and "invalid context" messages but form appears and menu bar has "Project1" in it debug - same as release

These errors mean that you run your application under MacOS that was installed on Virtual Machine. Installation of MacOS on VM conflicts with license, and therefore Embarcadero does not plan to support the VM environment.

Devart
  • 119,203
  • 23
  • 166
  • 186
  • 1
    I'm having the same issue here, my MAC is not a VM its a MAC mini and i get the same symptoms as above. could the Invalid pixel format be due to connecting via VNC? – Mike Taylor Sep 16 '11 at 07:08
  • @Devart if you have a reply to an answer, then please put that as a comment under the answer, not as a new answer. – Jeroen Wiert Pluimers Sep 25 '11 at 10:18
1

Just click paserver.command instead of just paserver.. It works!

U can even add -password=(your password) , at the end of the last line inside paserver.command (after the last " . then it starts without asking for password.

Eric
  • 11
  • 1
1

Make sure there is a space after the path to the paserver in your paserver. Command before the -password part. For instance, my password is firemonkey and the line is as follows:

"/Users/firemonkey/Applications/Embarcadero/PAServer/paserver" -password=firemonkey

Then, make sure you run the paserver from the paserver.command file.

bensiu
  • 24,660
  • 56
  • 77
  • 117
Johann
  • 11
  • 1
0

Check the new "Redist" folder in the RAD Studio installation path. Your application needs some files from it.

Torbins
  • 2,111
  • 14
  • 16
0

Running the paserver.command helped with the first problem but most of it is the I think a missing file.

Checking deploy, the file libcgunwind.1.0.dylib in ($BDS)\Redist\osx32 folder was greyed out so I copied the file from the PAServer on the mac and refreshed now the app runs fine stand alone :)

Roger
  • 1
0

Just copy and run the application from the PAServer folder. Remember that to install and run PAServer you should do this http://docwiki.embarcadero.com/RADStudio/XE2/en/Installing_and_Running_the_Platform_Assistant_on_the_Target_Platform#Mac%3a_Installing_and_Running_the_Platform_Assistant_.28paserver.29_on_a_Mac