Skip to content

Compile error in python3lwe branch #18

Description

@blueWatermelonFri

Hi, I tried to compiler branch python3lwe, I run command as follows:

./bootstrap.sh -j 16

Error as follows:

g++ -shared -pthread -L/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/kernel -Wl,-rpath=/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/kernel sieving.o control.o bgj1_sieve.o gpu_sieve.o triple_sieve.o params.o cpuperf.o triple_sieve_mt.o ../cuda/GPUStreamGeneral.o -o libG6K.so -lpthread -L/usr/local/cuda/lib64 -Wl,-rpath=/usr/local/cuda/lib64 -lcudart -L/usr/local/cuda/lib64/stubs -Wl,-rpath=/usr/local/cuda/lib64/stubs -lcuda -lcublas -lcurand
make: Leaving directory '/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/kernel'
Compiling g6k/siever.pyx because it changed.
Compiling g6k/siever_params.pyx because it changed.
[1/2] Cythonizing g6k/siever.pyx

Error compiling Cython file:
------------------------------------------------------------
...
            if lens[i] > 0.:
                L.append((i, lens[i], vecs[i]))
        return L


    def insert_best_lift(self, scoring=(lambda index, nlen, olen, aux: True), aux=None):
                                        ^
------------------------------------------------------------

g6k/siever.pyx:1714:40: Compiler crash in ExpressionWriter


Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 182, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/CodeWriter.py", line 512, in visit_Node
    raise AssertionError("Node not handled by serializer: %r" % node)
AssertionError: Node not handled by serializer: <Cython.Compiler.ExprNodes.LambdaNode object at 0x7f718e1d20e0>
Traceback (most recent call last):
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/setup.py", line 46, in <module>
    ext_modules=cythonize(extensions, compiler_directives={'binding': True,
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: g6k/siever.pyx
/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/setup.py:4: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.core import setup
make: Entering directory '/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/kernel'
make: Nothing to be done for 'all'.
make: Leaving directory '/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/kernel'
Compiling g6k/siever.pyx because it changed.
Compiling g6k/siever_params.pyx because it changed.
[1/2] Cythonizing g6k/siever.pyx

Error compiling Cython file:
------------------------------------------------------------
...
            if lens[i] > 0.:
                L.append((i, lens[i], vecs[i]))
        return L


    def insert_best_lift(self, scoring=(lambda index, nlen, olen, aux: True), aux=None):
                                        ^
------------------------------------------------------------

g6k/siever.pyx:1714:40: Compiler crash in ExpressionWriter


Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 182, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/CodeWriter.py", line 512, in visit_Node
    raise AssertionError("Node not handled by serializer: %r" % node)
AssertionError: Node not handled by serializer: <Cython.Compiler.ExprNodes.LambdaNode object at 0x7fcfce47a140>
Traceback (most recent call last):
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/setup.py", line 46, in <module>
    ext_modules=cythonize(extensions, compiler_directives={'binding': True,
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: g6k/siever.pyx
/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/setup.py:4: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.core import setup
make: Entering directory '/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/kernel'
make: Nothing to be done for 'all'.
make: Leaving directory '/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/kernel'
Compiling g6k/siever.pyx because it changed.
Compiling g6k/siever_params.pyx because it changed.
[1/2] Cythonizing g6k/siever.pyx

Error compiling Cython file:
------------------------------------------------------------
...
            if lens[i] > 0.:
                L.append((i, lens[i], vecs[i]))
        return L


    def insert_best_lift(self, scoring=(lambda index, nlen, olen, aux: True), aux=None):
                                        ^
------------------------------------------------------------

g6k/siever.pyx:1714:40: Compiler crash in ExpressionWriter


Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 182, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/CodeWriter.py", line 512, in visit_Node
    raise AssertionError("Node not handled by serializer: %r" % node)
AssertionError: Node not handled by serializer: <Cython.Compiler.ExprNodes.LambdaNode object at 0x7f20e937a0e0>
Traceback (most recent call last):
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/setup.py", line 46, in <module>
    ext_modules=cythonize(extensions, compiler_directives={'binding': True,
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "/home/heyuanhong/project/g6k-gpu/G6K-GPU-Tensor/g6k-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: g6k/siever.pyx

Don't forget to activate environment each time:
 source ./activate
This will also add the following aliases:
alias pydoc 2>/dev/null >/dev/null && unalias pydoc || true
alias python="python3"
alias pip="python3 -m pip"

My os is ubuntu22.04, python version is 3.10.6, gcc version is 11.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions