Re: [PATCH 0/11] renaming argv_array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 12.08.20 um 19:08 schrieb Jeff King:
> Yeah, I've had various issues with the packaging. For a long time they
> had 1.0.7 in experimental, but with no python support. I wonder if it's
> worth starting to use python scriptlets in our coccinelle rules, as
> described in 4d168e742a (coccinelle: use <...> for function exclusion,
> 2018-08-28). They're faster and IMHO easier to understand.

The idea to use Python as a faster alternative to anything makes me
a bit uneasy.  That can't be right. ;-)

> Of course I tried it out and got some inscrutable errors:
>
>   SPATCH contrib/coccinelle/object_id.cocci
>   init_defs_builtins: /usr/bin/../lib/coccinelle/standard.h
>   Python path configuration:
>     PYTHONHOME = '/lib/x86_64-linux-gnu/..'

This looks bogus.  Can you try to unset this environment variable?
Or set it to "/usr"?

>     PYTHONPATH = '/usr/bin/../lib/coccinelle/python'
>     program name = 'python3'
>     isolated = 0
>     environment = 1
>     user site = 1
>     import site = 1
>     sys._base_executable = '/usr/bin/python3'
>     sys.base_prefix = '/lib/x86_64-linux-gnu/..'
>     sys.base_exec_prefix = '/lib/x86_64-linux-gnu/..'
>     sys.executable = '/usr/bin/python3'
>     sys.prefix = '/lib/x86_64-linux-gnu/..'
>     sys.exec_prefix = '/lib/x86_64-linux-gnu/..'
>     sys.path = [
>       '/usr/bin/../lib/coccinelle/python',
>       '/lib/x86_64-linux-gnu/../lib/python38.zip',
>       '/lib/x86_64-linux-gnu/../lib/python3.8',
>       '/lib/x86_64-linux-gnu/../lib/python3.8/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'

I got this instead:

-- snip --
init_defs_builtins: /usr/bin/../lib/coccinelle/standard.h
Py.find_library: unable to find the Python library [libpython3.8m.so returned Library not found] [/usr/bin/../lib/libpython3.8m.so returned Library not found] [libpython3.8.so returned Library not found] [/usr/bin/../lib/libpython3.8.so returned Library not found]
-- snap --

Then I did "sudo ln -s libpython3.8.so.1.0 libpython3.8.so" in
/usr/lib/x86_64-linux-gnu, and now it seems to be happy.

René




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux