mongofill / mongofill-hhvm

A mix of the original Mongofill extension + BSON implementation in C++
MIT License
32 stars 19 forks source link

Extension has undefined symbols #7

Closed rjelierse closed 9 years ago

rjelierse commented 10 years ago

The compiled mongo extension cannot be loaded due to undefined symbols:

Uncaught exception: Could not load extension /home/vagrant/mongofill-hhvm/mongo.so: getModule() symbol not defined. (/home/vagrant/mongofill-hhvm/mongo.so: undefined symbol: _getModule)

Output from cmake . && make:

-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring for HHVM API version 20131007
-- bson Include dir: /usr/local/include/libbson-1.0
-- libbson library: /usr/local/lib/libbson-1.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vagrant/mongofill-hhvm
Scanning dependencies of target mongo
[ 33%] Building CXX object CMakeFiles/mongo.dir/src/bson.cpp.o
[ 66%] Building CXX object CMakeFiles/mongo.dir/src/encode.cpp.o
[100%] Building CXX object CMakeFiles/mongo.dir/src/decode.cpp.o
Linking CXX shared library mongo.so
Embedding php in mongo
[100%] Built target mongo

Output from ldd mongo.so:

linux-vdso.so.1 =>  (0x00007fff81b08000)
libbson-1.0.so.0 => /usr/local/lib/libbson-1.0.so.0 (0x00007f72fe16a000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f72fde5a000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f72fdc43000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f72fd87d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f72fe59e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f72fd65f000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f72fd358000)

Output from hhvm --version:

HipHop VM 3.2.0-dev (rel)
Compiler: heads/master-0-g6791eafdb8595f7591fbb4e3d7a49218dd2a5c2c
Repo schema: ff63a45a6fb2076c306867ef0a595de6d93433d4
mcuadros commented 10 years ago

Are you compiling the module with the same version?

rjelierse commented 10 years ago

Yes, I have compiled HHVM from source, then tried to compile this module using the HHVM tools I'd just compiled.

d3berger commented 10 years ago

I have the same error. Even why I tried this extension-example from hhvm: https://github.com/hhvm/extension-example/issues/7

I was told to try this in #hhvm irc channel

[12:50] denis_: you need to enable the zend compat layer [12:51] ini style: hhvm.eval.enable_zend_compat = true [12:51] hdf: [12:51] Eval { [12:51] EnableZendCompat = true [12:51] } [12:51] or -vEval.EnableZendCompat=true

But it did not help