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

makensis: pass compiler as SCons arguments #31891

Merged
merged 5 commits into from
Oct 2, 2018
Merged

makensis: pass compiler as SCons arguments #31891

merged 5 commits into from
Oct 2, 2018

Conversation

idleberg
Copy link
Contributor

@idleberg idleberg commented Sep 7, 2018

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

This PR removes the patching of SCons/config.py and passes the compiler to SCons as arguments instead

@idleberg
Copy link
Contributor Author

idleberg commented Sep 8, 2018

@ilovezfs Is this the error below something known on your end? It not only occurs with this PR, but also when I try to install the master.

19:40:59 ==> Downloading https://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib128-dll.zip
19:40:59 Already downloaded: /Users/brew/Library/Caches/Homebrew/downloads/bd348774a814a3084315316c1e2178768167e9f964926a18ef7c8284a5a21607--zlib128-dll.zip
19:40:59 ==> Verifying bd348774a814a3084315316c1e2178768167e9f964926a18ef7c8284a5a21607--zlib128-dll.zip checksum
19:40:59 unzip /Users/brew/Library/Caches/Homebrew/downloads/bd348774a814a3084315316c1e2178768167e9f964926a18ef7c8284a5a21607--zlib128-dll.zip -d /private/tmp/d20180907-35043-8b57gp
19:40:59 cp -pR /private/tmp/d20180907-35043-8b57gp/DLL_FAQ.txt /private/tmp/makensis--zlib-win32-20180907-35043-2xrnl0/DLL_FAQ.txt
19:40:59 cp -pR /private/tmp/d20180907-35043-8b57gp/include/. /private/tmp/makensis--zlib-win32-20180907-35043-2xrnl0/include
19:40:59 cp -pR /private/tmp/d20180907-35043-8b57gp/lib/. /private/tmp/makensis--zlib-win32-20180907-35043-2xrnl0/lib
19:40:59 cp -pR /private/tmp/d20180907-35043-8b57gp/README.txt /private/tmp/makensis--zlib-win32-20180907-35043-2xrnl0/README.txt
19:40:59 cp -pR /private/tmp/d20180907-35043-8b57gp/test/. /private/tmp/makensis--zlib-win32-20180907-35043-2xrnl0/test
19:40:59 cp -pR /private/tmp/d20180907-35043-8b57gp/USAGE.txt /private/tmp/makensis--zlib-win32-20180907-35043-2xrnl0/USAGE.txt
19:40:59 cp -pR /private/tmp/d20180907-35043-8b57gp/zlib1.dll /private/tmp/makensis--zlib-win32-20180907-35043-2xrnl0/zlib1.dll
19:40:59 /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in `write': Broken pipe (Errno::EPIPE)
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in `puts'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:49:in `rescue in block (3 levels) in safe_fork'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:31:in `block (3 levels) in safe_fork'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:30:in `fork'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:30:in `block (2 levels) in safe_fork'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:27:in `open'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:27:in `block in safe_fork'
19:40:59 	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/tmpdir.rb:89:in `mktmpdir'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/utils/fork.rb:26:in `safe_fork'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:719:in `build'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/formula_installer.rb:311:in `install'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:321:in `install_formula'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:253:in `block in install'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:251:in `each'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:251:in `install'
19:40:59 	from /usr/local/Homebrew/Library/Homebrew/brew.rb:89:in `<main>'
19:40:59 Error: An exception occured within a build process:
19:40:59   Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir - /private/tmp/d20180907-35043-8b57gp

@DomT4
Copy link
Member

DomT4 commented Sep 8, 2018

@reitermarkus Thoughts on the above?

@reitermarkus
Copy link
Member

I think I had a similar error once. It was somewhere deep inside a stdlib function, but cannot remember what was the cause. I think the backtrace for Errno::ENOTEMPTY would be more helpful than the one for Errno::EPIPE.

@idleberg
Copy link
Contributor Author

idleberg commented Sep 8, 2018

I think the backtrace for Errno::ENOTEMPTY would be more helpful than the one for Errno::EPIP.

The piece of the log I posted is taken from Jenkins:

https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/30154/version=high_sierra/console

@DomT4
Copy link
Member

DomT4 commented Sep 8, 2018

I pulled this locally to get the fuller version.

==> Verifying bd348774a814a3084315316c1e2178768167e9f964926a18ef7c8284a5a21607--zlib128-dll.zip checksum
unzip /usr/local/var/homebrewcache/downloads/bd348774a814a3084315316c1e2178768167e9f964926a18ef7c8284a5a21607--zlib128-dll.zip -d /private/tmp/d20180908-30807-2gfi2i
cp -pR /private/tmp/d20180908-30807-2gfi2i/test/. /private/tmp/makensis--zlib-win32-20180908-30807-1l3yn7q/test
cp -pR /private/tmp/d20180908-30807-2gfi2i/include/. /private/tmp/makensis--zlib-win32-20180908-30807-1l3yn7q/include
cp -pR /private/tmp/d20180908-30807-2gfi2i/zlib1.dll /private/tmp/makensis--zlib-win32-20180908-30807-1l3yn7q/zlib1.dll
cp -pR /private/tmp/d20180908-30807-2gfi2i/lib/. /private/tmp/makensis--zlib-win32-20180908-30807-1l3yn7q/lib
cp -pR /private/tmp/d20180908-30807-2gfi2i/DLL_FAQ.txt /private/tmp/makensis--zlib-win32-20180908-30807-1l3yn7q/DLL_FAQ.txt
cp -pR /private/tmp/d20180908-30807-2gfi2i/README.txt /private/tmp/makensis--zlib-win32-20180908-30807-1l3yn7q/README.txt
cp -pR /private/tmp/d20180908-30807-2gfi2i/USAGE.txt /private/tmp/makensis--zlib-win32-20180908-30807-1l3yn7q/USAGE.txt
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1452:in `unlink'
Errno::EACCES: Permission denied @ unlink_internal - /private/tmp/d20180908-30807-2gfi2i/test/example_d.exe
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 3
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1452:in `unlink'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1452:in `block in remove_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1457:in `platform_support'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1451:in `remove_file'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1440:in `remove'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:780:in `block in remove_entry'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1490:in `block (2 levels) in postorder_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1490:in `block (2 levels) in postorder_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1495:in `postorder_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1489:in `block in postorder_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1488:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1488:in `postorder_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1489:in `block in postorder_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1488:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1488:in `postorder_traverse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:778:in `remove_entry'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/tmpdir.rb:95:in `mktmpdir'
/usr/local/Homebrew/Library/Homebrew/unpack_strategy.rb:123:in `extract_nestedly'
/usr/local/Homebrew/Library/Homebrew/download_strategy.rb:56:in `stage'
/usr/local/Homebrew/Library/Homebrew/resource.rb:97:in `block in unpack'
/usr/local/Homebrew/Library/Homebrew/resource.rb:170:in `block in mktemp'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:55:in `block in run'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:55:in `chdir'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:55:in `run'
/usr/local/Homebrew/Library/Homebrew/resource.rb:169:in `mktemp'
/usr/local/Homebrew/Library/Homebrew/resource.rb:96:in `unpack'
/usr/local/Homebrew/Library/Homebrew/resource.rb:74:in `stage'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/makensis.rb:39:in `install'
/usr/local/Homebrew/Library/Homebrew/debrew.rb:22:in `block in install'
/usr/local/Homebrew/Library/Homebrew/debrew.rb:92:in `debrew'
/usr/local/Homebrew/Library/Homebrew/debrew.rb:22:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:142:in `block (2 levels) in install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1122:in `block in brew'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2048:in `block (2 levels) in stage'
/usr/local/Homebrew/Library/Homebrew/utils.rb:520:in `with_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2047:in `block in stage'
/usr/local/Homebrew/Library/Homebrew/resource.rb:101:in `block in unpack'
/usr/local/Homebrew/Library/Homebrew/resource.rb:170:in `block in mktemp'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:55:in `block in run'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:55:in `chdir'
/usr/local/Homebrew/Library/Homebrew/mktemp.rb:55:in `run'
/usr/local/Homebrew/Library/Homebrew/resource.rb:169:in `mktemp'
/usr/local/Homebrew/Library/Homebrew/resource.rb:96:in `unpack'
/usr/local/Homebrew/Library/Homebrew/resource.rb:74:in `stage'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/forwardable.rb:202:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2023:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1117:in `brew'
/usr/local/Homebrew/Library/Homebrew/build.rb:113:in `block in install'
/usr/local/Homebrew/Library/Homebrew/utils.rb:520:in `with_env'
/usr/local/Homebrew/Library/Homebrew/build.rb:110:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:191:in `<main>'
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 1
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1446:in `rmdir'
Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir - /private/tmp/d20180908-30807-2gfi2i/test
Choose an action: 1
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:1446:in `rmdir'
Errno::ENOTEMPTY: Directory not empty @ dir_s_rmdir - /private/tmp/d20180908-30807-2gfi2i
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action: 1
==> Kept temporary files
Temporary files retained at /private/tmp/makensis-20180908-30807-b3xngn

@idleberg
Copy link
Contributor Author

idleberg commented Sep 8, 2018

@DomT4 Can you install the makensis formula from master or do you get the same error?

@DomT4
Copy link
Member

DomT4 commented Sep 8, 2018

@idleberg Same error, which is expected here, IMO.

@idleberg
Copy link
Contributor Author

idleberg commented Sep 8, 2018

@idleberg Same error, which is expected here, IMO.

So the question is why it worked for #23471

@DomT4
Copy link
Member

DomT4 commented Sep 8, 2018

It'll be a change we've made to the way things are unpacked, I suspect. We've (well, Markus) has done a lot of great work cleaning up & restructuring things around that, but as ever with major changes you walk into some edge cases sometimes. Suspect this is one of those.

@idleberg
Copy link
Contributor Author

idleberg commented Sep 8, 2018

Alright then, I'll sit still and hopefully it will work in the near future. I got a couple of further changes on my mind.

@fxcoudert
Copy link
Member

I've opened a brew bug report about this issue: Homebrew/brew#4910

@fxcoudert
Copy link
Member

@BrewTestBot test this please
@idleberg the unpack issue should be fixed now

@idleberg
Copy link
Contributor Author

idleberg commented Oct 1, 2018

The error from the Mojave log appears to be temporary problem, both URLs work fine for me:

11:22:48 ==> brew audit makensis --online
11:23:53 ==> FAILED
11:23:53 Error: 2 problems in 1 formula detected
11:23:53 makensis:
11:23:53   * Stable resource "nsis": The URL https://downloads.sourceforge.net/project/nsis/NSIS%203/3.03/nsis-3.03.zip is not reachable
11:23:53   * Stable resource "zlib-win32": The URL https://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib128-dll.zip is not reachable

Not sure what to make of the error in the High Sierra log.

@fxcoudert
Copy link
Member

install events in the last 90 days
================================================================================
1 | makensis                                                     | 315 | 100.00%
================================================================================

@fxcoudert fxcoudert added the almost there PR is nearly ready to merge label Oct 1, 2018
@idleberg
Copy link
Contributor Author

idleberg commented Oct 2, 2018

Can we take this opportunity to remove the options? Nobody is using them, and Homebrew is trimming down options across the board #31510

I was actually planning to add more options, but if nobody is using them, it probably makes more sense to remove them. I didn't know about taps until I read through the issue. I might maintain one that keeps the options.

I'd like to propose some more changes to this formula, but I'm already afraid that in the end I'll be asked to squash all previous commits, which I continually fail to do successfully. So I'd rather keep them for pull requests.

Suggested changes:

  • run test against one of the included example scripts
  • update SKIPUTILS parameter to exclude more Win32 tools
  • update PREFIX_DOC parameter
  • check whether we should adopt these build flags from MacPorts

@fxcoudert fxcoudert merged commit ed69b82 into Homebrew:master Oct 2, 2018
@fxcoudert
Copy link
Member

Thanks @idleberg for the pull request!

@lock lock bot added the outdated PR was locked due to age label Nov 1, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
almost there PR is nearly ready to merge outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants