icecc / icecream

Distributed compiler with a central scheduler to share build load
GNU General Public License v2.0
1.58k stars 250 forks source link

[macos] icecc-create-env misses some dylibs #509

Closed timblechmann closed 4 years ago

timblechmann commented 4 years ago

on macos 10.14.6 (xcode 10 and 11), it seems that icecc-create-env is missing to bundle come dylibs from the system. the iceccd log on the agent contains:

[66472] 2019-11-14 02:43:17: compiler produced stderr output:
dyld: Library not loaded: /usr/lib/system/libcache.dylib
  Referenced from: /usr/lib/libSystem.B.dylib
  Reason: image not found

i've started bundling (--addfile) one dylib after the other from /usr/lib/system and eventually from /usr/lib/, but ended up bundling all dylibs from those folders in order to get a working build environment (after adding 10ish dylibs manually, i took the shortcut of bundling everything).

nevertheless, i wonder why those dylibs haven't been found automatically, neither when bundling the trampoline executable /usr/bin/clang, nor the clang binary inside xcode.

permcody commented 4 years ago

We are having the same issue. We verified that the two tagged releases before 1.3 work, but 1.3 doesn't seem to work on Mac OS. We've tried different combinations of XCode and Command Line Tools to no avail. Definitely something up with the latest release.

More info: We have a big Mac installation at our site. We have around 20-25 Macs on the Icecream network running a mix of MacOS versions. 1.1 is pretty solid as we've been using it for a few years. We'd like to move to 1.3 to get some of the better "downed client" and "blacklist" scheduler features.

Thanks for the information @timblechmann.

permcody commented 4 years ago

UPDATE: The problem is the icecc-create-env tool itself. We discovered that if we use an environment built with the 1.1 release (using icecc-create-env), it works properly using the latest release.

icecc-create-env is broken on MacOS

HenryMiller1 commented 4 years ago

The main developers of icecc are not macos experts, I don't think any of us even have a Mac to work with. We would encourage one of you to figure this out, it shouldn't be that hard. Only a few changes have been made to icecc-create-env since 1.1 so you should be able to find the offending change quickly and then make a fix that works.

Harder but worth also doing would be get some tests working on the CI system. Right now we have no idea if we have broke macos. If it fails to build we will notice and fix it, but if it builds correctly we assume it will work (which obviously is not a correct)

loganharbour commented 4 years ago

The offending commit for our environment is 3ac9141.

I'll take a look when I have a moment.

permcody commented 4 years ago

It appears that there aren't any tests on either platform (MacOS or Linux)? If that's the case how do you test? It seems like it should be possible to distribute to the loopback address and test the "remote" capabilities of ice cream at least for heterogenous environments.

Icecream is been a heavily used tool at our institution for several years and I would like to see the continued development and enhancement of the product. I'll be curious to hear the answers to my questions above to see if there is a way we can help out.

HenryMiller1 commented 4 years ago

https://github.com/icecc/icecream/tree/master/tests

The test work much like you suggested, run in a loopback environment and verify. They are Linux specific, but I would expect at least some can be made to run on mac easily. -- Henry Miller hank@millerfarm.com

On Wed, Nov 20, 2019, at 8:36 AM, Cody Permann wrote:

It appears that there aren't any tests on either platform (MacOS or Linux)? If that's the case how do you test? It seems like it should be possible to distribute to the loopback address and test the "remote" capabilities of ice cream at least for heterogenous environments.

Icecream is been a heavily used tool at our institution for several years and I would like to see the continued development and enhancement of the product. I'll be curious to hear the answers to my questions above to see if there is a way we can help out.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/icecc/icecream/issues/509?email_source=notifications&email_token=ACHSQEW2YXWGFEHFXIK56LLQUVDOHA5CNFSM4JNFX7AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEESFQYI#issuecomment-556030049, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHSQEUFYSIC6ESFUVC7OZDQUVDOHANCNFSM4JNFX7AA.

llunak commented 4 years ago

Yes, this is my mistake, I incorrectly assumed Mac's otool worked the same way as Linux's ldd.

As for Mac builds, we have a test Mac build at https://travis-ci.org/icecc/icecream too, but it doesn't test everything, because icecream requires chroot capability, and it doesn't work with the current setup. Presumably it could be handled, but as said above we do not have access to an actual Mac machine and doing this by repeated Travis builds would be extremely cumbersome. If you manage to get 'make test' working properly including chroot, you are more than welcome to submit the necessary changes and then our Travis builds will check everything.

ppluciennik commented 4 years ago

Would it be possible to release new version, icecc 1.3 on Mac is unusable?

llunak commented 4 years ago

Yes, sorry. https://github.com/icecc/icecream/releases/tag/1.3.1