2

I am trying to build and install python 3.6.2 from source on my Raspberry Pi running Raspbian Jessie. Here's how the build process has gone:

$ ./configure --enable-optimizations --enable-ipv6  # everything seems fine
$ make -s -j$(nproc) # everything seems fine except for a few tests being skipped
$ make test  # again, a few tests are skipped
$ sudo checkinstall -D make altinstall  # FAILURE

The error is:

*snip*
running install_lib
copying build/lib.linux-armv7l-3.6/_codecs_cn.cpython-36m-arm-linux-gnueabihf.so -> /usr/local/lib/python3.6/lib-dynload
error: [Errno 2] No such file or directory
Makefile:1451: recipe for target 'sharedinstall' failed
make: *** [sharedinstall] Error 1

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

But, the file does exist, and so does the destination:

$ ls build/lib.linux-armv7l-3.6/_codecs_cn.cpython-36m-arm-linux-gnueabihf.so
build/lib.linux-armv7l-3.6/_codecs_cn.cpython-36m-arm-linux-gnueabihf.so
$ ls /usr/local/lib/python3.6
config-3.6m-arm-linux-gnueabihf  lib-dynload

Basically, wtf. I have tried poking around in the Makefile and setup.py but don't really have the time to fully grok the entire build process. What could be going on here? Should I just give up on using checkinstall? Any advice is welcome.

Scott Colby
  • 1,370
  • 12
  • 25

1 Answers1

1

It turns out that this was a checkinstall bug, of some description. I bit the bullet and just ran sudo make altinstall and everything went off without a hitch. I've looked into checkinstall a bit more and it seems to have a few...difficult bugs. I wouldn't go so far as to label it "buggy," and it works well most of the time, but sometimes it goes wrong and there doesn't seem to be much that can be done about that.

Scott Colby
  • 1,370
  • 12
  • 25
  • 1
    Did you ever sort this out? I am seeing the same problem. Works fine with regular altinstall, but fails on checkinstall. I would really like my deployment steps to be the installation of a .deb instead of compiling from scratch on every platform. – John Swensen Feb 01 '22 at 20:04
  • Unfortunately, I never did. It's unfortunate that this is still happening almost 5 years later, too :( – Scott Colby Feb 02 '22 at 21:07
  • 1
    I did end up solving it. I don't know the reason why, but if I use the --fstrans=no option, then it doesn't fail. The downside is that it does pollute my /usr/lib folder during the checkinstall process. To clean it up, after the installation was done, I did a dpkg install of the deb and a dpkg remove. Kindof cumberso, but it did the trick. – John Swensen Feb 04 '22 at 00:50