[p4ruby] p4ruby on Mac Snow Leopard

Andy Koch andy.koch at pc-doctor.com
Thu Mar 25 09:55:10 PDT 2010


Hi Tony,

that sounded promising, but still getting errors and seeing reference to Carbon framework.



[~/src/p4ruby-2009.1]
andy at pdd-andy-mbp->ruby p4conf.rb --apidir /Users/andy/src/p4api-2009.1.205670/

Starting to configure P4/Ruby for building

Found 2009.1 Perforce API in /Users/andy/src/p4api-2009.1.205670

P4/Ruby Configuration Summary
-----------------------------

Using Perforce API Version: 2009.1
API headers and libs from : /Users/andy/src/p4api-2009.1.205670
OS name                   : DARWIN
OS version                : 10
Platform                  : X86
CFLAGS                    : -g -O2  -pipe -fno-common $(cflags) -I/Users/andy/src/p4api-2009.1.205670/include/p4 -DOS_DARWIN -DOS_DARWIN10 -DOS_DARWIN10X86 -DCASE_INSENSITIVE 
LIBPATH                   : /Users/andy/src/p4api-2009.1.205670/lib
libs                      : -lclient -lrpc -lsupp 

Creating extconf.h
creating Makefile
 
[~/src/p4ruby-2009.1]
andy at pdd-andy-mbp->make
g++ -bundle -o P4.bundle clientuserruby.o p4.o p4clientapi.o p4mapmaker.o p4mergedata.o p4result.o p4specdata.o specmgr.o -L/Users/andy/src/p4api-2009.1.205670/lib -L. -L/Users/andy/.rvm/rubies/ree-1.8.7-2010.01/lib -L.  -framework Carbon    -lclient -lrpc -lsupp  -ldl -lobjc  
Undefined symbols:
  "_rb_hash_aref", referenced from:
      SpecDataRuby::GetLine(SpecElem*, int, char const**)in p4specdata.o
      SpecDataRuby::SetLine(SpecElem*, int, StrPtr const*, Error*)in p4specdata.o
      SpecMgr::InsertItem(unsigned long, StrPtr const*, StrPtr const*)in specmgr.o
  "_rb_hash_aset", referenced from:
      SpecDataRuby::SetLine(SpecElem*, int, StrPtr const*, Error*)in p4specdata.o
      SpecDataRuby::SetLine(SpecElem*, int, StrPtr const*, Error*)in p4specdata.o
      SpecMgr::InsertItem(unsigned long, StrPtr const*, StrPtr const*)in specmgr.o
      SpecMgr::InsertItem(unsigned long, StrPtr const*, StrPtr const*)in specmgr.o
      SpecMgr::InsertItem(unsigned long, StrPtr const*, StrPtr const*)in specmgr.o
      SpecMgr::SpecFields(StrPtr*)      in specmgr.o





----- Original Message -----
From: "Tony Smith" <tony at smee.org>
To: "Andy Koch" <andy.koch at pc-doctor.com>
Cc: p4ruby at perforce.com
Sent: Thursday, March 25, 2010 2:47:52 AM GMT -08:00 US/Canada Pacific
Subject: Re: [p4ruby] p4ruby on Mac Snow Leopard

Hi Andy,

The macosx version of the API requires the Carbon framework, but the 
darwin version doesn't (the macosx version is for building GUI clients 
with, while the darwin build is for non-GUI stuff).  The errors you're 
getting are to do with architecture support though: ruby wants to link 
for more than one architecture, but the P4API you're using only supports 
x86 (not x86_64).

I recommend using the 'darwin8u' builds on Mac as they are universal 
binaries suitable for use on PPC, x86 and x86_64 platforms. Try with 
this build and see if it works any better:

http://www.perforce.com/downloads/perforce/r09.1/bin.darwin80u/p4api.tgz

Tony

Andy Koch wrote:
> Hi Tony,
>
> Trying install p4ruby on Mac Snow Leopard (10.6.2) and am having some compilation issues.
>
> I'm using p4ruby and p4api from the 09.1 dir of perforce.com
>
> Wondering if this bit "-framework Carbon" is the problem?  Does this need to change to Cocoa?
>
> please advise & thank you
>
>
> here is my console output...
>
>
> [~/src/p4ruby-2009.1]
> andy at pdd-andy-mbp->ruby p4conf.rb --apidir /Users/andy/src/p4api-2009.1.211694/
>
> Starting to configure P4/Ruby for building
>
> Found 2009.1 Perforce API in /Users/andy/src/p4api-2009.1.211694
>
> P4/Ruby Configuration Summary
> -----------------------------
>
> Using Perforce API Version: 2009.1
> API headers and libs from : /Users/andy/src/p4api-2009.1.211694
> OS name                   : DARWIN
> OS version                : 10
> Platform                  : X86
> CFLAGS                    : -g -O2  -pipe -fno-common $(cflags) -I/Users/andy/src/p4api-2009.1.211694/include/p4 -DOS_DARWIN -DOS_DARWIN10 -DOS_DARWIN10X86 -DCASE_INSENSITIVE 
> LIBPATH                   : /Users/andy/src/p4api-2009.1.211694/lib
> libs                      : -lclient -lrpc -lsupp 
>
> Creating extconf.h
> creating Makefile
>  
> [~/src/p4ruby-2009.1]
> andy at pdd-andy-mbp->make
> g++ -bundle -o P4.bundle clientuserruby.o p4.o p4clientapi.o p4mapmaker.o p4mergedata.o p4result.o p4specdata.o specmgr.o -L/Users/andy/src/p4api-2009.1.211694/lib -L. -L/Users/andy/.rvm/rubies/ree-1.8.7-2010.01/lib -L.  -framework Carbon    -lclient -lrpc -lsupp  -ldl -lobjc  
> ld: warning: in /Users/andy/src/p4api-2009.1.211694/lib/libclient.a, missing required architecture x86_64 in file
> ld: warning: in /Users/andy/src/p4api-2009.1.211694/lib/librpc.a, missing required architecture x86_64 in file
> ld: warning: in /Users/andy/src/p4api-2009.1.211694/lib/libsupp.a, missing required architecture x86_64 in file
> Undefined symbols:
>   "FileSys::Compare(FileSys*, Error*)", referenced from:
>       ClientUserRuby::Diff(FileSys*, FileSys*, int, char*, Error*)in clientuserruby.o
>   "Spec::Count()", referenced from:
>       SpecMgr::SpecFields(StrPtr*)      in specmgr.o
>   "_rb_str_new", referenced from:
>
> << snip - there is 1000+ additional compiler dump >>
>
>
>   

-- 
Andy Koch, Web Applications Developer	
PC-Doctor, Inc.
9805 Double R Boulevard, Suite 301
Reno, NV 89521
775-336-4079
andy.koch at pc-doctor.com

CONFIDENTIALITY
The information contained in this message is confidential. It is intended to be read only by the individual or entity to whom it is addressed or by an authorized designee. If the reader of this message is not the intended recipient, be aware that distribution of this message in any form is strictly prohibited. If you have received this message in error, please immediately notify the sender and destroy any copy of this message.



More information about the p4ruby mailing list