Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed when USE_LIB64=ON #339

Open
GeorgeDonald opened this issue Aug 8, 2023 · 1 comment
Open

Failed when USE_LIB64=ON #339

GeorgeDonald opened this issue Aug 8, 2023 · 1 comment
Labels
Type: Bug Something's not working correctly.

Comments

@GeorgeDonald
Copy link

GeorgeDonald commented Aug 8, 2023

I got the following errors if I use -DUSE_LIB64=ON for the first time:

[100%] Relocate _sysconfigdata__linux2_.py and update pybuilddir.txt
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = '/home/gdong/python/build/bin/python'
  isolated = 0
  environment = 0
  user site = 1
  import site = 0
  sys._base_executable = '/home/gdong/python/build/bin/python'
  sys.base_prefix = '/home/gdong/python/install'
  sys.base_exec_prefix = '/home/gdong/python/install'
  sys.platlibdir = 'lib'
  sys.executable = '/home/gdong/python/build/bin/python'
  sys.prefix = '/home/gdong/python/install'
  sys.exec_prefix = '/home/gdong/python/install'
  sys.path = [
    '/home/gdong/python/install/lib/python39.zip',
    '/home/gdong/python/install/lib/python3.9',
    '/home/gdong/python/install/lib/python3.9/lib-dynload',
    '/home/gdong/python/install/lib/python3.9/plat-linux2',
    '/home/gdong/python/install/lib/python3.9/lib-tk',
    '/home/gdong/python/install/lib/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007f222dc73740 (most recent call first):
<no Python frame>
make[2]: *** [bin/pybuilddir.txt] Error 1
make[1]: *** [CMakeBuild/python/CMakeFiles/update_sysconfig.dir/all] Error 2
make: *** [all] Error 2

It seems like it still set sys.paths to lib instead of lib64.

This could be resolved by setting -DUSE_LIB64=OFF first to make it and then set it to ON and rebuild it.

@jcfr
Copy link
Contributor

jcfr commented Sep 14, 2023

Thanks for the report 🙏

I was able to reproduce on Ubuntu 20.04 doing:

cmake \
  -DUSE_LIB64:BOOL=ON \
  -S python-cmake-buildsystem \
  -B python-cmake-buildsystem-build-test

cmake \
 --build python-cmake-buildsystem-build-test \
 --parallel 8

Is it something you could help address ?

@jcfr jcfr added the Type: Bug Something's not working correctly. label Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something's not working correctly.
Development

No branches or pull requests

2 participants