[PATCH] D67583: Fix swig python package path

Hal Gentz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 13:47:38 PDT 2019


ZeGentzy added a comment.

In D67583#1676531 <https://reviews.llvm.org/D67583#1676531>, @labath wrote:

> I could be off mark here, but I do recall some people trying to get this code to work in environments where python and lldb(llvm) are configured with different libdirs (so LLVM_LIBDIR_SUFFIX in llvm, and `configure --prefix=X` in python). Is that the case you're running into here?


I think not. I'm cross compiling llvm, getting it to build a 32-bit llvm for my 64-bit host, so I can install it along side my 64-bit llvm and use it with my 32-bit mesa.

I'm building two pythons, python2s, llvms and mesas, one for 32-bits and one for 64-bits.

My 32-bit python2, the one in use by llvm for it's 32-bit builds, was configured with the following options:

  --prefix=/usr 
  --enable-shared
  --with-threads
  --enable-optimizations
  --with-lto
  --enable-ipv6
  --with-system-expat
  --with-dbmliborder=gdbm:ndbm
  --with-system-ffi
  --without-ensurepip
  --libdir=/usr/lib32
  --libexecdir=/usr/lib32
  --includedir="/usr/lib32/python${_pybasever}/include"
  --exec_prefix="/usr/lib32/python${_pybasever}/"
  --bindir=/usr/bin
  --sbindir=/usr/bin
  --with-suffix='-32'

Python:

  --prefix=/usr 
  --enable-shared
  --with-threads
  --with-computed-gotos
  --enable-optimizations
  --with-lto
  --enable-ipv6
  --with-system-expat
  --with-dbmliborder=gdbm:ndbm
  --with-system-ffi
  --with-system-libmpdec
  --enable-loadable-sqlite-extensions
  --without-ensurepip
  --libdir=/usr/lib32
  --libexecdir=/usr/lib32
  --includedir=/usr/lib32/python${_pybasever}m/include
  --exec_prefix=/usr/lib32/python${_pybasever}/
  --bindir=/usr/bin
  --sbindir=/usr/bin
  --with-suffix='-32'

This is done so my 32-bit python stuff does not conflict with the 64-bit python stuff.

-------

Actually, thinking about it, I should have probably run your scripts with the 32-bit pythons, as those are what llvm uses:

  [root at GENTZ-PC-NEW2 scripts]# python a.py
  (True, '/src/out/./lib/python3.7/site-packages/lldb', '')
  [root at GENTZ-PC-NEW2 scripts]# python-32 a.py
  (True, '/src/out/./lib32/python3.7/site-packages/lldb', '')
  [root at GENTZ-PC-NEW2 scripts]# python2-32 a.py
  (True, '/src/out/./lib32/python2.7/site-packages/lldb', '')
  [root at GENTZ-PC-NEW2 scripts]# python2 a.py
  (True, '/src/out/./lib/python2.7/site-packages/lldb', '')
  [root at GENTZ-PC-NEW2 scripts]# file /usr/lib[0-9]*/python*/ 
  /usr/lib32/python2.7/:  directory
  /usr/lib32/python3.7/:  directory
  /usr/lib32/python3.7m/: directory
  /usr/lib64/python2.7/:  directory
  /usr/lib64/python3.7/:  directory


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67583/new/

https://reviews.llvm.org/D67583





More information about the llvm-commits mailing list