nopnop2002 / webioOP

The defective clone of webiopi
2 stars 2 forks source link

Doesn't work without buster #5

Open nopnop2002 opened 2 years ago

nopnop2002 commented 2 years ago

It works correctly with buster, but bullseye don't work.

$ python3 --version
Python 3.7.3

$ python3 setup.py build
running build
running build_ext

$ sudo python3 setup.py install
running install
running build
running build_ext
running install_lib
copying build/lib.linux-aarch64-3.7/gpio.cpython-37m-aarch64-linux-gnu.so -> /usr/local/lib/python3.7/dist-packages
running install_egg_info
Removing /usr/local/lib/python3.7/dist-packages/GpioMethod-1.0.egg-info
Writing /usr/local/lib/python3.7/dist-packages/GpioMethod-1.0.egg-info

$ sudo python3 ./gpio_test.py
pin=0 physPinToGpio=-1
$ python3 --version
Python 3.9.2

$ python3 setup.py build
running build
running build_ext
building 'gpio' extension
arm-linux-gnueabihf-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c gpiomodule.c -o build/temp.linux-armv7l-3.9/gpiomodule.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-z,relro -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-jS0VHk/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.9/gpiomodule.o -lcrypt -lwiringPi -o build/lib.linux-armv7l-3.9/gpio.cpython-39-arm-linux-gnueabihf.so

$ sudo python3 setup.py install
running install
running build
running build_ext
running install_lib
copying build/lib.linux-armv7l-3.9/gpio.cpython-39-arm-linux-gnueabihf.so -> /usr/local/lib/python3.9/dist-packages
running install_egg_info
Removing /usr/local/lib/python3.9/dist-packages/GpioMethod-1.2.egg-info
Writing /usr/local/lib/python3.9/dist-packages/GpioMethod-1.2.egg-info

$ sudo python3 ./gpio_test.py
Traceback (most recent call last):
  File "/home/orangepi/webioOP/./gpio_test.py", line 2, in <module>
    import gpio
ImportError: /usr/local/lib/libwiringPi.so: undefined symbol: crypt

I don't know how to avoid it.

nopnop2002 commented 2 years ago

I found that libcrypt.so.1 library is missing.

It seems that it was a depreciated library in the first place, and it seems that it was deleted because it became old.

Can anyone please tell me the solution?

buster(work)

There is libcrypt.so.1.

$ readelf -d  /usr/local/lib/libwiringPi.so

Dynamic section at offset 0x13d48 contains 29 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libcrypt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libwiringPi.so]
 0x000000000000000c (INIT)               0x4678
 0x000000000000000d (FINI)               0xe668
 0x0000000000000019 (INIT_ARRAY)         0x23d38
 0x000000000000001b (INIT_ARRAYSZ)       8 (bytes)
 0x000000000000001a (FINI_ARRAY)         0x23d40
 0x000000000000001c (FINI_ARRAYSZ)       8 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x1f0
 0x0000000000000005 (STRTAB)             0x1e70
 0x0000000000000006 (SYMTAB)             0x730
 0x000000000000000a (STRSZ)              3180 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000003 (PLTGOT)             0x23fe8
 0x0000000000000002 (PLTRELSZ)           3936 (bytes)
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000017 (JMPREL)             0x3718
 0x0000000000000007 (RELA)               0x2d70
 0x0000000000000008 (RELASZ)             2472 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffffe (VERNEED)            0x2cd0
 0x000000006fffffff (VERNEEDNUM)         5
 0x000000006ffffff0 (VERSYM)             0x2adc
 0x000000006ffffff9 (RELACOUNT)          86
 0x0000000000000000 (NULL)               0x0

bullseye(DONT work)

There isn't libcrypt.so.1.

$ readelf -d  /usr/local/lib/libwiringPi.so

Dynamic section at offset 0xbf18 contains 25 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000e (SONAME)                     Library soname: [libwiringPi.so]
 0x0000000c (INIT)                       0x2cf8
 0x0000000d (FINI)                       0x9db4
 0x00000019 (INIT_ARRAY)                 0x1bf10
 0x0000001b (INIT_ARRAYSZ)               4 (bytes)
 0x0000001a (FINI_ARRAY)                 0x1bf14
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x6ffffef5 (GNU_HASH)                   0x118
 0x00000005 (STRTAB)                     0x15f8
 0x00000006 (SYMTAB)                     0x658
 0x0000000a (STRSZ)                      3161 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000003 (PLTGOT)                     0x1c000
 0x00000002 (PLTRELSZ)                   1328 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x27c8
 0x00000011 (REL)                        0x2488
 0x00000012 (RELSZ)                      832 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0x2448
 0x6fffffff (VERNEEDNUM)                 1
 0x6ffffff0 (VERSYM)                     0x2252
 0x6ffffffa (RELCOUNT)                   87
 0x00000000 (NULL)                       0x0

focal(DONT work)

There isn't libcrypt.so.1.

$ readelf -d  /usr/local/lib/libwiringPi.so

Dynamic section at offset 0xcf10 contains 26 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [ld-linux-armhf.so.3]
 0x0000000e (SONAME)                     Library soname: [libwiringPi.so]
 0x0000000c (INIT)                       0x2da0
 0x0000000d (FINI)                       0xb2fc
 0x00000019 (INIT_ARRAY)                 0x1cf08
 0x0000001b (INIT_ARRAYSZ)               4 (bytes)
 0x0000001a (FINI_ARRAY)                 0x1cf0c
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x6ffffef5 (GNU_HASH)                   0x118
 0x00000005 (STRTAB)                     0x1618
 0x00000006 (SYMTAB)                     0x658
 0x0000000a (STRSZ)                      3247 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000003 (PLTGOT)                     0x1d000
 0x00000002 (PLTRELSZ)                   1336 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x2868
 0x00000011 (REL)                        0x2520
 0x00000012 (RELSZ)                      840 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0x24c0
 0x6fffffff (VERNEEDNUM)                 2
 0x6ffffff0 (VERSYM)                     0x22c8
 0x6ffffffa (RELCOUNT)                   87
 0x00000000 (NULL)                       0x0

hirsute(DONT work)

There isn't libcrypt.so.1.

$ readelf -d  /usr/local/lib/libwiringPi.so

Dynamic section at offset 0xcf10 contains 26 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x00000001 (NEEDED)                     Shared library: [ld-linux-armhf.so.3]
 0x0000000e (SONAME)                     Library soname: [libwiringPi.so]
 0x0000000c (INIT)                       0x2da0
 0x0000000d (FINI)                       0xb424
 0x00000019 (INIT_ARRAY)                 0x1cf08
 0x0000001b (INIT_ARRAYSZ)               4 (bytes)
 0x0000001a (FINI_ARRAY)                 0x1cf0c
 0x0000001c (FINI_ARRAYSZ)               4 (bytes)
 0x6ffffef5 (GNU_HASH)                   0x118
 0x00000005 (STRTAB)                     0x1618
 0x00000006 (SYMTAB)                     0x658
 0x0000000a (STRSZ)                      3247 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000003 (PLTGOT)                     0x1d000
 0x00000002 (PLTRELSZ)                   1336 (bytes)
 0x00000014 (PLTREL)                     REL
 0x00000017 (JMPREL)                     0x2868
 0x00000011 (REL)                        0x2520
 0x00000012 (RELSZ)                      840 (bytes)
 0x00000013 (RELENT)                     8 (bytes)
 0x6ffffffe (VERNEED)                    0x24c0
 0x6fffffff (VERNEEDNUM)                 2
 0x6ffffff0 (VERSYM)                     0x22c8
 0x6ffffffa (RELCOUNT)                   87
 0x00000000 (NULL)                       0x0