Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

fails to build on freebsd 11.1 #390

Closed
sopparus opened this issue Sep 20, 2017 · 13 comments
Closed

fails to build on freebsd 11.1 #390

sopparus opened this issue Sep 20, 2017 · 13 comments

Comments

@sopparus
Copy link

/usr/include/c++/v1/__config:73:2: error: "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported. use
_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR instead
#error "_LIBCPP_TRIVIAL_PAIR_COPY_CTOR" is no longer supported.
^
1 error generated.

@peakji
Copy link
Member

peakji commented Sep 21, 2017

@sopparus Could you please copy and paste the full stack-trace here? We need more info to locate the error, but I think this looks familiar: lovell/sharp#873

@sopparus
Copy link
Author

ok, this is full log https://pastebin.com/jT1S4P7r

thanks!

@sopparus
Copy link
Author

it does, but I dont see any clear solution there? leveldown has also worked fine in the past

@ralphtheninja
Copy link
Member

I have absolutely no idea what's going on here so am of no help atm.

@No9
Copy link
Contributor

No9 commented Sep 27, 2017

OK @sopparus this is a little confusing.
The error that you pasted at the start of this issue seems to be a problem with an older version of 8.1.x version of node.js
nodejs/node#14076
I have replicated the problem using node 8.1.x on FreeBSD 11.1
However when I upgrade to node 8.5.x as per the setting on your environment I cannot recreate this issue and leveldown installs without any problems.
As 8.1 is the default in FreeBSD11.1 how did you upgrade your environment?

@sopparus
Copy link
Author

I use the precompiled package, and its version node-8.5.0 .
is it some environment variable youre talking about? ive done nothing except installing that package with pkg

@No9
Copy link
Contributor

No9 commented Sep 27, 2017

ok - i'm using a vagrant 11.1 can I take it you are using - https://download.freebsd.org/ftp/releases/ISO-IMAGES/11.1/FreeBSD-11.1-RELEASE-amd64-dvd1.iso ?

@sopparus
Copy link
Author

correct

@No9
Copy link
Contributor

No9 commented Sep 28, 2017

(Edited)
I've reproduced this with the iso - it's not a great story
By default pkg uses quarterly which contains a node 8.1.4 and is known to be broken as per the nodejs/node#14076
So I modified /etc/pkg/FreeBSD.conf to latest
Did pkg update pkg install npm node and that installed 8.5.0
npm install leveldown still produces the issue above

This is due to the common.gypi being incomplete for node.js 8.x on 11.1 FreeBSD
From the error it looks like _LIBCPP_TRIVIAL_PAIR_COPY_CTOR is still being applied even though llvm >= 4.0

common.gypi is correct the problem is that the default llvm is being set to 3.8 in build/config.gypi.
This happens during node-gyp config

Simply overriding this with npm install leveldown --llvm-version=4.0 will install leveldown correctly

Give the amount of native libs running into this we should consider bumping the defaults to 4.0 in node if possible

cc @bradleythughes

@sopparus
Copy link
Author

thank you, that work around did the trick.

@sopparus
Copy link
Author

Probably this then https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222153

THanks everyone for the help

@No9
Copy link
Contributor

No9 commented Sep 28, 2017

Thanks @sopparus That looks like it should work alright - It's basically generating a config.gypi based on the current system rather than the system that node was built on. FWIW I put the reasons why that is happening in this issue https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220983#c3

If everyone is happy maybe we close this issue?

@tsvetomir
Copy link

Can we add a pre-built node binding to the release? It's trivial to build it using the workaround suggested by @No9 and it will save everyone the trouble.

I'll leave leveldown-v2.1.1-node-v57-freebsd-x64.tar.gz here just in case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants