Closed lducas closed 3 years ago
Looks like configure: error: source directory already configured; run "make distclean" there first
is the root cause of things failing.
I'm not sure of where is "there"...
For context: I'm just running bootstrap.sh
on fresh completely fresh copy
of the repo...
Running plain pip3 install --upgrade pip
I get a warning pointing to:
https://github.com/pypa/pip/issues/9617
No clue if this can be the source of the issue.
Have you tried pip install --upgrade Cython
(source: https://github.com/fplll/fpylll/issues/96 ?)
That is, change $PIP install Cython
to $PIP install -U Cython
in bootstrap.sh
I just did. No luck.
Another thing to try:
g6k-env
git clone https://github.com/sagemath/cysignals
cd cysignals
python3 setup.py build
python3 setup.py install
That is, try to see what happens if you install cysignals by hand.
Same error it seems:
(g6k-env) [13:58:24] ducas@imobill:~/code/g6k/cysignals
> python3 setup.py build
running build
running build_py
running configure
autoconf
autoheader
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
configure: error: source directory already configured; run "make distclean" there first
Traceback (most recent call last):
File "setup.py", line 193, in <module>
setup(
File "/home/ducas/code/g6k/g6k-env/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 172, in run
self.run_command('configure')
File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 142, in run
subprocess.check_call(['sh', 'configure'] + self.configure_flags)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sh', 'configure']' returned non-zero exit status 1.
What happens if you call make distclean
and then try again?
No effect. I installed a fresh ubuntu 21.04, and still runs into the same issue.
I can't reproduce it. I tried Ubuntu 21.04 first, but that doesn't run inside Docker because of some bug, so I tried 20.04 instead:
apt update
apt upgrade -y
apt install -y python3 python3-dev git build-essential python3-setuptools python3-pip automake autoconf libtool
git clone https://github.com/sagemath/cysignals/
cd cysignals/
python3 setup.py build
This works for me.
I can confirm it works on a freshly installed Ubuntu 21.04 Desktop version with the following commands:
sudo apt-get install build-essential autoconf automake libtool pkg-config git
sudo apt-get install libmpfr-dev libgmp-dev python3 python3-dev python3-pip python3-setuptools
python3 -m pip install virtualenv
git clone https://github.com/fplll/g6k
cd g6k
PYTHON=python3 ./bootstrap.sh
Ok, thanks for these useful information. That allowed me to narrow it down: the only thing that survived my re-install was the home folder, including my .bashrc
. Removing
alias python=python3
alias pip=pip3
from it solved the issue.
(Feel free to keep commenting, in particular pointing out at why making those aliases was a terrible idea.)
I'm having installation issues again. I tried using the
--no-cache-dir
option forpip
, but that was unhelpful :/