ruby / json

JSON implementation for Ruby
https://ruby.github.io/json
Other
673 stars 326 forks source link

Expected absolute path for `SOURCE_DATE_EPOCH` #589

Closed gouravkhunger closed 3 months ago

gouravkhunger commented 3 months ago

Hi,

I am trying to install this gem in a termux based environment but getting an error for the SOURCE_DATE_EPOCH environment variable.

:/data/data/sh.gourav.jekyllex/files/home/genics $ gem install json
Building native extensions. This could take a while...
ERROR:  Error installing json:
    ERROR: Failed to build gem native extension.

    current directory: /data/data/sh.gourav.jekyllex/files/usr/lib/ruby/gems/3.3.0/gems/json-2.7.2/ext/json/ext/generator
/data/data/sh.gourav.jekyllex/files/usr/bin/ruby extconf.rb
error: expected absolute path: "{SOURCE_DATE_EPOCH="

extconf failed, exit code 1

Gem files will remain installed in /data/data/sh.gourav.jekyllex/files/usr/lib/ruby/gems/3.3.0/gems/json-2.7.2 for inspection.
Results logged to /data/data/sh.gourav.jekyllex/files/usr/lib/ruby/gems/3.3.0/extensions/aarch64-linux-android/3.3.0/json-2.7.2/gem_make.out

My requirement for this gem comes from running some jekyll based projects. Most required gems install and work correctly. But jekyll-minifier(https://badge.fury.io/rb/jekyll-minifier) depends on json and the installation fails.

I am unable to figure out from the source what exactly is the requirement for this environment variable. Any help would be appreciated. Thanks!

gouravkhunger commented 3 months ago

This was caused by some custom patches to ruby (https://github.com/termux/termux-packages/issues/20559#issuecomment-2173594305). Closing 👍🏻