[p4python] "Symbol not found: _FSRefMakePath" in P4API.so onMacOSX 10.5.2 PPC

Daryl Spitzer daryl.spitzer at gmail.com
Fri May 2 10:47:47 PDT 2008


Robert,

I didn't have any luck with this.  Here's the steps I took:

1. I downloaded p4python.tgz (from
ftp://ftp.perforce.com/perforce/r07.3/tools/p4python.tgz) and expanded
it into "P4Python-2007.3".

2. I downloaded p4api.tar (from
ftp://ftp.perforce.com:21//perforce/r07.3/bin.macosx104ppc/p4api.tar)
and expanded it into "p4api-2007.3.143793".

3. I placed "p4api-2007.3.143793" into "P4Python-2007.3" and edited
setup.cfg to set "p4_api=p4api-2007.3.143793".

4. I added the line 'extra_link_args = ["-framework", "Carbon"]' to
setup.py after:
      elif unameOut[0] == "Darwin":
        unix = "MACOSX"
        release = "104"
        platform = self.architecture(unameOut[4])

5. I ran `python setup.py build` (as directed to in
http://perforce.com/perforce/doc.current/user/p4pythonnotes.txt) and
got several warnings (see below).

6. I ran `python p4test.py` and got:
Traceback (most recent call last):
  File "p4test.py", line 6, in <module>
    import P4
  File "build/lib.macosx-10.3-fat-2.5/P4.py", line 185, in <module>
    import P4API
ImportError: dlopen(build/lib.macosx-10.3-fat-2.5/P4API.so, 2): Symbol
not found: _FSRefMakePath
  Referenced from:
/Users/darylspitzer/Desktop/P4Python-2007.3/build/lib.macosx-10.3-fat-2.5/P4API.so
  Expected in: dynamic lookup

7. I ran `python setup.py install` and got no warnings or errors.

8. I ran `python` and then typed "import P4" and got:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "P4.py", line 185, in <module>
    import P4API
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/P4API.so,
2): Symbol not found: _FSRefMakePath
  Referenced from:
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/P4API.so
  Expected in: dynamic lookup

Here are the warnings from step #5:

ld warning: in p4api-2007.3.143793/lib/libclient.a, file is not of
required architecture
ld warning: in p4api-2007.3.143793/lib/librpc.a, file is not of
required architecture
ld warning: in p4api-2007.3.143793/lib/libsupp.a, file is not of
required architecture
ld warning: ClientUser::OutputError(char*)   has different visibility
(hidden) in p4api-2007.3.143793/lib/libclient.a(clientuser.o) and
(default) in build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
ld warning: ClientUser::OutputInfo(char, char*)has different
visibility (hidden) in
p4api-2007.3.143793/lib/libclient.a(clientuser.o) and (default) in
build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
ld warning: ClientUser::OutputBinary(char*, int)has different
visibility (hidden) in
p4api-2007.3.143793/lib/libclient.a(clientuser.o) and (default) in
build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
ld warning: ClientUser::OutputText(char*, int)has different visibility
(hidden) in p4api-2007.3.143793/lib/libclient.a(clientuser.o) and
(default) in build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
ld warning: ClientUser::Help(char* const*)has different visibility
(hidden) in p4api-2007.3.143793/lib/libclient.a(clientuser.o) and
(default) in build/temp.macosx-10.3-fat-2.5/PythonClientUser.o

--
Daryl


On Thu, May 1, 2008 at 9:39 AM, Robert Cowham <robert at vaccaperna.co.uk> wrote:
>
>
> Don't worry about the elif - that was my version of setup.
>
> Just add this line in appropriate place:
>
>
>        extra_link_args = ["-framework", "Carbon"]
>
> Robert
>
>
> ________________________________

> From: Daryl Spitzer [mailto:daryl.spitzer at gmail.com]
> Sent: 01 May 2008 16:51
>
>
>
> To: Robert Cowham
> Cc: p4python at perforce.com
> Subject: Re: [p4python] "Symbol not found: _FSRefMakePath" in P4API.so onMacOSX 10.5.2 PPC
>
>
>
>
>
> Robert,
>
>
> What file is your "elif" snippet from?  (I finally made time to look at this.)  setup.py?  I can't find it.
>
>
> --
> Daryl
>
>
>
> On Mon, Apr 7, 2008 at 3:04 PM, Robert Cowham <robert at vaccaperna.co.uk> wrote:
>
> > My version of P4Python required an extra lib to build:
> >
> >    elif sys.platform == 'darwin':
> >        libraries = ["client", "rpc", "supp"]    # P4API libs
> >        extra_compile_args = ["-DOS_DARWIN", "-D%s" % p4_api_ver]
> >        extra_link_args = ["-framework", "Carbon"]
> >
> > Try linking in that lib and see what happens.
> >
> > Robert
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Daryl Spitzer [mailto:daryl.spitzer at gmail.com]
> > > Sent: 07 April 2008 18:02
> > > To: Robert Cowham
> > > Cc: p4python at perforce.com
> > > Subject: Re: [p4python] "Symbol not found: _FSRefMakePath" in
> > > P4API.so on MacOSX 10.5.2 PPC
> > >
> > > Perforce support replied that (according to the release
> > > notes) the release is certified on Linux, Solaris, Windows &
> > > FreeBSD, but not Mac OS X.
> > >
> > > Has anyone out there been able to get the latest P4Python
> > > working on Mac OS X?
> > >
> > > --
> > > Daryl
> > >
> > >
> > > On Mon, Apr 7, 2008 at 7:49 AM, Daryl Spitzer
> > > <daryl.spitzer at gmail.com> wrote:
> > > > Done.  Thanks.
> > > >
> > > >  (I'll report back on what I learn.)
> > > >
> > > >  --
> > > >  Daryl
> > > >
> > > >
> > > >
> > > >
> > > >  On Sat, Apr 5, 2008 at 4:45 PM, Robert Cowham
> > > <robert at vaccaperna.co.uk> wrote:
> > > >  > This version of P4Python is now supported by Perforce so I would
> > > > copy  >  support on this one.
> > > >  >
> > > >  >  Regards
> > > >  >  Robert
> > > >  >
> > > >  >
> > > >  >
> > > >  >
> > > >  >  > -----Original Message-----
> > > >  >  > From: p4python-bounces at perforce.com  >  >
> > > > [mailto:p4python-bounces at perforce.com] On Behalf Of Daryl
> > > Spitzer  >
> > > > > Sent: 05 April 2008 21:29  >  > To: p4python at perforce.com  >  >
> > > > Subject: [p4python] "Symbol not found: _FSRefMakePath" in  >  >
> > > > P4API.so on Mac OSX 10.5.2 PPC  >  >  >  > I installed
> > > P4Python on my
> > > > PowerBook G4 running Mac OS X  >  > 10.5.2, and get the
> > > following when
> > > > I do an "import P4":
> > > >  >  >
> > > >  >  > >>> import P4
> > > >  >  > Traceback (most recent call last):
> > > >  >  >   File "<stdin>", line 1, in <module>
> > > >  >  >   File
> > > >  >  > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2
> > > >  >  > .5/site-packages/P4.py",
> > > >  >  > line 185, in <module>
> > > >  >  >     import P4API
> > > >  >  > ImportError:
> > > >  >  > dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/p
> > > >  >  > ython2.5/site-packages/P4API.so,  >  > 2): Symbol not found:
> > > > _FSRefMakePath
> > > >  >  >   Referenced from:
> > > >  >  > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.
> > > >  >  > 5/site-packages/P4API.so
> > > >  >  >   Expected in: dynamic lookup
> > > >  >  >
> > > >  >  > I thought perhaps I hadn't properly uninstalled after
> > > my  >  >
> > > > previous attempt to install P4Python.  (I first got it from  >  >
> > > > http://public.perforce.com/guest/robert_cowham/perforce/API/py
> > > >  >  > thon/index.html.)
> > > >  >  >  I deleted all the P4 files from  >  >
> > > > (/Library/Frameworks/Python.framework/Versions/2.5/lib/python2
> > > >  >  > .5/site-packages/:
> > > >  >  >
> > > >  >  > -rw-r--r--    1 darylspitzer  admin   12876 Feb 20 14:38 P4.py
> > > >  >  > -rw-r--r--    1 darylspitzer  admin   17184 Apr  5
> > > 13:11 P4.pyc
> > > >  >  > -rwxr-xr-x    1 darylspitzer  admin  843276 Apr  5
> > > 13:03 P4API.so
> > > >  >  > -rw-r--r--    1 darylspitzer  admin    1048 Apr  5 13:11
> > > >  >  > P4Python-2007.3-py2.5.egg-info
> > > >  >  >
> > > >  >  > And didn't get any warnings the second time I built.
> > > Though  >
> > > > > it now occurs to me that I probably didn't see the warnings  >  >
> > > > because it wasn't making "clean".  Here are the warnings I
> > > >  > saw
> > > > the first time I built:
> > > >  >  >
> > > >  >  > g++ -arch i386 -arch ppc -isysroot
> > > > /Developer/SDKs/MacOSX10.4u.sdk -g  >  > -bundle -undefined
> > > > dynamic_lookup  >  > build/temp.macosx-10.3-fat-2.5/P4API.o
> > > >  >  > build/temp.macosx-10.3-fat-2.5/PythonClientAPI.o
> > > >  >  > build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
> > > >  >  > build/temp.macosx-10.3-fat-2.5/SpecMgr.o
> > > >  >  > build/temp.macosx-10.3-fat-2.5/P4Result.o
> > > >  >  > -Lp4api-2007.3.143793/ -Lp4api-2007.3.143793/lib
> > > -lclient  >  >
> > > > -lrpc -lsupp -o build/lib.macosx-10.3-fat-2.5/P4API.so
> > > >  >  > ld warning: in p4api-2007.3.143793/lib/libclient.a,
> > > file is  >
> > > > > not of required architecture ld warning: in  >  >
> > > > p4api-2007.3.143793/lib/librpc.a, file is not of required  >  >
> > > > architecture ld warning: in  >  >
> > > p4api-2007.3.143793/lib/libsupp.a,
> > > > file is not of required  >  > architecture
> > > >  >  > ld warning: ClientUser::OutputError(char*)   has
> > > different visibility
> > > >  >  > (hidden) in p4api-2007.3.143793/lib/libclient.a(clientuser.o)
> > > > and  >  > (default) in
> > > > build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
> > > >  >  > ld warning: ClientUser::OutputInfo(char, char*)has
> > > different  >
> > > > > visibility (hidden) in  >  >
> > > > p4api-2007.3.143793/lib/libclient.a(clientuser.o) and  >  >
> > > (default)
> > > > in build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
> > > >  >  > ld warning: ClientUser::OutputBinary(char*, int)has
> > > different  >
> > > > > visibility (hidden) in  >  >
> > > > p4api-2007.3.143793/lib/libclient.a(clientuser.o) and  >  >
> > > (default)
> > > > in build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
> > > >  >  > ld warning: ClientUser::OutputText(char*, int)has different
> > > > visibility  >  > (hidden) in
> > > > p4api-2007.3.143793/lib/libclient.a(clientuser.o) and  >  >
> > > (default)
> > > > in build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
> > > >  >  > ld warning: ClientUser::Help(char* const*)has different
> > > > visibility  >  > (hidden) in
> > > > p4api-2007.3.143793/lib/libclient.a(clientuser.o) and  >  >
> > > (default)
> > > > in build/temp.macosx-10.3-fat-2.5/PythonClientUser.o
> > > >  >  >
> > > >  >  > I installed using
> > > >  >  >
> > > ftp://ftp.perforce.com/perforce/r07.3/tools/p4python.tgz and  >
> > > > > ftp://ftp.perforce.com/perforce/r07.3/bin.macosx104ppc/p4api.tar.
> > > >  >  >
> > > >  >  > --
> > > >  >  > Daryl Spitzer
> > > >  >  > _______________________________________________
> > > >  >  > p4python mailing list
> > > >  >  > p4python at perforce.com
> > > >  >  > http://maillist.perforce.com/mailman/listinfo/p4python
> > > >  >  >
> > > >  >
> > > >  >
> > > >
> > >
> >
> >
>
>



More information about the p4python mailing list