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

Clang Support on FreeBSD #565

Closed
NuLL3rr0r opened this issue Jan 19, 2015 · 7 comments
Closed

Clang Support on FreeBSD #565

NuLL3rr0r opened this issue Jan 19, 2015 · 7 comments
Assignees

Comments

@NuLL3rr0r
Copy link

Hello,
Unfortunately on FreeBSD systems whenever I do a npm install for most modules node-gyp assumes the compiler is g++. FreeBSD uses clang as it's default compiler and there is no g++.

This is an example issue that I had: kelektiv/node.bcrypt.js#270 (comment)

This solved the issue:
export CXX=clang++
npm install --clang=1

But on FreeBSD/Mac OS X systems it should switches to clang insted of gcc.

@saper
Copy link
Contributor

saper commented Apr 30, 2015

Hi, I am using

env CC=clang CXX=clang++ LINKXX=clang++ LINK=clang ....

before using node-gyp or npm install

@Fishrock123 Fishrock123 self-assigned this Aug 23, 2015
@AnthIste
Copy link

@saper thanks a lot, that worked for me when installing leveldown on FreeBSD 9.3

@Globik
Copy link

Globik commented Jul 19, 2016

And for windows?

@saper
Copy link
Contributor

saper commented Jul 19, 2016

@Globik Are you using clang on Windows?

@Globik
Copy link

Globik commented Jul 20, 2016

@saper yes, for tests, at a very beginning right now.

@saper
Copy link
Contributor

saper commented Jul 20, 2016

There is probably much more work to do for such a setup:

  1. Check if gyp supports such a setup.
  2. Unless clang uses Visual Studio v120 C++ ABI (which I doubt highly), you would need to build your own node with clang
  3. One needs to convince a lot of code that win32 is not only Visual Studio. Some libraries in the non-node world support mingw32 for example.

This bug is about detecting and using clang in an environment where it is a known working compiler, in sod cases the only one installed.

@arrowd
Copy link

arrowd commented May 24, 2019

Building https://github.com/kelektiv/node.bcrypt.js with npm on FreeBSD works ATM. Either this is fixed or other reproducing testcase is needed.

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

No branches or pull requests

7 participants