osxfuse 2.6.1 #21318
osxfuse 2.6.1 #21318
Conversation
| end | ||
|
|
||
| # Do not override Xcode build settings | ||
| ENV.remove_cc_etc |
mistydemeo
Jul 18, 2013
Member
Homebrew needs to be able to dictate compiler choice.
Homebrew needs to be able to dictate compiler choice.
bfleischer
Jul 18, 2013
Author
Contributor
osxfuse will not work with all compilers. Especially on Mac OS X 10.6 there are known issues resulting from using llvm or clang. The osxfuse build script picks a working compiler depending on the version of Xcode that is installed.
osxfuse will not work with all compilers. Especially on Mac OS X 10.6 there are known issues resulting from using llvm or clang. The osxfuse build script picks a working compiler depending on the version of Xcode that is installed.
mistydemeo
Jul 18, 2013
Member
I'd prefer that the compilers get marked in our fails_with notation so it's clear to us what it does/doesn't work with. That will govern compiler selection based on what's available.
I'd prefer that the compilers get marked in our fails_with notation so it's clear to us what it does/doesn't work with. That will govern compiler selection based on what's available.
bfleischer
Jul 18, 2013
Author
Contributor
Another problem I ran into before putting ENV.remove_cc_etc in was that homebrew seems to override some Xcode build settings resulting in the osxfuse build to fail. I'd prefer not rewriting the whole build process.
Another problem I ran into before putting ENV.remove_cc_etc in was that homebrew seems to override some Xcode build settings resulting in the osxfuse build to fail. I'd prefer not rewriting the whole build process.
mistydemeo
Jul 18, 2013
Member
That method unsets the following environment variables:
CC CXX OBJC OBJCXX LD CPP CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS LDFLAGS CPPFLAGS
If you can figure out what breaks it you can unset those environment variables, but we would prefer to track what compiler is being used.
That method unsets the following environment variables:
CC CXX OBJC OBJCXX LD CPP CFLAGS CXXFLAGS OBJCFLAGS OBJCXXFLAGS LDFLAGS CPPFLAGS
If you can figure out what breaks it you can unset those environment variables, but we would prefer to track what compiler is being used.
| depends_on 'libtool' => :build | ||
|
|
||
| def install | ||
| if MacOS.version <= :leopard |
mistydemeo
Jul 18, 2013
Member
You can do this simply as depends_on :macos => :snow_leopard in the dependencies.
You can do this simply as depends_on :macos => :snow_leopard in the dependencies.
bfleischer
Jul 18, 2013
Author
Contributor
Thanks. I was looking for something like this but didn't find it in the cookbook.
Thanks. I was looking for something like this but didn't find it in the cookbook.
mistydemeo
Jul 18, 2013
Member
It's recent; still needs to get added.
It's recent; still needs to get added.
|
|
||
| EOS | ||
|
|
||
| return message |
mistydemeo
Jul 18, 2013
Member
No need to create a variable and then return it; Ruby automatically returns the last value in the method, so just do
def caveats; <<-EOS.undent
...
EOS
end
No need to create a variable and then return it; Ruby automatically returns the last value in the method, so just do
def caveats; <<-EOS.undent
...
EOS
end|
|
||
| class Osxfuse < Formula | ||
| homepage 'http://osxfuse.github.io' | ||
|
|
mistydemeo
Jul 18, 2013
Member
Don't need a newline here.
Don't need a newline here.
| Unmount all FUSE file systems and then unload the kernel extension: | ||
|
|
||
| sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs | ||
|
|
mistydemeo
Jul 18, 2013
Member
Don't need the extra newline, the caveats will already end with one.
Don't need the extra newline, the caveats will already end with one.
mistydemeo
Jul 18, 2013
Member
(I see the caveats were borrowed from fuse4x directly so apologies for the pedantry.)
(I see the caveats were borrowed from fuse4x directly so apologies for the pedantry.)
| head 'https://github.com/osxfuse/osxfuse.git', :branch => 'osxfuse-2' | ||
|
|
||
| depends_on :macos => :snow_leopard | ||
| depends_on 'autoconf' => :build |
samueljohn
Jul 19, 2013
Contributor
for autoconf and automake, please use
depends_on :autoconf and depends_on :automake the => :build time dep is implicit there.
for autoconf and automake, please use
depends_on :autoconf and depends_on :automake the => :build time dep is implicit there.
bfleischer
Jul 21, 2013
Author
Contributor
The => :build seems to be necessary to make @BrewTestBot happy. Without this I'm getting
Error: 4 problems in 1 formulae
osxfuse:
- stable version 2.6.1 is redundant with version scanned from URL
- autoconf dependency should be "depends_on 'autoconf' => :build"
- automake dependency should be "depends_on 'automake' => :build"
- Don't need to interpolate "prefix" with system
The => :build seems to be necessary to make @BrewTestBot happy. Without this I'm getting
Error: 4 problems in 1 formulae
osxfuse:
- stable version 2.6.1 is redundant with version scanned from URL
- autoconf dependency should be "depends_on 'autoconf' => :build"
- automake dependency should be "depends_on 'automake' => :build"
- Don't need to interpolate "prefix" with system
jacknagel
Jul 21, 2013
Contributor
You need to use the symbol style (:autoconf)
You need to use the symbol style (:autoconf)
| depends_on :macos => :snow_leopard | ||
| depends_on 'autoconf' => :build | ||
| depends_on 'automake' => :build | ||
| depends_on 'gettext' => :build |
samueljohn
Jul 19, 2013
Contributor
gettext is only a build time dep? Just asking. I dunno. No dynamic linking I assume, eh?
gettext is only a build time dep? Just asking. I dunno. No dynamic linking I assume, eh?
bfleischer
Jul 19, 2013
Author
Contributor
It's only needed for its config.rpath file.
It's only needed for its config.rpath file.
| end | ||
|
|
||
| def caveats; <<-EOS.undent | ||
| In order for FUSE-based filesystems to work, the osxfuse file system bundle |
samueljohn
Jul 19, 2013
Contributor
please indent by 2 spaces (I do this myself often as I come from python).
please indent by 2 spaces (I do this myself often as I come from python).
samueljohn
Jul 19, 2013
Contributor
Ah now I see, because the EOS is dedented.
Perhaps Just move <<-EOS.undent below the def caveats and indent by 2 spaces?
Ah now I see, because the EOS is dedented.
Perhaps Just move <<-EOS.undent below the def caveats and indent by 2 spaces?
|
Cool, I am very exited by this, so we can finally have osxfuse and perhaps later even TrueCrypt! No more warnings about unbrewed dylibs in my /usr/local. |
|
There is still the "ENV.remove_cc_etc" issue. Is there a way of telling homebrew which compiler to use when building osxfuse? The fails_with construct will not work for me because this would require a lot of additional testing on every osxfuse release. I simply don't have the time to run a complete series of tests on every version of Mac OS X using every compiler available. This would take several days. I don't think it would be responsible regarding the users not testing osxfuse extensively. In the worst case scenario the wrong compiler will result in kernel panics and probably cause data loss. |
|
IMHO @BrewTestBot will help testing. The build log shows what problems need to solve. |
|
@manphiz osxfuse will compile just fine with most (if not all) Xcode compilers. The issues I'm referring to are runtime issues. I've seen seemingly random crashes when using the osxfuse kernel extension, that was built with llvm-gcc or clang on Mac OS X 10.5 and 10.6. Those are compiler issues, that are not obvious when building osxfuse. |
|
@BrewTestBot fails to build osxfuse (Build #923). Configurations lion and mountain_lion report:
This seems to be a @BrewTestBot issue, that has nothing to do with the osxfuse formula, right? Configuration snow_leopard reports:
Do I need to add a I've tested the formula on clean installs of 10.6 (Xcode 3.2.6 with |
|
Ah these testings can be time consuming. Thanks for the explanation. On Sun, Jul 21, 2013 at 3:28 AM, Benjamin Fleischer
|
|
Hi Right now I'm using this formula with ntfs-3g (https://gist.github.com/CyberCastle/077caa74be2472bfacd3), a few problems, but overall, everything works fine. Greetings |
|
Are there any news regarding this pull request? Can it be merged? |
|
I'm excited for this! It will be great to have an up to date FUSE in homebrew. Hopefully the sshfs formula can be updated next :) I'm experiencing occasional kernel panics with the current homebrew old sshfs/fuse4x combo, so this will be great. |
|
@BrewTestBot test this please |
|
So does this compile with |
|
If only support one compiler, I'd suggest to use |
|
My preference is also to document the compilers in the formula. @bfleischer If you're already testing it and selecting compilers, then documenting that with Other maintainers: the fuse4x formula currently ignores our compiler selection and selects on its own, the same way that osxfuse is. My preference is for homebrew to document/control the compiler selection for osxfuse though. Thoughts? cc @jacknagel, @MikeMcQuaid, @adamv |
|
Agreed. |
|
This formula can be built on 10.6 to 10.9 using 9 different version of Xcode (3.2, 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 5.0). All versions come with at least two compilers, some with three. This comes down to more than 20 different compiler versions. homebrew currently includes a formula for llvm. Would it be possible for homebrew to select a compiler, that does not ship with Xcode, for building osxfuse? As it is it takes me roughly two days to test each osxfuse release on all supported versions of Mac OS X (and architectures). Please note that this covers only three compilers. It is simply not possible to test osxfuse with all compilers out there. I'm looking for a solution that is easily maintainable and does not take too much time. Is there something like It's not just about compilers. homebrew seems to set CFLAGS and friends as well. This resulted in various errors when building osxfuse on my test machine. Once I put
In my opinion there is a big difference when it comes to building user space applications and libraries compared to kernel extensions. When an application crashes that's about it, the application crashed. In case a kernel extension crashes, the hole operating system goes down with it. This can result in severe data loss and effects the whole system. A package manager should not dictate the compiler or other build flags for kernel code. Please don't take this the wrong way, but in case osxfuse is built with an incompatible compiler or incompatible build settings and causes kernel panics later on, people will be blaming osxfuse (and me), not homebrew. In my opinion letting the build script select compiler and build settings is the safest bet in this case. |
|
Oh, actually it is not that bad, because homebrew's doctor will make sure that on each OS X the latest Xcode is installed, so when you add a Also, if it is possible to write a In our isolated build environment, called superenv, we don't set the CFLAGS but inject or cleanup flags/args given to the compiler by providing a shim for each tool. Let me know, if - and how - I can assist you in sorting that out. What is the error you are talking about? |
Compiler versions that do not ship with Xcode are completely unsupported.
The osxfuse build script does not rely on the Command Line Tools being installed. Instead it locates all Xcode installations it can find. Then selects the one, that it deems best suited for building osxfuse. Actually, multiple versions of Xcode are required for distribution builds that support Mac OS X 10.5 to 10.9. The build script sets up its own build environment and makes use of
I don't remember exactly, but I noticed that By the way, I was not able to reproduce the issues in Xcode even after switching to |
The compiler precedence you provide would be covered by: fails_with :clang do
build 425
endWhich would trigger precisely the compiler precedence you list above. Re: flags, there's been some discussion about allowing formulae to turn off superenv's flag refurbishing. That would be appropriate here and would resolve the biggest problem the formula's running into. (Though I don't think it should be active here? It's only on when the
And we're fine with that, but the formula needs to be maintainable to us too since we're the ones who are going to be maintaining it primarily. |
That's exactly my point. It needs to be maintainable. But by interfering with the build settings the whole build process is getting much more difficult to maintain from the osxfuse end.
What are the correct In my opinion the main problem is not maintainability. From what I could gather so far, Homebrew is overriding build settings. I cannot count on the osxfuse formula being built the same way as the distribution package. Can you provide a list of all the changes homebrew will make to the build settings? |
|
Or to go with raw environmental settings, "env :std" could be applied On Thu, Aug 15, 2013 at 3:48 PM, Benjamin Fleischer
|
|
I've fixed the build script. It did detect the non-zero return code of xcodebuild but did not pass it along to homebrew. @manphiz Could you try building HEAD and report back if homebrew detects the build failure? |
|
@bfleischer @MikeMcQuaid Retried HEAD by removing ENV.remove_cc_etc to trigger an error and the build script now can notify Homebrew that it actually failed. |
|
@BrewTestBot test this please |
|
|
||
| class Osxfuse < Formula | ||
| homepage 'http://osxfuse.github.io' | ||
| url 'https://github.com/osxfuse/osxfuse.git', :tag => 'osxfuse-2.6.1' |
MikeMcQuaid
Sep 14, 2013
Member
Can we use https://github.com/osxfuse/osxfuse/archive/osxfuse-2.6.1.tar.gz instead here.
Can we use https://github.com/osxfuse/osxfuse/archive/osxfuse-2.6.1.tar.gz instead here.
bfleischer
Sep 14, 2013
Author
Contributor
No, osxfuse uses submodules. Last time I cheched submodules were not contained in the tar.gz.
No, osxfuse uses submodules. Last time I cheched submodules were not contained in the tar.gz.
|
|
||
| Unmount all FUSE file systems and then unload the kernel extension: | ||
|
|
||
| sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs |
MikeMcQuaid
Sep 14, 2013
Member
I'd suggest this be above the previous commands; bit confusing to say "run these commands" and then "actual run these commands before the others".
I'd suggest this be above the previous commands; bit confusing to say "run these commands" and then "actual run these commands before the others".
|
@manphiz where are we at with |
|
@MikeMcQuaid looks like it is still needed. Without #22443 it will select gcc-4.2 as compiler, and with that it will select clang, both of which result in failure. |
|
@bfleischer Also suggest backport the patch that fixes return code: |
|
@manphiz On which platform? Perhaps we should just hardcode it there or have different fails_with rules there. |
|
@MikeMcQuaid Sorry forgot to mention. It was 10.8. Another reason I think it should keep as-is is that after #22443 gcc-4.2 will have higher priority if installed even on 10.7 and later, which contradicts the compiler requirement. In this case, IMHO it is better to let the software choose the correct compiler. |
|
|
||
| depends_on :macos => :snow_leopard | ||
| depends_on :autoconf | ||
| depends_on :automake |
manphiz
Sep 15, 2013
Contributor
Looks like "autoconf" and "automake" should also be build dependencies, no?
Looks like "autoconf" and "automake" should also be build dependencies, no?
bfleischer
Sep 15, 2013
Author
Contributor
@manphiz @samueljohn wrote:
for autoconf and automake, please use
depends_on :autoconf and depends_on :automake the => :build time dep is implicit there.
@manphiz @samueljohn wrote:
for autoconf and automake, please use
depends_on :autoconf and depends_on :automake the => :build time dep is implicit there.
manphiz
Sep 17, 2013
Contributor
Hmm, kinda unnecessary, but OK.
Hmm, kinda unnecessary, but OK.
|
@manphiz Then can we not have a conditional fails_with for 10.7/10.8 and GCC? |
|
@MikeMcQuaid agreed. I think they are redundant now. |
|
@MikeMcQuaid, @manphiz I have revised the caveats section and added a new tag (in the osxfuse repository) for the the recent build script fix. |
|
|
||
| class Osxfuse < Formula | ||
| homepage 'http://osxfuse.github.io' | ||
| url 'https://github.com/osxfuse/osxfuse.git', :tag => 'osxfuse-2.6.1_1' |
manphiz
Sep 18, 2013
Contributor
I'd suggest using '2.6.1.1' as version number, as '_' is will be used to mark formula revision in @jacknagel's #19920 .
I'd suggest using '2.6.1.1' as version number, as '_' is will be used to mark formula revision in @jacknagel's #19920 .
|
|
||
| fails_with :llvm do | ||
| build 2335 | ||
| end |
manphiz
Sep 18, 2013
Contributor
As per last discussion with @MikeMcQuaid, these 2 "fails_with" are not necessary given that remove_cc_etc is required for osxfuse to choose the correct compilers based on Mac OS X version with the new compiler preference in place. Please consider removing them.
As per last discussion with @MikeMcQuaid, these 2 "fails_with" are not necessary given that remove_cc_etc is required for osxfuse to choose the correct compilers based on Mac OS X version with the new compiler preference in place. Please consider removing them.
|
@bfleischer Thanks for the update. Add a few comments, which should be the last ones I hope. Also the build on 10.6 fails, please check the log. |
|
@manphiz Changing the tag name to osxfuse-2.6.1.1 does not seem right to me because then osxfuse and homebrew would report different version numbers. osxfuse would return 2.6.1 but homebrew knows it as 2.6.1.1. This might be confusing, As for the failed build on snow leopard I'm not quite sure why this is happening. The failure is cause by the Xcode version of aclocal not respecting ACLOCAL_PATH. See #10824. But I'm pretty sure that building the formula on Snow Leopard worked in the past. Have there been recent changes to homebrew that would explain this? Is there a better workaround than using ACLOCAL instead? |
Add FUSE for OS X formula
|
I've removed the explicit version number. @BrewTestBot doesn't like it. osxfuse is identified as version 2.6.1 which should be fine. |
|
@bfleischer Sorry I wasn't clear. What I meant is that you probably want to use upstream tag like "osxfuse-2.6.1.1" in future, as "_" will be used in Homebrew's own formula revision mark. Also as you can see, it confuses Homebrew's version detection. But that's minor and temporary, and I think it is fine for now. |
|
Looks good for me now. Other maintainers? Espectially @MikeMcQuaid @mistydemeo ? |
|
Looks good to me. |
|
Merged. Thanks. |
Add FUSE for OS X formula Closes Homebrew#21318. Signed-off-by: Xiyue Deng <manphiz@gmail.com>
Add FUSE for OS X formula