bitnine-oss / agensgraph

AgensGraph, a transactional graph database based on PostgreSQL
http://www.agensgraph.org
Other
1.32k stars 146 forks source link

pg_12_12: with-llvm flag failed regression #562

Closed emotionbug closed 2 years ago

emotionbug commented 2 years ago

EEOP_CYPHER* Operation is not implemented in llvm_compile_expr() ( llvmjit_expr.c )

ibrarahmad commented 2 years ago

I am able to successfully compile and run the code.

./configure --prefix=/usr/local/pgsql.ag/ --with-llvm LLVM_CONFIG='/usr/bin/llvm-config' --enable-cassert --with-python --with-perl --enable-tap-tests && make -j 12

Please provide detail LLVM Version? gcc Version Last commit message.

emotionbug commented 2 years ago

must use clang to use LLVM.

ibrarahmad commented 2 years ago

I am using CLANG now and it compiled successfully.

Here is compile log

clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -fstrict-enums -fno-signed-zeros -fPIC -I. -I. -I/usr/include/python2.7 -I../../../src/include  -D_GNU_SOURCE   -c -o plpy_typeio.o plpy_typeio.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -fstrict-enums -fno-signed-zeros -fPIC -I. -I. -I/usr/include/python2.7 -I../../../src/include  -D_GNU_SOURCE   -c -o plpy_util.o plpy_util.c
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -fstrict-enums -fno-signed-zeros -fPIC -shared -o plpython2.so plpy_cursorobject.o plpy_elog.o plpy_exec.o plpy_main.o plpy_planobject.o plpy_plpymodule.o plpy_procedure.o plpy_resultobject.o plpy_spi.o plpy_subxactobject.o plpy_typeio.o plpy_util.o  -L../../../src/port -L../../../src/common   -L/usr/lib/llvm-10/lib  -Wl,--as-needed -Wl,-rpath,'/usr/lib/python2.7/config-x86_64-linux-gnu',--enable-new-dtags  -L/usr/lib/python2.

At what stage you are getting this error and what configuration parameter are you using.

Here are my configuration.

CC=clang CFLAGS="-O0 -fstrict-enums -fno-signed-zeros" ./configure --prefix=/usr/local/pgsql.ag/ --with-llvm LLVM_CONFIG='/usr/bin/llvm-config' --enable-cassert --with-python --with-perl --enable-tap-tests && make -j 12

emotionbug commented 2 years ago

Compiling is not problem. run the test.

ibrarahmad commented 2 years ago

Why did you reopen that.

emotionbug commented 2 years ago

It's just my mistake to close it. Nothing has been solved, so I won't close it. I also attach CI results for this error.

https://github.com/emotionbug/agensgraph/runs/7196760073

Below, I only added "with-llvm" option on actions in 12 Branch.

name: regression

on:
  push:
    branches: [ '*' ]
  pull_request:
    branches: [ '*' ]

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v2
      - name: Install depedencies
        run: sudo apt-get install -y llvm-7 clang-7 clang++-7
      - name: configure --prefix=/home/runner/work/agensgraph/agensgraph/pgsql
        env:
          CC: 'clang-7'
          CXX: 'clang++-7'
        run: ./configure --prefix=/home/runner/work/agensgraph/agensgraph/pgsql --with-llvm
      - name: make install
        run: make install -j$(nproc)
      - name: initdb
        run: /home/runner/work/agensgraph/agensgraph/pgsql/bin/initdb -D /home/runner/work/agensgraph/agensgraph/pgsql/data
      - name: starting database
        run: /home/runner/work/agensgraph/agensgraph/pgsql/bin/pg_ctl -D /home/runner/work/agensgraph/agensgraph/pgsql/data start
      - name: make installcheck
        run: make installcheck-parallel
ibrarahmad commented 2 years ago

You need to specify these options too, Its documented options.

CC=clang CFLAGS="-O0 -fstrict-enums -fno-signed-zeros"

emotionbug commented 2 years ago

If need this option, it's another issue, and regardless of this, regression fails.

yjy44 commented 2 years ago

@emotionbug is working on this job from now.

emotionbug commented 2 years ago

Fixed with https://github.com/bitnine-oss/agensgraph/commit/dcc609c035f89eabe7143c0e3fc8ebcf0064c35c