Opened 11 years ago
Closed 11 years ago
#10028 closed bug (fixed)
Make master build on Mac OS X again after PM-merge
Reported by: | nielx | Owned by: | bonefish |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Build System | Version: | R1/alpha4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
There are several build problems on Mac OS X 10.8. I will try to resolve those and add patches as I go along.
Attachments (10)
Change History (26)
by , 11 years ago
Attachment: | 0001-shasum-a-256-is-an-alternative-for-sha256-on-Mac-OS-.patch added |
---|
comment:1 by , 11 years ago
patch: | 0 → 1 |
---|
by , 11 years ago
Attachment: | 0002-The-sed-on-Mac-OS-X-does-not-have-the-gnu-compatible.patch added |
---|
by , 11 years ago
Attachment: | 0003-Set-defines-for-Mac-OS-X-so-that-libsolv-can-be-buil.patch added |
---|
by , 11 years ago
Attachment: | 0004-Mac-OS-X-does-not-support-weakref-symbols.patch added |
---|
by , 11 years ago
Attachment: | 0005-Add-HOST_LIBSUPC-to-fix-compilation-on-MacOS-X.patch added |
---|
follow-up: 5 comment:3 by , 11 years ago
Thanks for the review. I will work on 0002 and 0004 a bit more. In the mean time I get another build error. Do you have any pointers for me?
The error is:
BuildHaikuPackage1 /Volumes/Haiku_Build/build-gcc2/objects/haiku/x86_gcc2/packaging/packages/haiku.hpkg haiku.hpkg: Removing and re-creating package contents dir ... haiku.hpkg: Collecting package contents ... haiku.hpkg: mimeset'ing package contents ... haiku.hpkg: Creating the package ... Failed to stat attribute "BEOS:TYPE" of file "data/mime_db/audio/ac3": Unknown error: -2147459062 /Volumes/Haiku_Build/haiku-trunk/build/scripts/build_haiku_package "/Volumes/Haiku_Build/build-gcc2/objects/haiku/x86_gcc2/packaging/packages/haiku.hpkg" "/Volumes/Haiku_Build/build-gcc2/objects/haiku/x86_gcc2/packaging/packages_build/hpkg_-haiku.hpkg/haiku-package-info" /Volumes/Haiku_Build/build-gcc2/objects/haiku/x86_gcc2/packaging/packages_build/hpkg_-haiku.hpkg/scripts/haiku.package-init-vars /Volumes/Haiku_Build/build-gcc2/objects/haiku/x86_gcc2/packaging/packages_build/hpkg_-haiku.hpkg/scripts/haiku.package-make-dirs /Volumes/Haiku_Build/build-gcc2/objects/haiku/x86_gcc2/packaging/packages_build/hpkg_-haiku.hpkg/scripts/haiku.package-copy-files /Volumes/Haiku_Build/build-gcc2/objects/haiku/x86_gcc2/packaging/packages_build/hpkg_-haiku.hpkg/scripts/haiku.package-extract-files
comment:4 by , 11 years ago
Regarding 0004
Interestingly though that one does not produce any errors during build. Any guess on why that may be?
follow-up: 6 comment:5 by , 11 years ago
Replying to nielx:
Failed to stat attribute "BEOS:TYPE" of file "data/mime_db/audio/ac3": Unknown error: -2147459062
The error code translates to B_NO_MORE_FDS
. Maybe we're leaking FDs somewhere. Which attribute emulation do you use?
Replying to nielx:
Regarding 0004
Interestingly though that one does not produce any errors during build. Any guess on why that may be?
It would fail later in the build_haiku_image script when the package dependencies are resolved. That's the first time the code is executed.
comment:6 by , 11 years ago
Replying to bonefish:
Replying to nielx:
Failed to stat attribute "BEOS:TYPE" of file "data/mime_db/audio/ac3": Unknown error: -2147459062The error code translates to
B_NO_MORE_FDS
. Maybe we're leaking FDs somewhere. Which attribute emulation do you use?
The default (not xattr). I will try a build with xattr now.
comment:7 by , 11 years ago
Definitively leaking. The output with xattr is:
Failed to open entry "data/mime_db/message/rfc822": Unknown error: -1
I will dive into dtrace and the source to see what happens.
comment:8 by , 11 years ago
I had a quick look with strace on Linux and could see anything suspicious in this respect.
Assuming the issue still occurs when building "haiku.hpkg", you can just do a jam -q haiku.hpkg
. The actual invocation of the package
command happens at the end of "build/scripts/build_haiku_package".
comment:9 by , 11 years ago
I did a check and it seems like there are a large number of DIR fds open. See the log.
I also checked the ulimit -Sn, which is set to 256. Increasing the limit to 1024 has worked and Haiku is building.
So the question is:
- Is the limit on OS X too small and should the user change this?
- Should
package
anticipate this and under certain conditions raise the soft limit? - Or is
package
too careless about the resources?
comment:10 by , 11 years ago
patch: | 1 → 0 |
---|
by , 11 years ago
Attachment: | 0001-Always-use-dlopen-and-dlsym-to-load-libsolv.patch added |
---|
comment:11 by , 11 years ago
patch: | 0 → 1 |
---|
by , 11 years ago
Attachment: | 0002-Add-HOST_LIBSUPC-to-fix-compilation-on-MacOS-X.patch added |
---|
by , 11 years ago
Attachment: | 0003-Determine-how-to-invoke-sed-with-extended-regexp.patch added |
---|
comment:12 by , 11 years ago
I added three patches; two are improvements over the previous added patches, one is another fix later on in the build process.
About 0003: The line in FileRules exceeds the maximum amount of characters. I am unsure how to properly break that line, I could not find any examples in the rest of the file. Any suggestions? Also, could you please look closely at the configure changes? I am not experienced in shell scripting.
by , 11 years ago
Attachment: | 0001-libroot_build-fs_darwin-fdopendir-close-FD-on-succes.patch added |
---|
comment:13 by , 11 years ago
Regarding the many open directory file descriptors, I think I found the leak in our libroot_build fdopendir()
emulation. I've attached a patch. Please give it a try.
The patches look good. In 0003 I would break the line before the "|" (and escape the line break with "\").
comment:14 by , 11 years ago
I tested it and it works indeed. Mind if I push all four patches (including the cleaned up 0003)?
0001, 0003, and 0005 look and can be applied.
Regarding 0002:
HOST_EXTENDED_REGEX_SED
(= "sed -r" / "sed -E") build variable provided by "configure", so there that platform checks can be avoided in the actions.Regarding 0004: