Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Apr 2023 20:39:44 -0700
From:      "Simon J. Gerraty" <sjg@juniper.net>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, Current FreeBSD <freebsd-current@freebsd.org>, <sjg@juniper.net>
Subject:   Re: /lib/libc.so.7 vs. __libc_start1@FBSD_1.7 in main [so: 14] recently ?
Message-ID:  <90353.1682307584@kaos.jnpr.net>
In-Reply-To: <5B26AB25-075F-4630-86C1-886E6082CDCF@yahoo.com>
References:  <5B26AB25-075F-4630-86C1-886E6082CDCF.ref@yahoo.com> <5B26AB25-075F-4630-86C1-886E6082CDCF@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Millard <marklmi@yahoo.com> wrote:
> I will not get into why, but I executed a git built for 1400082
> in a 1400081 world context and got what was to me a surprise,
> given that /lib/libc.so.7 is part of 13.2-RELEASE :
> 
> ld-elf.so.1: /usr/local/bin/git: Undefined symbol "__libc_start1@FBSD_1.7"

This is a symptom of trying to run a prog built for target on a host
which is not the same.

I hit this a lot recently while updating Makefile.depend files for
userland.

There are a number of makefiles (eg for sh, csh, awk) which need to run
a tool on the host to generate something.
When trying to build 14.0 on a 13.1 host each of those tools failed with
the above issue until actually built for the host.

AFAIK the non-DIRDEPS_BUILD build does a separate pass through the tree
to do the target build-tools to build these things.

The DIRDEPS_BUILD uses a pseudo MACHINE "host" to deal with such things,
ideally those tools would be built in a subdirectory of sh, csh etc, so
that one can choose to build only that tool if desired - sometimes you
want to build the app (eg awk) for the host as well but usually not.

--sjg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90353.1682307584>