Opened 15 years ago
Closed 13 years ago
#4369 closed bug (invalid)
[patch] Fix configure case-sensitive FS detection (OSX/Darwin)
Reported by: | VinDuv | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Build System | Version: | R1/pre-alpha1 |
Keywords: | Cc: | planche2k@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
The current configure script tries to detect if the current directory is on a case sensitive volume by calling "diskutil info .
", which is supposed to return something like this:
[...] File System: [FS properties, like "Case-sensitive"] [FS name, like "HFS+"] [...]
Unfortunately this does not work correctly when the current directory is in a mounted ZFS pool: in this case diskutil just print its "usage" message and quits.
I modified the script so it checks wether diskutil returns something useful, and if it isn't the case, it does a manual check:
# check for case-sensitive filesystem if on darwin if [ $buildPlatform = "darwin" ]; then fsCaseSensitive=0 diskutil info . | grep -i "file system" > /dev/null if [ $? = 0 ]; then diskutil info . | grep -i "case-sensitive" > /dev/null if [ $? = 0 ]; then fsCaseSensitive=1 fi; else # Diskutil does not know if the FS is case sensitive # Do it manually mkdir case_sensitive_test && rmdir CASE_SENSITIVE_TEST 2> /dev/null if [ $? != 0 ]; then # Error: case sensitive rmdir case_sensitive_test fsCaseSensitive=1 fi fi if [ $fsCaseSensitive = 0 ]; then echo "You need a case-sensitive file-system to build Haiku." echo "Please see the following guide on how to set one up:" echo "http://haiku-os.org/documents/dev/how_to_build_haiku_on_mac_os_x" exit 1 fi fi
Attachments (1)
Change History (12)
comment:1 by , 15 years ago
follow-up: 3 comment:2 by , 15 years ago
Something like this then ?
# check for case-sensitive filesystem mkdir case_sensitive_test && rmdir CASE_SENSITIVE_TEST 2> /dev/null if [ $? = 0 ]; then echo "You need a case-sensitive file-system to build Haiku." if [ $buildPlatform = "darwin" ]; then echo "Please see the following guide on how to set one up:" echo "http://haiku-os.org/documents/dev/how_to_build_haiku_on_mac_os_x" fi exit 1 fi rmdir case_sensitive_test
Maybe the mention of the guide should be removed since it will probably merge with other guides ?
comment:3 by , 15 years ago
Replying to VinDuv:
Something like this then ?
Yes like that.
Maybe the mention of the guide should be removed since it will probably merge with other guides ?
I'd remove that specific link and just link to the homepage in general.
comment:4 by , 15 years ago
To be honest I wouldn't have added the case-sensitivity check in the first place. If we're going to check for all oddities of all potential build platforms, we'll end up having quite a huge configure script. It can't be too much to ask from people to read the mini ReadMe.
comment:5 by , 15 years ago
Cc: | added |
---|
follow-up: 7 comment:6 by , 15 years ago
There aren't so many oddities, and putting the sources on the wrong file system is worth a check IMO. In any case, the generic check is preferred over the specific one.
comment:7 by , 15 years ago
Replying to axeld:
There aren't so many oddities, and putting the sources on the wrong file system is worth a check IMO.
Sounds no more worth to me than checking whether the FS supports symlinks. Or checking whether xattrs are really supported (and don't have a too small size limit), when --use-xattr is given. Or whether make is GNU make and readlink is GNU readlink. Or whether cdrecord is really cdrecord. Or whether all the tools used by the build system have an acceptable version (we do that for yasm already). With all those OSs out there that can potentially serve as build platforms I'm sure there are a lot of oddities we could check for.
And while I agree that things that silently cause a broken Haiku to be created (like using the wrong cross-compiler) definitely make sense to be checked, anything mentioned in the ReadMe that just breaks building is nothing that really needs to be checked IMHO.
follow-up: 9 comment:8 by , 15 years ago
Good point, you managed to convince me, at least :-)
But a check whether the xattr support is sufficient or not still sounds like a good idea, since that's something you won't notice during build, or do you?
comment:9 by , 15 years ago
Replying to axeld:
But a check whether the xattr support is sufficient or not still sounds like a good idea, since that's something you won't notice during build, or do you?
You do indeed. The build fails at the point where an attribute is written that doesn't fit anymore. The failing command is mimeset, I believe, and the error is something like "Disk/device full". So it's relatively obvious what the problem is.
comment:10 by , 14 years ago
patch: | → 1 |
---|
comment:11 by , 13 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Given the points presented in the comments, marking this as invalid.
Indeed since the diskutil invocation is pretty slow, always doing the manual check would probably be more sensible. Also this way it could be used on other platforms as well.