Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6195605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:29:46+00:00 2026-05-24T03:29:46+00:00

I’m trying to install p4python , a Python extension for the Perforce revision control

  • 0

I’m trying to install p4python, a Python extension for the Perforce revision control system. I’m using cygwin to accomplish this as p4python requires the P4 C++ API (it’s really just a wrapper), which in turn requires g++ (not to mention, Python extensions require a C compiler, hence, gcc). I’m on Windows 7 64-bit (not by choice) and Microsoft VS 2008 gave me some pretty stubborn problems; I had heard that using Cygwin/MinGW might be a better route. I also looked for related questions and none of them seemed to have a particularly relevant answer.

The best I can think of is that ld is looking in the wrong place for these libs and I’m told that Cygwin doesn’t handle symbolic links very well, but I’m not sure where to go from here. See terminal output below:

API Release 2010.2
running install
running build
running build_py
running build_ext
building 'P4API' extension
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c P4API.cpp -o build/temp.cygwin-1.7.9-i686-2.6/P4API.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c PythonClientAPI.cpp -o build/temp.cygwin-1.7.9-i686-2.6/PythonClientAPI.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c PythonClientUser.cpp -o build/temp.cygwin-1.7.9-i686-2.6/PythonClientUser.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
PythonClientUser.cpp: In member function ‘virtual int PythonClientUser::Resolve(ClientMerge*, Error*)’:
PythonClientUser.cpp:423: warning: deprecated conversion from string constant to ‘char*’
PythonClientUser.cpp:423: warning: deprecated conversion from string constant to ‘char*’
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c SpecMgr.cpp -o build/temp.cygwin-1.7.9-i686-2.6/SpecMgr.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
SpecMgr.cpp: In member function ‘PyObject* SpecMgr::NewSpec(StrPtr*)’:
SpecMgr.cpp:550: warning: deprecated conversion from string constant to ‘char*’
SpecMgr.cpp:550: warning: deprecated conversion from string constant to ‘char*’
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c P4Result.cpp -o build/temp.cygwin-1.7.9-i686-2.6/P4Result.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
P4Result.cpp: In destructor ‘P4Result::~P4Result()’:
P4Result.cpp:49: warning: suggest explicit braces to avoid ambiguous ‘else’
P4Result.cpp:52: warning: suggest explicit braces to avoid ambiguous ‘else’
P4Result.cpp:55: warning: suggest explicit braces to avoid ambiguous ‘else’
P4Result.cpp: In member function ‘void P4Result::Reset()’:
P4Result.cpp:71: warning: suggest explicit braces to avoid ambiguous ‘else’
P4Result.cpp:75: warning: suggest explicit braces to avoid ambiguous ‘else’
P4Result.cpp: In member function ‘void P4Result::Fmt(const char*, PyObject*, StrBuf&)’:
P4Result.cpp:189: warning: deprecated conversion from string constant to ‘char*’
P4Result.cpp:189: warning: deprecated conversion from string constant to ‘char*’
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c PythonMergeData.cpp -o build/temp.cygwin-1.7.9-i686-2.6/PythonMergeData.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c P4MapMaker.cpp -o build/temp.cygwin-1.7.9-i686-2.6/P4MapMaker.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DID_OS="CYGWINX86" -DID_REL="2009.2" -DID_PATCH="240822" -DID_API="2010.2" -DID_Y="2010" -DID_M="04" -DID_D="02" -IC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -IC:\Pyt
hon\p4api\p4api-2010.2.295040-vs2010_static\/include/p4 -I/usr/include/python2.6 -c PythonSpecData.cpp -o build/temp.cygwin-1.7.9-i686-2.6/PythonSpecData.o -DOS_CYGWIN -DOS_CYGWIN -DOS_CYGWINX86 -DOS_CYGWINX86
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
g++ -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.7.9-i686-2.6/P4API.o build/temp.cygwin-1.7.9-i686-2.6/PythonClientAPI.o build/temp.cygwin-1.7.9-i686-2.6/PythonClientUser.o build/temp.cygwin-1.7.9-i686-2.6/SpecMgr.o build/temp.cygwin-1.7.
9-i686-2.6/P4Result.o build/temp.cygwin-1.7.9-i686-2.6/PythonMergeData.o build/temp.cygwin-1.7.9-i686-2.6/P4MapMaker.o build/temp.cygwin-1.7.9-i686-2.6/PythonSpecData.o -LC:\Python\p4api\p4api-2010.2.295040-vs2010_static\ -LC:\Python\p4api\p4api-2010
.2.295040-vs2010_static\/lib -L/usr/lib/python2.6/config -lclient -lrpc -lsupp -lpython2.6 -o build/lib.cygwin-1.7.9-i686-2.6/P4API.dll
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lclient
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lrpc
/usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lsupp
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

To give a more concrete question, is ld looking in the wrong place or is something else going wrong that I’m not seeing? I’m out of ideas. Any help or guidance would be very much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T03:29:46+00:00Added an answer on May 24, 2026 at 3:29 am

    Here’s a way I’ve used to turn lib files into shared libraies for use with gcc:

    1. echo EXPORTS > NAME.def
    2. nm NAME.lib | grep ' T _' | sed 's/.* T _//' >> NAME.def
    3. dlltool --input-def NAME.def --dllname NAME --output-lib libNAME.a

    Further notes on using Cygwin (but I use gcc 3 on an older 32-bit system, so YMMV) :

    Install the gcc-mingw package (headers and libs for mingw for gcc and g++ 3) or one of the newer packages that use mingw-w64 for gcc 4.5. Also, compile with the option -mno-cygwin to keep from linking Cygwin into the executable/library. For Python extensions you can permanently configure distutils to use mingw by adding a distutils.cfg file to the Lib\distutils folder:

    [build]
    compiler = mingw32   #or mingw64
    
    [build_ext]
    compiler = mingw32   #or mingw64
    

    I add C:\cygwin\bin to the Windows path (at the end to minimize interference) and compile from within Windows cmd. However, I have to replace the Cygwin symlinks with the actual executables (i.e., gcc3.exe -> gcc.exe, g++3.exe -> g++.exe) since Windows cmd doesn’t understand the symlinks. It hasn’t given me a problem yet compiling Python 3 extensions, Cython (even on-demand compiling with pyximport), swig, and embedding Python.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.