Hi Fabian,

OK, so I decided to bootstrap a new prefix instance. So far, so good. I
guess, bootstrap process has already started stage2.

Besides, apparently High Sierra developers do not allow anymore using ftp,
due to safety concerns [1]. Therefore, I suggest revisiting the bootstrap
guide [2] and include in the bootstrap-bash.sh script the option to use
curl, if ftp is not available. Attached a slightly modified version, for
your consideration.

Cheers,

[1] https://discussions.apple.com/thread/8093031
[2] https://wiki.gentoo.org/wiki/Project:Prefix/Bootstrap

--
Askar Bektassov (Аскар Бектасов)
Sent from webmail

For more info, LinkedIn <http://www.linkedin.com/in/askarbektassov>

On Thu, Mar 8, 2018 at 10:36 AM, Askar Bektassov (Аскар Бектасов) <
askar.bektas...@gmail.com> wrote:

> I am afraid not, or at least did not work by merely selecting back 15
> profile. I guess because some packages may have been already recompiled
> and merged.
>
> Good reason to always keep a backup :P
>
> --
> Askar Bektassov (Аскар Бектасов)
> Sent from webmail
>
> For more info, LinkedIn <http://www.linkedin.com/in/askarbektassov>
>
> On Thu, Mar 8, 2018 at 10:32 AM, Fabian Groffen <grob...@gentoo.org>
> wrote:
>
>> Ah, I see.  Perhaps if eselect lets you move back to a 15 profile, you
>> unbrick your prefix as well.
>>
>> On 08-03-2018 10:20:04 +0100, Askar Bektassov (Аскар Бектасов) wrote:
>> > Hi Fabian,
>> >
>> > Eventually that is what happened. I did not change CHOST by hand, but
>> neither
>> > did I investigate what "eselect profile set" entails. I just assumed it
>> would be
>> > safe following [1]https://wiki.gentoo.org/wiki/Upgrading_Gentoo
>> >
>> > [quote]
>> >
>> > Releases with profile changes
>> >
>> > If a release (such as 13.0 for x86) introduces a new profile, then
>> there is the
>> > choice to migrate to the new profile.
>> >
>> > Generally, such migrations are not mandatory, and systems can continue
>> to use
>> > the old profile - just update the packages as [2]explained in the Gentoo
>> > Handbook.
>> >
>> > However, Gentoo strongly recommends updating the profile if it becomes
>> > deprecated. When this happens, it means that Gentoo developers no
>> longer plan on
>> > supporting it.
>> >
>> > [...]
>> >
>> > Profile updating instructions
>> >
>> > General instructions
>> >
>> >  Important
>> > Make sure the main Gentoo repository (the Portage tree) has been synced
>> before
>> > performing any profile changes.
>> >
>> > First, run emerge eselect. The eselect utility makes viewing and
>> selecting
>> > profiles easy, without needing to create or remove symlinks by hand.
>> >
>> > root #eselect profile list
>> >
>> > root #eselect profile set <number>
>> >
>> > [unquote]
>> >
>> > No issues though, I can recover the snapshot from couple of weeks ago,
>> or so.
>> >
>> > Thanks again,
>> >
>> > --
>> > Askar Bektassov (Аскар Бектасов)
>> >
>> > Sent from webmail
>> >
>> > For more info, [3]LinkedIn
>> >
>> > On Thu, Mar 8, 2018 at 9:18 AM, Fabian Groffen <[4]grob...@gentoo.org>
>> wrote:
>> >
>> > > Your CHOST is not matching.  Did you update CHOST and start
>> recompiling
>> > > things?  This breaks obviously.  You can't upgrade like that, you'll
>> > > have to re-bootstrap.
>> >
>> > > Fabian
>> >
>> > > On 07-03-2018 22:41:24 +0100, Askar Bektassov (Аскар Бектасов) wrote:
>> > > > Fabian,
>> > > >
>> > > > askarbektassov@Askars-iMac ~ $ ld -V
>> > > >
>> > > > ld: BINUTILS_CONFIG_LD not found in environment
>> > > >
>> > > > ld: linker not found in PATH
>> > > >
>> > > > ld:
>> > > /Users/askarbektassov/Gentoo/etc/env.d/binutils/config-x86_6
>> 4-apple-darwin15
>> > > > defines CURRENT=8.2.1
>> > > >
>> > > > ld: trying from
>> > > >
>> > > /Users/askarbektassov/Gentoo/etc/env.d/binutils/config-x86_6
>> 4-apple-darwin15:
>> > > > /Users/askarbektassov/Gentoo/usr/x86_64-apple-darwin15/binut
>> ils-bin/8.2.1/ld
>> > > >
>> > > > ld: linker not found via
>> > > > /Users/askarbektassov/Gentoo/etc/env.d/binutils/config-x86_6
>> 4-apple-darwin15
>> > > >
>> > > > ld: trying from binutils-config -c x86_64-apple-darwin15:
>> > > > /Users/askarbektassov/Gentoo/usr/x86_64-apple-darwin15/binut
>> ils-bin/8.2.1/ld
>> > > >
>> > > > ld: linker not found via binutils-config -c x86_64-apple-darwin15
>> > > >
>> > > > ld: failed to locate the real ld!
>> > > >
>> > > > askarbektassov@Askars-iMac ~ $ cd Gentoo/usr/
>> > > >
>> > > > askarbektassov@Askars-iMac ~/Gentoo/usr $ ls x86_64-apple-darwin1*
>> > > >
>> > > > x86_64-apple-darwin15:
>> > > >
>> > > > bin  lib
>> > > >
>> > > > x86_64-apple-darwin17:
>> > > >
>> > > > bin  binutils-bin  lib
>> > > >
>> > > > askarbektassov@Askars-iMac ~/Gentoo/usr $ binutils-config -l
>> > > >
>> > > >  [1] x86_64-apple-darwin17-8.2.1 *
>> > > >
>> > > > askarbektassov@Askars-iMac ~/Gentoo/usr $ binutils-config -c
>> > > >
>> > > > x86_64-apple-darwin15-8.2.1
>> > > >
>> > > > askarbektassov@Askars-iMac ~/Gentoo/usr $ eselect profile list
>> > > >
>> > > > Available profile symlink targets:
>> > > >
>> > > >   [1]   gentoo_prefix:prefix/darwin/macos/10.5/x64 (dev)
>> > > >
>> > > >   [2]   gentoo_prefix:prefix/darwin/macos/10.6/x64 (dev)
>> > > >
>> > > >   [3]   gentoo_prefix:prefix/darwin/macos/10.7/x64 (dev)
>> > > >
>> > > >   [4]   gentoo_prefix:prefix/darwin/macos/10.8/x64 (dev)
>> > > >
>> > > >   [5]   gentoo_prefix:prefix/darwin/macos/10.9/x64 (dev)
>> > > >
>> > > >   [6]   gentoo_prefix:prefix/darwin/macos/10.10/x64 (dev)
>> > > >
>> > > >   [7]   gentoo_prefix:prefix/darwin/macos/10.11/x64 (dev) *
>> > > >
>> > > >   [8]   gentoo_prefix:prefix/darwin/macos/10.12/x64 (dev)
>> > > >
>> > > >   [9]   gentoo_prefix:prefix/darwin/macos/10.13/x64 (dev)
>> > > >
>> > > > askarbektassov@Askars-iMac ~/Gentoo/usr $ eselect profile set 9
>> > > >
>> > > > askarbektassov@Askars-iMac ~/Gentoo/usr $ ld -V
>> > > >
>> > > > ld: BINUTILS_CONFIG_LD not found in environment
>> > > >
>> > > > ld: linker not found in PATH
>> > > >
>> > > > ld:
>> > > /Users/askarbektassov/Gentoo/etc/env.d/binutils/config-x86_6
>> 4-apple-darwin15
>> > > > defines CURRENT=8.2.1
>> > > >
>> > > > ld: trying from
>> > > >
>> > > /Users/askarbektassov/Gentoo/etc/env.d/binutils/config-x86_6
>> 4-apple-darwin15:
>> > > > /Users/askarbektassov/Gentoo/usr/x86_64-apple-darwin15/binut
>> ils-bin/8.2.1/ld
>> > > >
>> > > > ld: linker not found via
>> > > > /Users/askarbektassov/Gentoo/etc/env.d/binutils/config-x86_6
>> 4-apple-darwin15
>> > > >
>> > > > ld: trying from binutils-config -c x86_64-apple-darwin15:
>> > > > /Users/askarbektassov/Gentoo/usr/x86_64-apple-darwin15/binut
>> ils-bin/8.2.1/ld
>> > > >
>> > > > ld: linker not found via binutils-config -c x86_64-apple-darwin15
>> > > >
>> > > > ld: failed to locate the real ld!
>> > > >
>> > > > askarbektassov@Askars-iMac ~/Gentoo/usr $ binutils-config -c
>> > > >
>> > > > x86_64-apple-darwin17-8.2.1
>> > > >
>> > > > So, uhm... does it mean that I indeed messed up something with the
>> profile?
>> > > >
>> > > > --
>> > > > Askar Bektassov (Аскар Бектасов)
>> > > >
>> > > > Sent from webmail
>> > > >
>> >
>> > > > For more info, [1]LinkedIn
>> > > >
>> > > > On Wed, Mar 7, 2018 at 9:17 AM, Fabian Groffen <[2][5]
>> grob...@gentoo.org>
>> > > wrote:
>> > > >
>> > > > > what happens if you run:
>> > > > > % ld -V
>> > > >
>> > > > > On 06-03-2018 22:31:51 +0100, Askar Bektassov wrote:
>> > > > > > Hi Fabian,
>> > > > > >
>> > > > > > I do not recall changing make.conf file, before I started
>> getting
>> > > issues,
>> > > > > which seem to have exhibited after my last “emerge world -uDN”.
>> > > > > >
>> > > > > > At that time, I upgraded llvm/clang 3.9.1 to 5.0.1 and I
>> remember I run
>> > > into
>> > > > > some blocking packages. After a bit of tinkering, the thing just
>> worked.
>> > > > > However, as soon the upgrade completed, I had the bright idea of
>> upgrading
>> > > the
>> > > > > profile with eselect.
>> > > > > >
>> > > > > > Then, the mystery. I might have run couple of times “emerge
>> world -uDN”
>> > > > > without encountering problems, but then at certain point emerge
>> started
>> > > > > complaining about the missing compiler. If nothing works, I can
>> recover
>> > > the
>> > > > > last working prefix from time machine and try the upgrade once
>> again.
>> > > > > >
>> > > > > > Below, my current make.conf file.
>> > > > > >
>> > > > > > Askars-iMac:portage askarbektassov$ cat make.conf
>> > > > > > # System compiler on Darwin Prefix is Clang, do not remove this
>> > > > > > #CC=x86_64-apple-darwin15-clang
>> > > > > > #CXX=x86_64-apple-darwin15-clang++
>> > > > > > #BUILD_CC=x86_64-apple-darwin15-clang
>> > > > > > #BUILD_CXX=x86_64-apple-darwin15-clang++
>> > > > > >
>> > > > > > # As per [3][6]grob...@gentoo.org suggestion on 27/02/2018
>> > > > > > CC=${CHOST}-clang
>> > > > > > CXX=${CHOST}-clang++
>> > > > > > BUILD_CC=${CHOST}-clang
>> > > > > > BUILD_CXX=${CHOST}-clang++
>> > > > > >
>> > > > > > # Added by bootstrap-prefix.sh for x86_64-apple-darwin15
>> > > > > > USE="unicode nls"
>> > > > > > CFLAGS="${CFLAGS} -O2 -pipe"
>> > > > > > CXXFLAGS="${CFLAGS}"
>> > > > > > MAKEOPTS="-j5"
>> > > > > > CONFIG_SHELL="/Users/askarbektassov/Gentoo/bin/bash"
>> > > > > >
>> > > > > > # This disables /usr-split, removing this will break
>> > > > > > PREFIX_DISABLE_GEN_USR_LDSCRIPT=yes
>> > > > > > Askars-iMac:portage askarbektassov$
>> > > > > > --
>> > > > > > Askar Bektassov (Аскар Бектасов)
>> > > > > > Sent from tablet, please excuse my brevity and typos
>> > > > > >
>> >
>> > > > > > > On 4 Mar 2018, at 21:34, Fabian Groffen <[4][7]
>> grob...@gentoo.org>
>> > > wrote:
>> > > > > > >
>> > > > > > >> On 04-03-2018 21:26:45 +0100, Askar Bektassov (Аскар
>> Бектасов) wrote:
>> > > > > > >> Hi Fabian,
>> > > > > > >>
>> > > > > > >> Sorry for late reply. I changed make.conf as suggested, but
>> still no
>> > > > > luck.
>> > > > > > >>
>> > > > > > >> I observe that in the $EPREFIX/usr/lib/llvm/5/bin folder I
>> only have
>> > > > > symlinks
>> > > > > > >> to x86_64-apple-darwin15-clang* files. So, I assume that
>> unless I
>> > > change
>> > > > > the
>> > > > > > >> symlinks, I am bound to use x86_64-apple-darwin15-clang*
>> compiler. As
>> > > a
>> > > > > side
>> > > > > > >> note, I tried installing gcc-apple as well, but it fails
>> during
>> > > > > configuration,
>> > > > > > >> complaining about ld.
>> > > > > > >
>> > > > > > > On macOS, you MUST use clang.  If you don't use it, you're on
>> your
>> > > own.
>> > > > > > > Many of the system headers can only be used with recent Clang.
>> > > > > > >
>> > > > > > >> askarbektassov@Askars-iMac ~/Gentoo/usr/lib/llvm/5/bin $
>> emerge
>> > > gcc-apple
>> > > > > > >
>> > > > > > >> gcc-config > .gcc-config
>> > > > > > >>
>> > > > > > >> x86_64-apple-darwin15-clang -march=native -O2 -pipe -Wall
>> -Wextra
>> > > > > > >> '-DEPREFIX="/Users/askarbektassov/Gentoo"'
>> -Wl,-dead_strip_dylibs
>> > > > > wrapper.c
>> > > > > > >>  -o wrapper
>> > > > > > >>
>> > > > > > >> chmod a+rx .gcc-config
>> > > > > > >>
>> > > > > > >> wrapper.c:281:14: warning: unused parameter 'argc'
>> > > [-Wunused-parameter]
>> > > > > > >>
>> > > > > > >> int main(int argc, char *argv[])
>> > > > > > >>
>> > > > > > >>              ^
>> > > > > > >>
>> > > > > > >> 1 warning generated.
>> > > > > > >>
>> > > > > > >> ld: failed to locate the real ld!
>> > > > > > >
>> > > > > > > Did you, or did you not change something in your make.conf?
>> If so,
>> > > what
>> > > > > > > exactly did you change?  I suspect you changed something
>> vital.
>> > > > > > >
>> > > > > > > Fabian
>> > > > > > >
>> > > > > > > --
>> > > > > > > Fabian Groffen
>> > > > > > > Gentoo on a different level
>> > > > > >
>> > > >
>> > > > > --
>> > > > > Fabian Groffen
>> > > > > Gentoo on a different level
>> > > >
>> > > >
>> > > >
>> >
>> > > >  References:
>> > > >    1. [8]http://www.linkedin.com/in/askarbektassov
>> > > >    2. mailto:[9]grob...@gentoo.org
>> > > >    3. mailto:[10]grob...@gentoo.org
>> > > >    4. mailto:[11]grob...@gentoo.org
>> > > >
>> > > > read_char: errno==EILSEQ; invalid byte sequence for UTF-8:
>> >
>> > > --
>> > > Fabian Groffen
>> > > Gentoo on a different level
>> >
>> >
>> >
>> >  References:
>> >    1. https://wiki.gentoo.org/wiki/Upgrading_Gentoo
>> >    2. https://wiki.gentoo.org/wiki/Handbook:X86/Working/Portage
>> >    3. http://www.linkedin.com/in/askarbektassov
>> >    4. mailto:grob...@gentoo.org
>> >    5. mailto:grob...@gentoo.org
>> >    6. mailto:grob...@gentoo.org
>> >    7. mailto:grob...@gentoo.org
>> >    8. http://www.linkedin.com/in/askarbektassov
>> >    9. mailto:grob...@gentoo.org
>> >   10. mailto:grob...@gentoo.org
>> >   11. mailto:grob...@gentoo.org
>> >
>> > read_char: errno==EILSEQ; invalid byte sequence for UTF-8:
>> --
>> Fabian Groffen
>> Gentoo on a different level
>>
>
>
#!/bin/sh
# Copyright 2006-2018 Gentoo Foundation; Distributed under the GPL v2

# bash installer
#
#  POSIX (?) /bin/sh which doesn't eat most of the stuff in the
# bootstrap-prefix script, among which the most important part:
# dynamic function calling.  So, we need to bootstrap bash outside the
# bootstrap script, which is the purpose of this script.

[ -z "$1" ] && exit -1

mkdir -p "$1"
cd "$1"
mkdir bash-build
cd bash-build

GENTOO_MIRRORS=${GENTOO_MIRRORS:="http://distfiles.gentoo.org"}
FILE=bash-4.2.tar.gz

eerror() { echo "!!! $*" 1>&2; }
einfo() { echo "* $*"; }

# Try to find a download manager, we only deal with wget,
# curl, FreeBSD's fetch and ftp.
if [[ x$(type -t wget) == "xfile" ]] ; then
	FETCH_COMMAND="wget"
	[[ $(wget -h) == *"--no-check-certificate"* ]] && FETCH_COMMAND+=" --no-check-certificate"
elif [[ x$(type -t curl) == "xfile" ]] ; then
	einfo "WARNING: curl doesn't fail when downloading fails, please check its output carefully!"
	FETCH_COMMAND="curl -f -L -O"
	elif [[ x$(type -t fetch) == "xfile" ]] ; then
	FETCH_COMMAND="fetch"
elif [[ x$(type -t ftp) == "xfile" ]] &&
	[[ ${CHOST} != *-cygwin* || ! $(type -P ftp) -ef $(cygpath -S)/ftp ]] ; then
	FETCH_COMMAND="ftp"
else
	eerror "no suitable download manager found (need wget, curl, fetch or ftp)"
	eerror "could not download ${1##*/}"
	exit 1
fi

# try for mirrors first, then try given location
${FETCH_COMMAND} "${GENTOO_MIRRORS}/distfiles/bash-4.2.tar.gz" < /dev/null
if [[ ! -f ${FILE} ]] ; then
	eerror "downloading ${1} failed!"
	return 1
fi

gzip -d ${FILE}
tar -xf bash-4.2.tar
cd bash-4.2

./configure --prefix="${1}"/usr --disable-nls
make
make install

Reply via email to