1This file describes some problems that can occur with the cado-nfs.py 2script in relation to various distributions' Python installations. 3 4 51. Python 3 6 7Python 3, version 3.3 or greater, is required for cado-nfs.py. If you 8do not wish to use cado-nfs.py, maybe because you plan to run all 9commands by hand, you can disable the Python check in CMake by setting 10NO_PYTHON_CHECK to any non-empty string in local.sh. See local.sh.example 11for a template. 12 13Some operating systems don't have a Python 3 interpreter installed by 14default. The safest bet is to install a distribution-supplied package 15for Python 3. If no such package is available, you can download the 16Python source code, compile and and install it by yourself. For a good 17introduction to installing Python from source, see 18https://www.digitalocean.com/community/articles/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4 19 20 212. Sqlite 3 22 23The Python cado-nfs.py script requires sqlite3. Unfortunately, not all 24distributions install the Python sqlite3 module by default. 25 26In fact, two things are required: the binary sqlite3 library, and the Python 27module called "sqlite3" which provides a Python interface to the sqlite3 28library. 29 30The binary sqlite3 library is installed by default on most systems, but it 31is worthwhile to check that it is. Use your distribution's package manager, 32and look for a package called "sqlite", "sqlite3", or "libsqlite3", which 33should contain a file "libsqlite3.so.*" 34 35The Python sqlite3 module unfortunately is not installed by default by some 36distributions, known culprits include Gentoo. 37 38Gentoo: 39For Gentoo, the Python 3 package by default does not include the sqlite3 40module. This link to a forum post briefly describes the situation: 41<http://forums.gentoo.org/viewtopic-t-876737-start-0.html> 42The sqlite3 module can be included in the Python installation by adding 43the sqlite USE flag to /etc/portage/make.conf as shown in this example: 44 45# These are the USE flags that were used in addition to what is provided by the 46# profile used for building. 47USE="bindist mmx sse sse2 sqlite" 48 49and then running 50emerge --deep --newuse world 51 52 53If you compile Python 3 yourself from source code, be aware that the sqlite3 54development package with the header files for the sqlite3 library must be 55installed on the system; without them, the Python 3 build will seem to 56succeed but will not include the sqlite3 interface. When compiling Python 3, 57be sure that the "make" output does NOT include a warning of the form: 58 59The necessary bits to build these optional modules were not found: 60_sqlite3 61 62 633. SSL 64 65The workunit server and clients use SSL for communication to prevent an 66attacker on the same network from injecting text into workunits which could 67be used to execute arbitrary commands on the client machines. Generating a 68server certificate requires that OpenSSL is installed on the computer 69running the server. 70 714. MySQL 72 73If you wish to use MySQL you first need to install the Python MySQL connector library available at 74https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-py3_2.1.3-1ubuntu14.04_all.deb 75You then pass the -mysql flag to ./cado-nfs.py 76