Skip to content

Instantly share code, notes, and snippets.

@kjunichi
Last active February 28, 2018 08:21
Show Gist options
  • Save kjunichi/5913950 to your computer and use it in GitHub Desktop.
Save kjunichi/5913950 to your computer and use it in GitHub Desktop.
plv8を使うまで、v8をcheckoutで古いバージョンを指定することでビルド出来た。

関連記事

2013/7/10

sconsのインストールに手間取るも、何とかv8でlibv8.dylibの作成を行い、plv8のコンパイルまでできた。 plv8のMakeファイルで指定しているpg_configが/usr/bin配下のOSデフォルトの物だったので、

PATHの順番を/Application/Postgres.app配下のパスを優先させて設定。

ldでx84_64のアーキテクチャだかシンボルが見つからんとエラー

Undefined symbols for architecture x86_64:

どうやら、これ64ビット問題とかではなく、libv8のパスを指定していないからかも。。

前の出来事

Ubuntuでコンパイルできたのはじつは/usr配下に3.7系のv8がインストールされており、こちらがビルド時に参照されていた模様。

plv8をOSXでコンパイル中のエラー

g++ -Wall -O2  -I. -I. -I/usr/include/postgresql/server -I/usr/include/postgresql/internal -I../v8//include -fPIC -c -o plv8.o plv8.cc
plv8.cc: In function 'Datum common_pl_call_handler(FunctionCallInfo, Dialect)':
plv8.cc:287:52: error: could not convert 'proc->plv8_proc::cache->plv8_proc_cache::function' from 'v8::Persistent<v8::Function>' to 'v8::Handle<v8::Function>'
plv8.cc: In function 'Datum common_pl_inline_handler(FunctionCallInfo, Dialect)':
make
g++ -Wall -O2  -I. -I. -I/usr/include/postgresql/server -I/usr/include/postgresql/internal -I../v8//include -fPIC -c -o plv8.o plv8.cc
plv8.cc: In function ‘Datum common_pl_call_handler(FunctionCallInfoData*, Dialect)’:
plv8.cc:287: error: conversion from ‘v8::Persistent<v8::Function>’ to non-scalar type ‘v8::Handle<v8::Function>’ requested
plv8.cc: In function ‘Datum common_pl_inline_handler(FunctionCallInfoData*, Dialect)’:
plv8.cc:343: error: conversion from ‘v8::Persistent<v8::Context>’ to non-scalar type ‘v8::Handle<v8::Context>’ requested
plv8.cc: In function ‘Datum CallFunction(FunctionCallInfoData*, plv8_exec_env*, int, plv8_type*, plv8_type*)’:
plv8.cc:404: error: conversion from ‘v8::Persistent<v8::Context>’ to non-scalar type ‘v8::Handle<v8::Context>’ requested
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Object]’ is private
plv8.cc:432: error: within this context
plv8.cc:434: error: conversion from ‘v8::Persistent<v8::Object>’ to non-scalar type ‘v8::Handle<v8::Object>’ requested
plv8.cc: In function ‘Datum CallSRFunction(FunctionCallInfoData*, plv8_exec_env*, int, plv8_type*, plv8_type*)’:
plv8.cc:512: error: conversion from ‘v8::Persistent<v8::Context>’ to non-scalar type ‘v8::Handle<v8::Context>’ requested
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Object]’ is private
plv8.cc:527: error: within this context
plv8.cc:529: error: conversion from ‘v8::Persistent<v8::Object>’ to non-scalar type ‘v8::Handle<v8::Object>’ requested
plv8.cc: In function ‘Datum CallTrigger(FunctionCallInfoData*, plv8_exec_env*)’:
plv8.cc:575: error: conversion from ‘v8::Persistent<v8::Context>’ to non-scalar type ‘v8::Handle<v8::Context>’ requested
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Object]’ is private
plv8.cc:659: error: within this context
plv8.cc:661: error: conversion from ‘v8::Persistent<v8::Object>’ to non-scalar type ‘v8::Handle<v8::Object>’ requested
plv8.cc: In function ‘Datum common_pl_call_validator(FunctionCallInfoData*, Dialect)’:
plv8.cc:735: error: conversion from ‘v8::Persistent<v8::Function>’ to non-scalar type ‘v8::Handle<v8::Function>’ requested
../v8//include/v8.h: In function ‘plv8_exec_env* CreateExecEnv(v8::Handle<v8::Function>)’:
../v8//include/v8.h:753: error: ‘v8::Persistent<T>& v8::Persistent<T>::operator=(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:929: error: within this context
../v8//include/v8.h:751: error: ‘v8::Persistent<T>::Persistent(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:929: error: within this context
plv8.cc:930: error: no matching function for call to ‘v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)’
../v8//include/v8.h:5046: note: candidates are: v8::Context::Scope::Scope(v8::Isolate*, v8::Persistent<v8::Context>&)
../v8//include/v8.h:5042: note:                 v8::Context::Scope::Scope(v8::Handle<v8::Context>)
../v8//include/v8.h:5040: note:                 v8::Context::Scope::Scope(const v8::Context::Scope&)
plv8.cc:935: error: no matching function for call to ‘v8::Persistent<v8::ObjectTemplate>::New(v8::Local<v8::ObjectTemplate>)’
../v8//include/v8.h:5585: note: candidates are: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::ObjectTemplate]
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:936: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:938: error: within this context
plv8.cc:938: error: no matching function for call to ‘v8::Persistent<v8::Object>::New(v8::Local<v8::Object>)’
../v8//include/v8.h:5585: note: candidates are: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::Object]
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Object]’ is private
plv8.cc:940: error: within this context
plv8.cc: In function ‘char* CompileDialect(const char*, Dialect)’:
plv8.cc:950: warning: ‘New’ is deprecated (declared at ../v8//include/v8.h:4925)
../v8//include/v8.h:751: error: ‘v8::Persistent<T>::Persistent(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:950: error: within this context
../v8//include/v8.h:751: error: ‘v8::Persistent<T>::Persistent(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:950: error: within this context
plv8.cc:951: error: no matching function for call to ‘v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)’
../v8//include/v8.h:5046: note: candidates are: v8::Context::Scope::Scope(v8::Isolate*, v8::Persistent<v8::Context>&)
../v8//include/v8.h:5042: note:                 v8::Context::Scope::Scope(v8::Handle<v8::Context>)
../v8//include/v8.h:5040: note:                 v8::Context::Scope::Scope(const v8::Context::Scope&)
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Context]’ is private
plv8.cc:975: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Context]’ is private
plv8.cc:987: error: within this context
plv8.cc: In function ‘plv8_proc* Compile(Oid, FunctionCallInfoData*, bool, bool, Dialect)’:
plv8.cc:1050: error: conversion from ‘v8::Persistent<v8::Context>’ to non-scalar type ‘v8::Handle<v8::Context>’ requested
plv8.cc:1059: error: no matching function for call to ‘v8::Persistent<v8::Function>::New(v8::Local<v8::Function>)’
../v8//include/v8.h:5585: note: candidates are: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::Function]
plv8.cc: In function ‘v8::Local<v8::Function> find_js_function(Oid)’:
plv8.cc:1185: error: no matching function for call to ‘v8::Local<v8::Function>::New(v8::Persistent<v8::Function>&)’
../v8//include/v8.h:5521: note: candidates are: static v8::Local<T> v8::Local<T>::New(v8::Handle<T>) [with T = v8::Function]
../v8//include/v8.h:5534: note:                 static v8::Local<T> v8::Local<T>::New(v8::Isolate*, v8::Handle<T>) [with T = v8::Function]
../v8//include/v8.h:5540: note:                 static v8::Local<T> v8::Local<T>::New(v8::Isolate*, const v8::Persistent<T>&) [with T = v8::Function]
../v8//include/v8.h:5556: note:                 static v8::Local<T> v8::Local<T>::New(v8::Isolate*, T*) [with T = v8::Function]
../v8//include/v8.h: In function ‘v8::Persistent<v8::Context> GetGlobalContext()’:
../v8//include/v8.h:753: error: ‘v8::Persistent<T>& v8::Persistent<T>::operator=(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:1274: error: within this context
plv8.cc:1281: error: conversion from ‘v8::Persistent<v8::ObjectTemplate>’ to non-scalar type ‘v8::Handle<v8::ObjectTemplate>’ requested
plv8.cc:1284: warning: ‘New’ is deprecated (declared at ../v8//include/v8.h:4925)
../v8//include/v8.h:753: error: ‘v8::Persistent<T>& v8::Persistent<T>::operator=(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:1284: error: within this context
../v8//include/v8.h:751: error: ‘v8::Persistent<T>::Persistent(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:1284: error: within this context
../v8//include/v8.h:753: error: ‘v8::Persistent<T>& v8::Persistent<T>::operator=(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:1287: error: within this context
plv8.cc:1304: error: no matching function for call to ‘v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)’
../v8//include/v8.h:5046: note: candidates are: v8::Context::Scope::Scope(v8::Isolate*, v8::Persistent<v8::Context>&)
../v8//include/v8.h:5042: note:                 v8::Context::Scope::Scope(v8::Handle<v8::Context>)
../v8//include/v8.h:5040: note:                 v8::Context::Scope::Scope(const v8::Context::Scope&)
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::Context]’ is private
plv8.cc:1327: error: within this context
../v8//include/v8.h:751: error: ‘v8::Persistent<T>::Persistent(const v8::Persistent<T>&) [with T = v8::Context]’ is private
plv8.cc:1344: error: within this context
plv8.cc: In function ‘v8::Persistent<v8::ObjectTemplate> GetGlobalObjectTemplate()’:
plv8.cc:1356: error: no matching function for call to ‘v8::Persistent<v8::ObjectTemplate>::New(v8::Local<v8::ObjectTemplate>)’
../v8//include/v8.h:5585: note: candidates are: static T* v8::Persistent<T>::New(v8::Isolate*, T*) [with T = v8::ObjectTemplate]
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1358: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1359: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1360: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1361: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1362: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1363: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1364: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1365: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1366: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1367: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1368: error: within this context
../v8//include/v8.h:771: error: ‘T* v8::Persistent<T>::operator->() const [with T = v8::ObjectTemplate]’ is private
plv8.cc:1375: error: within this context
../v8//include/v8.h:751: error: ‘v8::Persistent<T>::Persistent(const v8::Persistent<T>&) [with T = v8::ObjectTemplate]’ is private
plv8.cc:1378: error: within this context
make: *** [plv8.o] Error 1

関連投稿

関連

アクセス解析タグ

@houmanb
Copy link

houmanb commented Jul 31, 2013

Hi, I have exactly the same problem but unfortunatly I am not able to read japanese. I've built postgres and v8 from sources successfully on OSX 10.8.4.
How did you fix this issue. I would appreciate any hint.
thanks a lot.
Houman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment