Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails with "concurrent insert not supported" on FreeBSD 12 #131

Open
Papabyte opened this issue Aug 4, 2019 · 5 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Papabyte
Copy link

Papabyte commented Aug 4, 2019

Hi

I try to run a project that uses RocksDB on FreeBSD 12.

I got this error when running npm install:

$ npm install [email protected]

> [email protected] install /usr/home/obyte/headless-obyte/node_modules/rocksdb
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.16.0 runtime=node arch=x64 libc= platform=freebsd)
gmake: Entering directory '/usr/home/obyte/headless-obyte/node_modules/rocksdb/build'
  CXX(target) Release/obj.target/leveldb/deps/leveldb/leveldb-rocksdb/db/auto_roll_logger.o
In file included from ../deps/leveldb/leveldb-rocksdb/db/auto_roll_logger.cc:6:
In file included from ../deps/leveldb/leveldb-rocksdb/db/auto_roll_logger.h:13:
In file included from ../deps/leveldb/leveldb-rocksdb/db/filename.h:19:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/options.h:20:
In file included from ../deps/leveldb/leveldb-rocksdb/include/rocksdb/advanced_options.h:13:
../deps/leveldb/leveldb-rocksdb/include/rocksdb/memtablerep.h:101:5: error: cannot use 'throw' with exceptions disabled
    throw std::runtime_error("concurrent insert not supported");
    ^
1 error generated.
gmake: *** [deps/leveldb/leveldb.target.mk:299: Release/obj.target/leveldb/deps/leveldb/leveldb-rocksdb/db/auto_roll_logger.o] Error 1
gmake: Leaving directory '/usr/home/obyte/headless-obyte/node_modules/rocksdb/build'
gyp ERR! build error 
gyp ERR! stack Error: `gmake` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System FreeBSD 12.0-RELEASE
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/home/obyte/headless-obyte/node_modules/rocksdb
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0

I tried with node8-8.16.0, node10-10.16.0, [email protected] and [email protected]. That always fails with same error.
Any idea how to fix?

@vweevers
Copy link
Member

vweevers commented Aug 4, 2019

The relevant bit is error: cannot use 'throw' with exceptions disabled.

To enable that, maybe we need to add an -fexceptions flag to binding.gyp.

@vweevers vweevers added bug Something isn't working help wanted Extra attention is needed labels Aug 4, 2019
@NickNaso
Copy link
Contributor

NickNaso commented Aug 4, 2019

Hi everyone,
I think that @vweevers is right you need to enable the exception mechanism using the following flags:

 'cflags!': [  '-fno-exceptions' ],
 'cflags_cc!': [ '-fno-exceptions' ]

You need to set the flags in the gyp file used to build the rocksdb dependency: leveldb.gyp

@vweevers
Copy link
Member

vweevers commented Aug 4, 2019

Thanks @NickNaso. I think we should also add OS_FREEBSD=1 define, similar to what leveldown does.

And while we're at it, update https://github.com/Level/rocksdb#supported-platforms. I think this was copied as-is from leveldown but rocksdb doesn't support the same platforms.

A PR is welcome!

@vweevers
Copy link
Member

vweevers commented Aug 4, 2019

Would be cool to run our tests on FreeBSB.

Anyone have any experience with Cirrus CI? They have FreeBSD VM's! And it's free for OSS.

@vweevers
Copy link
Member

vweevers commented Oct 5, 2019

Trying out Cirrus CI on leveldown: Level/leveldown#678

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants