0

Linux Mint 20.2,Postgres 9.6

这里官方教程如何构建/安装 plv8

https://github.com/plv8/plv8/blob/r3.1alpha/docs/BUILDING.md

我安装了下一个软件包:

sudo apt install git
sudo apt install python2
sudo ln -s /usr/bin/python3 /usr/bin/python
sudo apt install g++
sudo apt install pkg-config
sudo apt install libc-dev-bin
sudo apt install libc++abi-dev
sudo apt install libc++-dev
sudo apt install libglib2.0-dev-bin
sudo apt install libtinfo5
sudo apt install ninja-build

sudo apt-get install postgresql-9.6
sudo apt-get install postgresql-server-dev-9.6

检查python版本:

python --version
Python 2.7.18

然后这个步骤:

$ wget https://github.com/plv8/plv8/archive/v3.0.0.tar.gz
$ tar -xvzf v3.0.0.tar.gz
$ cd plv8-3.0.0
$ make

但我得到错误:

________ running 'vpython build/linux/sysroot_scripts/install-sysroot.py --arch=x86' in '/home/alexeij/Downloads/plv8-3.0.0/build/v8'
Installing Debian sid i386 root image: /home/alexeij/Downloads/plv8-3.0.0/build/v8/build/linux/debian_sid_i386-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/328009b4502a9e45df905115d79582ed8cd60a0e/debian_sid_i386_sysroot.tar.xz
Failed to download https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/328009b4502a9e45df905115d79582ed8cd60a0e/debian_sid_i386_sysroot.tar.xz
Error: Command 'vpython build/linux/sysroot_scripts/install-sysroot.py --arch=x86' returned non-zero exit status 1 in /home/alexeij/Downloads/plv8-3.0.0/build/v8
Installing Debian sid i386 root image: /home/alexeij/Downloads/plv8-3.0.0/build/v8/build/linux/debian_sid_i386-sysroot
Downloading https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/328009b4502a9e45df905115d79582ed8cd60a0e/debian_sid_i386_sysroot.tar.xz
Failed to download https://commondatastorage.googleapis.com/chrome-linux-sysroot/toolchain/328009b4502a9e45df905115d79582ed8cd60a0e/debian_sid_i386_sysroot.tar.xz


Hint: You can raise verbosity (-vv) to see the output of failed commands.

Traceback (most recent call last):
  File "tools/dev/v8gen.py", line 307, in <module>
    sys.exit(gen.main())
  File "tools/dev/v8gen.py", line 301, in main
    return self._options.func()
  File "tools/dev/v8gen.py", line 169, in cmd_gen
    gn_outdir,
  File "tools/dev/v8gen.py", line 211, in _call_cmd
    stderr=subprocess.STDOUT,
  File "/usr/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-u', 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m', 'developer_default', '-b', 'x64.release', 'out.gn/x64.release']' returned non-zero exit status 1
make: *** [Makefile:82: build/v8] Error 1

检查这个:

cd build/v8
tools/mb/mb.py -vv gen -f infra/mb/mb_config.pyl -m developer_default -b x64.release out.gn/x64.release

结果:

usage: mb [-h]
          {analyze,export,gen,isolate,lookup,run,validate,gerrit-buildbucket-config,help}
          ...
mb: error: unrecognized arguments: -vv

一些信息

pg_config

结果:

BINDIR = /usr/lib/postgresql/9.6/bin
DOCDIR = /usr/share/doc/postgresql-doc-9.6
HTMLDIR = /usr/share/doc/postgresql-doc-9.6
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/9.6/server
LIBDIR = /usr/lib/x86_64-linux-gnu
PKGLIBDIR = /usr/lib/postgresql/9.6/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/9.6/man
SHAREDIR = /usr/share/postgresql/9.6
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/9.6/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=/usr/include' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=/usr/lib/x86_64-linux-gnu' '--libexecdir=/usr/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/9.6/man' '--docdir=/usr/share/doc/postgresql-doc-9.6' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/9.6' '--bindir=/usr/lib/postgresql/9.6/bin' '--libdir=/usr/lib/x86_64-linux-gnu/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-tap-tests' '--enable-debug' '--enable-dtrace' '--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' '--with-systemd' '--with-selinux' 'MKDIR_P=/bin/mkdir -p' 'TAR=/bin/tar' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' 'DPKG_VERSION=9.6.22-1.pgdg18.04+1' 'DPKG_VENDOR=Ubuntu' '--with-gssapi' '--with-ldap' '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' 'build_alias=x86_64-linux-gnu' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
CC = gcc
CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgcommon -lpgport -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm 
VERSION = PostgreSQL 9.6.22
4

0 回答 0