Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 609220 - macOS Sierra (10.12.3) bootstrap fails: Library not loaded: libz.so.1.2.6
Summary: macOS Sierra (10.12.3) bootstrap fails: Library not loaded: libz.so.1.2.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal with 1 vote (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 615296 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-13 07:46 UTC by *
Modified: 2017-04-14 14:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
stage1.log (stage1.log.xz,102.87 KB, application/x-xz)
2017-02-13 07:47 UTC, *
Details
stage2.log (stage2.log.xz,564 bytes, application/x-xz)
2017-02-13 07:48 UTC, *
Details
bootstrap-prefix.sh.diff (bootstrap-prefix.sh.diff,1.10 KB, patch)
2017-02-13 18:45 UTC, *
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description * 2017-02-13 07:46:56 UTC
Not sure whether this should go under Bug 598148, but that appears to be a different issue (if it should, feel free to mark this as dup).

I just updated from El Capitan to Sierra (10.12.3), have the latest Xcode (8.2.1) and the latest bootstrap-prefix.sh. The bootstrap fails in stage2, but the first error is actually in stage1:

ImportError: dlopen(/opt/gentoo/var/tmp/python-2.7.3/Python-2.7.3/build/lib.macosx-10.12-x86_64-2.7/binascii.bundle, 2): Library not loaded: libz.so.1.2.6
  Referenced from: /opt/gentoo/var/tmp/python-2.7.3/Python-2.7.3/build/lib.macosx-10.12-x86_64-2.7/binascii.bundle
  Reason: image not found

I do see libz here:
/opt/gentoo/tmp/usr/lib/libz.so.1.2.6

Reproducible: Always

Steps to Reproduce:
./bootstrap-prefix.sh (also tried with LATEST_TREE_YES=1)



$ sha1sum bootstrap-prefix.sh
4ae7c9087c8fbb3a4ee8a86ac7ef874c21bab8e1  bootstrap-prefix.sh
$ xcode-select -p
/Library/Developer/CommandLineTools
$ xcode-select -v
xcode-select version 2347.
Comment 1 * 2017-02-13 07:47:43 UTC
Created attachment 463562 [details]
stage1.log
Comment 2 * 2017-02-13 07:48:07 UTC
Created attachment 463564 [details]
stage2.log
Comment 3 Fabian Groffen gentoo-dev 2017-02-13 11:20:59 UTC
This bug is not related, as it doesn't exhibit the profile problem.

If you still have this bootstrap, can you tell me what the following command reports?

otool -D /opt/gentoo/tmp/usr/lib/libz.so.1.2.6

otool -L /opt/gentoo/var/tmp/python-2.7.3/Python-2.7.3/build/lib.macosx-10.12-x86_64-2.7/binascii.bundle
Comment 4 * 2017-02-13 12:38:18 UTC
/opt/gentoo/tmp/usr/lib/libz.so.1.2.6:
libz.so.1.2.6

/opt/gentoo/var/tmp/python-2.7.3/Python-2.7.3/build/lib.macosx-10.12-x86_64-2.7/binascii.bundle:
    libz.so.1.2.6 (compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
Comment 5 Fabian Groffen gentoo-dev 2017-02-13 14:28:02 UTC
right, so libz is built in the wrong way.  I'm wondering why version 1.2.6, 1.2.11 is in the tree (you mention LATEST_TREE_YES), so where does it come from.
Comment 6 * 2017-02-13 18:44:42 UTC
Thanks for the tip. I think bootstrap_tree may need to appear a little earlier and look for 1.2.11? I made that change to the bootstrap-prefix.sh but then got stuck on Bug 609290.
Comment 7 * 2017-02-13 18:45:31 UTC
Created attachment 463666 [details, diff]
bootstrap-prefix.sh.diff
Comment 8 * 2017-02-19 10:21:48 UTC
With that file uploaded in Bug 609290, and the bootstrap changes in Bug 599200, the bootstrap seems to have finished successfully on my machine. Though I picked up stage3 manually after Bug 599200. Awesome.
Comment 9 Isaac Richter 2017-03-06 18:52:45 UTC
(In reply to Fabian Groffen from comment #5)
> right, so libz is built in the wrong way.  I'm wondering why version 1.2.6,
> 1.2.11 is in the tree (you mention LATEST_TREE_YES), so where does it come
> from.

During stage1, in bootstrap_zlib() we try to grab zlib-1.2.[8765], in that order (newest first). The problem is that only versions 1.2.[56] are available from GENTOO_MIRRORS. Therefore, we don't grab 1.2.8 or 1.2.7. 

Manually grabbing http://www.zlib.net/fossils/zlib-1.2.8.tar.gz, and putting it into $EPREFIX/usr/portage/distfiles seems to solve the problem.

Alternatively, the method proposed by rfc469@gmail.com in https://bugs.gentoo.org/attachment.cgi?id=463666 to just install the latest zlib would probably also work.
Comment 10 Benda Xu gentoo-dev 2017-04-12 08:24:29 UTC
*** Bug 615296 has been marked as a duplicate of this bug. ***
Comment 11 Fabian Groffen gentoo-dev 2017-04-14 06:47:37 UTC
Ok, I've added zlib-1.2.8.tar.gz to the mirrors.  Version 1.2.11 has no benefits except performance I think.  So this should allow to fetch it and compile.

I don't see how creating the portage tree and directories before installing zlib can fix anything.  So if that's necessary, please enlighten me.
Comment 12 * 2017-04-14 14:14:57 UTC
That's unnecessary if 1.2.8 is on the mirrors. I tested again and made it through stage2 until Bug 603012. But I think this bug can be closed. Thanks.
Comment 13 Fabian Groffen gentoo-dev 2017-04-14 14:17:09 UTC
thanks very very much for testing