Jump to content


pip install p4python 2015.2.1348262 does not compile with new 2017.1 p4api

pip p4python p4api

  • Please log in to reply
1 reply to this topic

#1 dritter29

dritter29

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 17 May 2017 - 11:22 PM

The new 2017.1 p4api that was release today has caused a compilation failure in the p4python we are using.

We are using Python 3.5.1 on RH 6 wit the following pip command:

pip install p4python==2015.2.1348262

We then see this compilation failure:


	g++ -pthread -shared build/temp.linux-x86_64-3.5/P4API.o build/temp.linux-x86_64-3.5/PythonClientAPI.o build/temp.linux-x86_64-3.5/PythonClientUser.o build/temp.linux-x86_64-3.5/SpecMgr.o build/temp.linux-x86_64-3.5/P4Result.o build/temp.linux-x86_64-3.5/PythonMergeData.o build/temp.linux-x86_64-3.5/P4MapMaker.o build/temp.linux-x86_64-3.5/PythonSpecData.o build/temp.linux-x86_64-3.5/PythonMessage.o build/temp.linux-x86_64-3.5/PythonActionMergeData.o build/temp.linux-x86_64-3.5/PythonClientProgress.o build/temp.linux-x86_64-3.5/P4PythonDebug.o -L/nfs/homes/ritter/tmp_python/p4api-2017.1.1511680 -L/nfs/homes/ritter/tmp_python/p4api-2017.1.1511680/lib -lclient -lrpc -lsupp -lp4sslstub -lrt -o build/lib.linux-x86_64-3.5/P4API.cpython-35m-x86_64-linux-gnu.so
	/usr/bin/ld: cannot find -lp4sslstub
	collect2: ld returned 1 exit status
	*******************************************
	** Building P4Python without SSL support **
	*******************************************
	error: command 'g++' failed with exit status 1

Prior to p4api 2017.1 being released our p4python lib compiled correctly with the 2016.2 p4api that preceeded it.

I have noted that the current latest version of p4python (appears to be 2016.2) does compile successfully with 2017 p4api.

Is this a known issue?  Will it be addressed?  I don't know if I can move off the older p4python version at this time.

Thank you for your help

#2 P4Pascal

P4Pascal

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 22 May 2017 - 03:26 PM

Clients using a 2017.1 P4Api must be built with SSL support. Therefore, you need to install a SSL library like the openssl_devel one. If the P4Python setup.py cannot find this library, you will have to specify its path:

pip install --install-option="--ssl" --install-option="/usr/lib" p4python==2015.2.1348262
(replace /usr/lib with the path of your openssl-devel library)

Note that when the --apidir variable is not used when calling the P4Python setup.py (this is the case for pip), the latest P4api will be downloaded. The only way to use an older P4Api with pip is to download the P4Api 2015.2 first:

1) cd /tmp
2) wget http://ftp.perforce....86_64/p4api.tgz
3) tar xzf p4api.tgz
4) pip install --install-option="--apidir" --install-option="/tmp/p4api-2015.2.1500215" p4python==2015.2.1348262

Pascal





Also tagged with one or more of these keywords: pip, p4python, p4api

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users