-
Notifications
You must be signed in to change notification settings - Fork 442
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
[BUG] Error in autogen on Mac #1230
Comments
Traces back to b364298. If we don't care about reproducible builds on Mac, we can just revert that part of the change... |
Probably best to have both scripts (linux + mac) do the same thing. |
Removing the reproducible build for Linux is not an option here. It was specifically requested by guys at the Debian project. For Mac we either need to find other parameters, or we could revert it. |
CC @lamby (in case the ping in an edited review for a closed PR doesn't go through). (Also if you could address my comment below as well.) |
Also for that PR, why |
@vr8hub can you send us the correct syntax for Mac? Seems trivial to change but I can't test: |
@cfsmp3 There's no option for inputting a specific date in there it seems. We can replace the We should perhaps see if @lamby has a suggestion for reproducible builds on Mac, or if we can revert that for Mac only. |
Possibly. I don't have a Linux box handy, so I don't know what the existing command is trying to do. |
@vr8hub The current command is adding the date to the build, in a reproducible manner. This means that it either takes the time from an environment variable, or picks the current date if that is missing. |
From a little searching, it seems the SOURCE_DATE_EPOCH is formatted as number of seconds since epoch. Which would agree with the So, take # of seconds, either from SOURCE_DATE_EPOCH or the current datetime, and output in the indicated format. I think that might be possible (the ss64 page is incorrect or outdated; there are quite a few other options available in |
Just a drive-by comment please check out https://reproducible-builds.org/docs/source-date-epoch/#bash--posix-shell |
Excellent, thanks Chris. And that does work; I tried it first with SOURCE_DATE_EPOCH set to current date, then set it back a couple of months, and BUILD_DATE ended up with the correct value both times. I suspect this could be shortened, but since it works and I have other things to do, let's just go with this for now. :) DATE_FMT="+%Y-%m-%d" |
I keep forgetting that Mac has the BSD |
If https://travis-ci.org/CCExtractor/ccextractor/builds/650958611 passes I'll merge that (which is basically the thing mentioned here). |
Actually, I don't think that first command is needed, and doesn't do what they think it does, at least on a Mac. The Also, the date command should probably include I think those three lines can be shortened to the equivalent one-liner for what's there now:
That works for me when SOURCE_DATE_EPOCH isn't set and when it is. |
This will not work under GNU date as |
We're not worried about GNU date, are we? This is a Mac-specific file. |
Ah, did not realise that...! I should go to bed, really. :) |
* Fix Mac build error for reproducible builds * Shorten solution with vr8hub's suggestion Closes #1230
{replace with the arguments}
build error, not runtime errorThere is an error when running autogen.sh in the Mac subdirectory.
This is actually an error in pre-build.sh, which autogen.sh calls. Line 24 of the pre-build script is
But the Mac's
date
command has neither a--utc
or a--date
option. (The Mac'sdate
command is BSD-based; I don't know about Linux.)[Edit] Sorry, should have said: I'm on Mojave 10.14.6.
The text was updated successfully, but these errors were encountered: