在Python2.7中,导入P4API的未定义符号

在Python2.7中,导入P4API的未定义符号,python,centos5,rhel5,p4python,Python,Centos5,Rhel5,P4python,在RHEL5(5.3)上,我安装了python27、python27-devel、setuptools、gcc44、gcc44-c++和P4PythonInstaller。所有看起来都安装得很好,没有报告错误 但是,当我打开Python2.7并尝试导入P4或P4API时,我收到以下错误: ImportError: /usr/lib64/python2.7/site-packages/P4API.so: undefined symbol: _ZNSo9_M_insertI1EERSoT_ 这看起

在RHEL5(5.3)上,我安装了python27、python27-devel、setuptools、gcc44、gcc44-c++和P4PythonInstaller。所有看起来都安装得很好,没有报告错误

但是,当我打开Python2.7并尝试导入P4或P4API时,我收到以下错误:

ImportError: /usr/lib64/python2.7/site-packages/P4API.so: undefined symbol: _ZNSo9_M_insertI1EERSoT_
这看起来像是一个破损的名称,但我不清楚原始名称可能是什么(除了“插入”),或者它可能需要什么库

我尝试过用LD_DEBUG=libs运行python,它似乎找到了它要查找的所有库

你有没有想过会出什么问题?谷歌今晚帮不了我多少忙

提前谢谢

更新:

我试图使用P4API的Linux26x86_64版本从源代码构建P4Python,但仍然收到相同的错误

更新2:

在生成的库上运行
ldd P4API.so
时,我得到以下结果:

librt.so.1=>/lib64/librt.so.1(0x00002b09f166a000)
libpython2.7.so.1.0=>/usr/lib64/libpython2.7.so.1.0(0x00002b09f1873000)
libstdc++.so.6=>/usr/lib64/libstdc++.so.6(0x00002b09f1c36000)
libm.so.6=>/lib64/libm.so.6(0x00002b09f1f37000)
libgcc_.so.1=>/lib64/libgcc_.so.1(0x00002b09f21ba000)
libpthread.so.0=>/lib64/libpthread.so.0(0x00002b09f23c8000)
libc.so.6=>/lib64/libc.so.6(0x00002b09f25e5000)
/lib64/ld-linux-x86-64.so.2(0x00002b09f10c0000)
libdl.so.2=>/lib64/libdl.so.2(0x00002b09f293d000)
libutil.so.1=>/lib64/libutil.so.1(0x00002b09f2b41000)
这是编译器的输出:

API 2012.1版 运行构建 运行build\u py 创建构建 创建build/lib.linux-x86_64-2.7 复制P4.py->build/lib.linux-x86_64-2.7 运行build_ext 构建“P4API”扩展 创建build/temp.linux-x86_64-2.7 gcc44-pthread-fno严格别名-O2-g-pipe-Wall-Wp-D_-FORTIFY_SOURCE=2-feexceptions-fstack protects-param=ssp buffer size=4-m64-mtune=generic-D_-GNU_-SOURCE-fPIC-fwrapv-I/usr/kerberos/include-I/usr/include/expa2-DNDEBUG-O2-g-pipe-Wall-Wp,-D_-FORTIFY_-SOURCE=2-feexceptions-fstack protector-param=ssp buffer size=4-m64-mtune=generic-D_-GNU-SOURCE-fPIC-fwrapv-fPIC-DID_-OS=“LINUX26X86_-64”-DID_-REL=“2012.1”-DID_-PATCH=“511074”-DID_-API=“2012.1/442152”-DID_-Y=“2012”-DID_-DID_-M=“08”-DID_D=“15”-I/home/bbbrooks/p4python_test/p4api-2012.1.442152-I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4-I/usr/include/python2.7-c p4api.cpp-o build/temp.linux-x86-2.7/p4api.o-DOS_linux-DOS_LINUX26-DOS_x86-DOS_x26; gcc44-pthread-fno严格别名-O2-g-pipe-Wall-Wp-D_-FORTIFY_SOURCE=2-feexceptions-fstack protects-param=ssp buffer size=4-m64-mtune=generic-D_-GNU_-SOURCE-fPIC-fwrapv-I/usr/kerberos/include-I/usr/include/expa2-DNDEBUG-O2-g-pipe-Wall-Wp,-D_-FORTIFY_-SOURCE=2-feexceptions-fstack protector-param=ssp buffer size=4-m64-mtune=generic-D_-GNU-SOURCE-fPIC-fwrapv-fPIC-DID_-OS=“LINUX26X86_-64”-DID_-REL=“2012.1”-DID_-PATCH=“511074”-DID_-API=“2012.1/442152”-DID_-Y=“2012”-DID_-DID_-M=“08”-DID_D=“15”-I/home/bbbrooks/p4python_test/p4api-2012.1.442152-I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4-I/usr/include/python2.7-c PythonClientAPI.cpp-o build/temp.linux-x86-2.7/PythonClientAPI.o-DOS-linux-DOS_-LINUX26-DOS Linux266-DOS gcc44-pthread-fno严格别名-O2-g-pipe-Wall-Wp-D_-FORTIFY_SOURCE=2-feexceptions-fstack protects-param=ssp buffer size=4-m64-mtune=generic-D_-GNU_-SOURCE-fPIC-fwrapv-I/usr/kerberos/include-I/usr/include/expa2-DNDEBUG-O2-g-pipe-Wall-Wp,-D_-FORTIFY_-SOURCE=2-feexceptions-fstack protector-param=ssp buffer size=4-m64-mtune=generic-D_-GNU-SOURCE-fPIC-fwrapv-fPIC-DID_-OS=“LINUX26X86_-64”-DID_-REL=“2012.1”-DID_-PATCH=“511074”-DID_-API=“2012.1/442152”-DID_-Y=“2012”-DID_-DID_-M=“08”-DID_D=“15”-I/home/bbbrooks/p4python_test/p4api-2012.1.442152-I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4-I/usr/include/python2.7-c PythonClientUser.cpp-o build/temp.linux-x86-2.7/PythonClientUser.o-DOS\u linux-DOS\u-LINUX26\u 64-DOS\linux266 gcc44-pthread-fno严格别名-O2-g-pipe-Wall-Wp-D_-FORTIFY_SOURCE=2-feexceptions-fstack protects-param=ssp buffer size=4-m64-mtune=generic-D_-GNU_-SOURCE-fPIC-fwrapv-I/usr/kerberos/include-I/usr/include/expa2-DNDEBUG-O2-g-pipe-Wall-Wp,-D_-FORTIFY_-SOURCE=2-feexceptions-fstack protector-param=ssp buffer size=4-m64-mtune=generic-D_-GNU-SOURCE-fPIC-fwrapv-fPIC-DID_-OS=“LINUX26X86_-64”-DID_-REL=“2012.1”-DID_-PATCH=“511074”-DID_-API=“2012.1/442152”-DID_-Y=“2012”-DID_-DID_-M=“08”-DID_D=“15”-I/home/bbbrooks/p4python_test/p4api-2012.1.442152-I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4-I/usr/include/python2.7-c SpecMgr.cpp-o build/temp.linux-x86-2.7/SpecMgr.o-DOS-linux-DOS-LINUX26-DOS-linux86-DOS gcc44-pthread-fno严格别名-O2-g-pipe-Wall-Wp-D_-FORTIFY_SOURCE=2-feexceptions-fstack protects-param=ssp buffer size=4-m64-mtune=generic-D_-GNU_-SOURCE-fPIC-fwrapv-I/usr/kerberos/include-I/usr/include/expa2-DNDEBUG-O2-g-pipe-Wall-Wp,-D_-FORTIFY_-SOURCE=2-feexceptions-fstack protector-param=ssp buffer size=4-m64-mtune=generic-D_-GNU-SOURCE-fPIC-fwrapv-fPIC-DID_-OS=“LINUX26X86_-64”-DID_-REL=“2012.1”-DID_-PATCH=“511074”-DID_-API=“2012.1/442152”-DID_-Y=“2012”-DID_-DID_-M=“08”-DID_D=“15”-I/home/bbbrooks/p4python_test/p4api-2012.1.442152-I/home/bbbrooks/p4python_test/p4api-2012.1.442152/include/p4-I/usr/include/python2.7-c P4Result.cpp-o build/temp.linux-x86-2.7/P4Result.o-DOS-linux-DOS-LINUX26-DOS\u linux86-DOS gcc44-pthread-fno严格别名-O2-g-pipe-Wall-Wp-D_-FORTIFY_SOURCE=2-feexceptions-fstack protector-param=ssp buffer size=4-m64-mtune=generic-D_-GNU_-SOURCE-fPIC-fwrapv-I/usr/kerberos/include-I/usr/include/expa2-DNDEBUG-O2