Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Update for heroku-16 not having libjasper at runtime and set env vars…
Browse files Browse the repository at this point in the history
… to so files
  • Loading branch information
dschep committed May 13, 2017
1 parent a6f8e24 commit 5ae45e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,14 @@ done
APP_VENDOR="/app/$TARGET_VENDOR_DIR"

# Setup environment variables
set-env GEOS_LIBRARY_PATH "$APP_VENDOR/lib"
set-env GDAL_LIBRARY_PATH "$APP_VENDOR/lib"
set-env GEOS_LIBRARY_PATH "$APP_VENDOR/lib/libgeos_c.so"
set-env GDAL_LIBRARY_PATH "$APP_VENDOR/lib/libgdal.so"
set-env PROJ4_LIBRARY_PATH "$APP_VENDOR/lib"
set-env GDAL_DATA "$APP_VENDOR/share/gdal"

# Copy libjasper since it's only available in heroku buildenv
cp /usr/lib/x86_64-linux-gnu/libjasper.so* "$BUILD_DIR/$TARGET_VENDOR_DIR/lib/."

# Bundle workaround
mkdir -p $BUILD_DIR/.bundle
if [ -f $CACHE_DIR/.bundle/config ]; then
Expand Down

6 comments on commit 5ae45e5

@coryschwartz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just trougleshooting the libjasper.so iissue. Looks like this solves it.

I'm not sure the {GECOS|GDAL}_LIBRARY_PATH variables should include the file name. I'll use this buildpack instead of the @cyberdelia version for now.

@dschep
Copy link
Collaborator Author

@dschep dschep commented on 5ae45e5 May 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having the filename was necessary for GeoDjango 1.11 to work 😕

@stevelacey
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not working for me?

@simonfromla
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevelacey same here. Were you able to find a fix? Using this buildpack will continue to throw OSError: libjasper.so.1: cannot open shared object file: No such file or directory

Heroku 16, django==1.11.8

@dschep
Copy link
Collaborator Author

@dschep dschep commented on 5ae45e5 Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dschep
Copy link
Collaborator Author

@dschep dschep commented on 5ae45e5 Mar 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per comments on the above linked issue, I'm abandoning this. Heroku's Docker support is way easier to use than buildpacks.

Please sign in to comment.