You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 2, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 2, 2026. It is now read-only.
You could force it to rebuild against your gcc 4.8 headers. Our CI builds with gcc 4.9 for our coverage tests and those are the binaries that are built and published. If we can find a way around that requirement for the published binaries but NAN 2 has a hard c++11 requirement so you'll have to update to support node 4+.
@erbridge It works for me. In case other people run into the same problem, I want to leave some more detailed steps to solve it.
First as we know Heroku use what called "Buildpack" to build our source code like install all the dependences, based on the language your application are using, different buildpacks are used. For example for a NodeJS application, Heroku use "heroku/nodejs" by default.
So in this issue case, we are running a NodeJS application but we also want to use kind of a "apt" dependence, which leads to the requirement for multi-buildpack. Fortunately, heroku has already support for it
Basically what you need to do is add another buildpack and specify some dependences you need.
============== SOLUTION ===============
STEP 1:
Add another buildpack through heroku-cli ( we switch the apt buildpack to the first position so that it can be build before nodejs buildpack )
I'm running into the same issue (at least, I think so) on Cloud Foundry. I'm running node v6.1.0. I'm not sure if any of the above solutions can apply to me as I'm not actually on Heroku, but I can look into it.
Reading into @johnhaley81's comment from several months ago, it seems as though it's the CI build that depends on 4.9, but not the library itself? Can you guys speak more to that? I don't suppose you could be convinced to run separate builds...
update I tried the suggestion of setting BUILD_ONLY=true, which seemed to take effect ([nodegit] BUILD_ONLY is set to true, no fetching allowed.), but didn't seem to create a successful build: the logs [gist here] only seemed to say Error: Cannot find module '../build/Debug/nodegit.node'.
The steps above that @neekey wrote out throw the following warning from the Heroku build dialogue.
remote: -----> Apt app detected
remote: WARNING: This buildpack is no longer maintained.
remote:
remote: Please choose a different buildpack or go to https://github.com/ddollar/heroku-buildpack-apt
remote: and fork it to your own account.
remote:
remote: This buildpack will cease to function at the stroke of midnight on January 1, 2017.
remote: -----> Updating apt caches
It seems that the project has been replaced by Convox? Is it worth updating these steps / docs to reflect this?
Activity
johnhaley81 commentedon Dec 29, 2015
You need to update your version of
libstdc++. Try this:erbridge commentedon Dec 29, 2015
Not sure I have that sort of access on Heroku... Is there a prior version that's compatible with
gcc-4.8?johnhaley81 commentedon Dec 29, 2015
You could force it to rebuild against your gcc 4.8 headers. Our CI builds with gcc 4.9 for our coverage tests and those are the binaries that are built and published. If we can find a way around that requirement for the published binaries but NAN 2 has a hard c++11 requirement so you'll have to update to support node 4+.
To force it to build set
BUILD_ONLY=trueerbridge commentedon Dec 29, 2015
Ok, I'll give rebuilding a try. Odd that Heroku is supporting Node 4+ without proper support...
johnhaley81 commentedon Dec 29, 2015
You could also try http://wclark3.github.io/2014/12/20/heroku-gcc.html
erbridge commentedon Jan 3, 2016
Ok, so I solved this using your first suggestion. For future reference, that was achieved using the APT buildpack with the following
Aptfile:Thanks for your help :).
https://github.com/nodegit/nodegit/issues/845#issuecomment-168531320
add apt file to solve gcc problems, see:
neekey commentedon May 30, 2016
@erbridge It works for me. In case other people run into the same problem, I want to leave some more detailed steps to solve it.
First as we know Heroku use what called "Buildpack" to build our source code like install all the dependences, based on the language your application are using, different buildpacks are used. For example for a NodeJS application, Heroku use "heroku/nodejs" by default.
So in this issue case, we are running a NodeJS application but we also want to use kind of a "apt" dependence, which leads to the requirement for multi-buildpack. Fortunately, heroku has already support for it
Basically what you need to do is add another buildpack and specify some dependences you need.
============== SOLUTION ===============
STEP 1:
Add another buildpack through heroku-cli ( we switch the apt buildpack to the first position so that it can be build before nodejs buildpack )
( you can find the "apt" buildpack here )
STEP 2:
Add a file named
Aptfileand add dependences into it:STEP 3:
commit your change and deploy your app again, hope it works for you : )
maxkorp commentedon Jun 2, 2016
I'll be adding that to the docs!
carpeliam commentedon Jun 6, 2016
I'm running into the same issue (at least, I think so) on Cloud Foundry. I'm running node v6.1.0. I'm not sure if any of the above solutions can apply to me as I'm not actually on Heroku, but I can look into it.
Reading into @johnhaley81's comment from several months ago, it seems as though it's the CI build that depends on 4.9, but not the library itself? Can you guys speak more to that? I don't suppose you could be convinced to run separate builds...
update I tried the suggestion of setting
BUILD_ONLY=true, which seemed to take effect ([nodegit] BUILD_ONLY is set to true, no fetching allowed.), but didn't seem to create a successful build: the logs [gist here] only seemed to sayError: Cannot find module '../build/Debug/nodegit.node'.🔮 Fix Heroku nodegit build issue
georgeedwards commentedon Sep 3, 2016
The steps above that @neekey wrote out throw the following warning from the Heroku build dialogue.
It seems that the project has been replaced by Convox? Is it worth updating these steps / docs to reflect this?
jrjohnson commentedon Mar 8, 2017
Heroku has an official apt build back now:
Just replace the @neekey's with:
oagix commentedon Mar 17, 2018
This is now a broken link:
http://mirrors.kernel.org/ubuntu/pool/main/g/gcc-4.9/gcc-4.9_4.9.2-10ubuntu13_amd64.deb