clkao / plv8js-migrated

Automatically exported from code.google.com/p/plv8js
Other
0 stars 0 forks source link

can't load plv8, undefined symbol #79

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build V8
2. Build PLV8js
3. create extension in Postgres

What is the expected output? What do you see instead?
Should successfully create extension. Instead I get:
ERROR:  could not load library "/usr/local/pgsql/lib/plv8.so": 
/usr/local/pgsql/lib/plv8.so: undefined symbol: 
_ZN2v87Context3NewEPNS_22ExtensionConfigurationENS_6HandleINS_14ObjectTemplateEE
ENS3_INS_5ValueEEE

What version of the product are you using? On what operating system?
postgres: 9.3rc1
plv8: from the repo
v8: from their subversion
ubuntu: 13.04 amd64

Not sure  if this will, but here is a ansible playbook of my install process:
https://gist.github.com/blissdev/6326904

Original issue reported on code.google.com by bliss...@gmail.com on 24 Aug 2013 at 8:32

GoogleCodeExporter commented 9 years ago
Using v8 3.16 seems to have fixed it.

Original comment by bliss...@gmail.com on 24 Aug 2013 at 10:19

GoogleCodeExporter commented 9 years ago
I could make it work with v8 3.18.

Original comment by sumar...@gmail.com on 21 Sep 2013 at 1:35

GoogleCodeExporter commented 9 years ago
Yes, I can confirm plv8 1.4.1 will build on pg 9.3 using v8 3.18.x

Using latest stable (v8 3.22) I got the following error:

g++ -Wall -O2 -DV8_USE_UNSAFE_HANDLES  -I. -I. 
-I/usr/local/pgsql-9.3.0/include/server 
-I/usr/local/pgsql-9.3.0/include/internal -I../v8//include -fPIC -c -o plv8.o 
plv8.cc
In file included from plv8.cc:8:0:
plv8.h:245:51: error: ‘Arguments’ in namespace ‘v8’ does not name a type
plv8.h:245:66: error: ISO C++ forbids declaration of ‘args’ with no type
plv8.cc: In function ‘Datum common_pl_call_handler(FunctionCallInfoData*, 
Dialect)’:
plv8.cc:281:15: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:287:52: error: conversion from ‘v8::Persistent<v8::Function, 
v8::NonCopyablePersistentTraits<v8::Function> >’ to non-scalar type 
‘v8::Handle<v8::Function>’ requested
plv8.cc: In function ‘Datum common_pl_inline_handler(FunctionCallInfoData*, 
Dialect)’:
plv8.cc:340:17: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:343:53: 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:35: error: conversion from ‘v8::Persistent<v8::Context>’ to 
non-scalar type ‘v8::Handle<v8::Context>’ requested
plv8.cc:432:35: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::Object>’
plv8.cc:434:37: 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:35: error: conversion from ‘v8::Persistent<v8::Context>’ to 
non-scalar type ‘v8::Handle<v8::Context>’ requested
plv8.cc:527:35: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::Object>’
plv8.cc:529:63: 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:35: error: conversion from ‘v8::Persistent<v8::Context>’ to 
non-scalar type ‘v8::Handle<v8::Context>’ requested
plv8.cc:659:35: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::Object>’
plv8.cc:661:46: 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:45: error: conversion from ‘v8::Persistent<v8::Function, 
v8::NonCopyablePersistentTraits<v8::Function> >’ to non-scalar type 
‘v8::Handle<v8::Function>’ requested
plv8.cc: In function ‘plv8_exec_env* 
CreateExecEnv(v8::Handle<v8::Function>)’:
plv8.cc:917:16: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:930:37: error: no matching function for call to 
‘v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)’
../v8//include/v8.h:5071:15: note: candidates are: 
v8::Context::Scope::Scope(v8::Isolate*, v8::Persistent<v8::Context>&)
../v8//include/v8.h:5067:24: note:                 
v8::Context::Scope::Scope(v8::Handle<v8::Context>)
../v8//include/v8.h:5065:15: note:                 
v8::Context::Scope::Scope(const v8::Context::Scope&)
plv8.cc:935:69: error: no matching function for call to 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> 
>::New(v8::Local<v8::ObjectTemplate>)’
../v8//include/v8.h:5602:4: note: candidate is: static T* v8::Persistent<T, 
M>::New(v8::Isolate*, T*) [with T = v8::ObjectTemplate, M = 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate>]
plv8.cc:936:13: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:938:49: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:940:12: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::Object>’
plv8.cc: In function ‘char* CompileDialect(const char*, Dialect)’:
plv8.cc:949:15: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:950:81: error: no matching function for call to 
‘v8::Context::New(v8::ExtensionConfiguration*)’
../v8//include/v8.h:4950:25: note: candidate is: static v8::Local<v8::Context> 
v8::Context::New(v8::Isolate*, v8::ExtensionConfiguration*, 
v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Value>)
plv8.cc:951:38: error: no matching function for call to 
‘v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)’
../v8//include/v8.h:5071:15: note: candidates are: 
v8::Context::Scope::Scope(v8::Isolate*, v8::Persistent<v8::Context>&)
../v8//include/v8.h:5067:24: note:                 
v8::Context::Scope::Scope(v8::Handle<v8::Context>)
../v8//include/v8.h:5065:15: note:                 
v8::Context::Scope::Scope(const v8::Context::Scope&)
plv8.cc:975:13: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::Context>’
plv8.cc:977:16: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:987:54: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::Context>’
plv8.cc: In function ‘plv8_proc* Compile(Oid, FunctionCallInfoData*, bool, 
bool, Dialect)’:
plv8.cc:1049:16: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:1050:53: error: conversion from ‘v8::Persistent<v8::Context>’ to 
non-scalar type ‘v8::Handle<v8::Context>’ requested
plv8.cc:1059:15: error: no matching function for call to 
‘v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> 
>::New(v8::Local<v8::Function>)’
../v8//include/v8.h:5602:4: note: candidate is: static T* v8::Persistent<T, 
M>::New(v8::Isolate*, T*) [with T = v8::Function, M = 
v8::NonCopyablePersistentTraits<v8::Function>]
plv8.cc: In function ‘v8::Local<v8::Function> 
CompileFunction(v8::Handle<v8::Context>, const char*, int, const char**, const 
char*, bool, bool, Dialect)’:
plv8.cc:1076:15: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc: In function ‘v8::Local<v8::Function> find_js_function(Oid)’:
plv8.cc:1185:52: error: no matching function for call to 
‘v8::Local<v8::Function>::New(v8::Persistent<v8::Function, 
v8::NonCopyablePersistentTraits<v8::Function> >&)’
../v8//include/v8.h:5544:10: note: candidates are: static v8::Local<T> 
v8::Local<T>::New(v8::Handle<T>) [with T = v8::Function]
../v8//include/v8.h:5557:10: note:                 static v8::Local<T> 
v8::Local<T>::New(v8::Isolate*, v8::Handle<T>) [with T = v8::Function]
../v8//include/v8.h:5578:10: note:                 static v8::Local<T> 
v8::Local<T>::New(v8::Isolate*, T*) [with T = v8::Function]
plv8.cc: In function ‘v8::Persistent<v8::Context> GetGlobalContext()’:
plv8.cc:1280:18: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:1281:59: error: conversion from ‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’ to non-scalar type 
‘v8::Handle<v8::ObjectTemplate>’ requested
plv8.cc:1284:45: error: no matching function for call to 
‘v8::Context::New(NULL, v8::Handle<v8::ObjectTemplate>&)’
../v8//include/v8.h:4950:25: note: candidate is: static v8::Local<v8::Context> 
v8::Context::New(v8::Isolate*, v8::ExtensionConfiguration*, 
v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Value>)
plv8.cc:1303:18: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:1304:48: error: no matching function for call to 
‘v8::Context::Scope::Scope(v8::Persistent<v8::Context>&)’
../v8//include/v8.h:5071:15: note: candidates are: 
v8::Context::Scope::Scope(v8::Isolate*, v8::Persistent<v8::Context>&)
../v8//include/v8.h:5067:24: note:                 
v8::Context::Scope::Scope(v8::Handle<v8::Context>)
../v8//include/v8.h:5065:15: note:                 
v8::Context::Scope::Scope(const v8::Context::Scope&)
plv8.cc:1327:33: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::Context>’
plv8.cc: In function ‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> > 
GetGlobalObjectTemplate()’:
plv8.cc:1354:18: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
plv8.cc:1356:65: error: no matching function for call to 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> 
>::New(v8::Local<v8::ObjectTemplate>)’
../v8//include/v8.h:5602:4: note: candidate is: static T* v8::Persistent<T, 
M>::New(v8::Isolate*, T*) [with T = v8::ObjectTemplate, M = 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate>]
plv8.cc:1358:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1359:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1360:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1361:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1362:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1363:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1364:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1365:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1366:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1367:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1368:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc:1375:9: error: base operand of ‘->’ has non-pointer type 
‘v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >’
plv8.cc: In constructor ‘js_error::js_error(v8::TryCatch&)’:
plv8.cc:1577:16: error: no matching function for call to 
‘v8::HandleScope::HandleScope()’
../v8//include/v8.h:799:3: note: candidates are: 
v8::HandleScope::HandleScope(const v8::HandleScope&)
../v8//include/v8.h:772:3: note:                 
v8::HandleScope::HandleScope(v8::Isolate*)
In file included from plv8.h:12:0,
                 from plv8.cc:8:
../v8//include/v8.h: In static member function ‘static void 
v8::NonCopyablePersistentTraits<T>::Uncompilable() [with O = v8::Object, T = 
v8::Context]’:
../v8//include/v8.h:473:5:   instantiated from ‘static void 
v8::NonCopyablePersistentTraits<T>::Copy(const v8::Persistent<S, M>&, 
v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent*) [with S = 
v8::Context, M = v8::NonCopyablePersistentTraits<v8::Context>, T = v8::Context, 
v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent = 
v8::Persistent<v8::Context>]’
../v8//include/v8.h:5619:3:   instantiated from ‘void v8::Persistent<T, 
M>::Copy(const v8::Persistent<S, M>&) [with S = v8::Context, M2 = 
v8::NonCopyablePersistentTraits<v8::Context>, T = v8::Context, M = 
v8::NonCopyablePersistentTraits<v8::Context>]’
../v8//include/v8.h:552:5:   instantiated from ‘v8::Persistent<T, M>& 
v8::Persistent<T, M>::operator=(const v8::Persistent<T, M>&) [with T = 
v8::Context, M = v8::NonCopyablePersistentTraits<v8::Context>, 
v8::Persistent<T, M> = v8::Persistent<v8::Context>]’
plv8.cc:929:35:   instantiated from here
../v8//include/v8.h:477:5: error: cannot convert ‘v8::Primitive*’ to 
‘v8::Object* volatile’ in assignment
../v8//include/v8.h: In static member function ‘static void 
v8::NonCopyablePersistentTraits<T>::Uncompilable() [with O = v8::Object, T = 
v8::ObjectTemplate]’:
../v8//include/v8.h:473:5:   instantiated from ‘static void 
v8::NonCopyablePersistentTraits<T>::Copy(const v8::Persistent<S, M>&, 
v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent*) [with S = 
v8::ObjectTemplate, M = v8::NonCopyablePersistentTraits<v8::ObjectTemplate>, T 
= v8::ObjectTemplate, v8::NonCopyablePersistentTraits<T>::NonCopyablePersistent 
= v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >]’
../v8//include/v8.h:5619:3:   instantiated from ‘void v8::Persistent<T, 
M>::Copy(const v8::Persistent<S, M>&) [with S = v8::ObjectTemplate, M2 = 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate>, T = v8::ObjectTemplate, M 
= v8::NonCopyablePersistentTraits<v8::ObjectTemplate>]’
../v8//include/v8.h:545:5:   instantiated from ‘v8::Persistent<T, 
M>::Persistent(const v8::Persistent<T, M>&) [with T = v8::ObjectTemplate, M = 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate>, v8::Persistent<T, M> = 
v8::Persistent<v8::ObjectTemplate, 
v8::NonCopyablePersistentTraits<v8::ObjectTemplate> >]’
plv8.cc:1378:9:   instantiated from here
../v8//include/v8.h:477:5: error: cannot convert ‘v8::Primitive*’ to 
‘v8::Object* volatile’ in assignment
make: *** [plv8.o] Error 1

Original comment by t...@blit.com on 26 Sep 2013 at 5:48

GoogleCodeExporter commented 9 years ago
Getting the same build error as above on trunk checkout of v8.

Original comment by joevan...@gmail.com on 19 Oct 2013 at 6:06

GoogleCodeExporter commented 9 years ago
Until this is fixed, can the README be changed to recommend v8 3.18 or lower? 

Original comment by joevan...@gmail.com on 19 Oct 2013 at 6:31

GoogleCodeExporter commented 9 years ago
I think we should bump up the v8 version.  Even 3.18 is too old now.

Original comment by umi.tan...@gmail.com on 23 Oct 2013 at 4:42

GoogleCodeExporter commented 9 years ago
Getting the same build as above. 
Anyone resolve it now?

Original comment by seahous...@gmail.com on 8 Nov 2013 at 1:40

GoogleCodeExporter commented 9 years ago
BTW, if you are seeing "undefined symbol" error, you are probably building plv8 
against wrong v8 header.

Original comment by umi.tan...@gmail.com on 10 Nov 2013 at 9:26