Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2015 14:10:49 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org>
Subject:   Re: head/kerberos5/lib/libkrb5/Makefile vs. it finding /usr/obj/usr/src/tmp/usr/lib/libprivateheimipcc.so
Message-ID:  <6AA244B9-DE60-4D8B-A08E-AADD73F9D856@dsl-only.net>
In-Reply-To: <01BA3FF2-F362-48FA-B9E2-112E05CC00ED@dsl-only.net>
References:  <01BA3FF2-F362-48FA-B9E2-112E05CC00ED@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2015-Nov-24, at 7:49 AM, Mark Millard <markmi at dsl-only.net> wrote:

> I had been away from the PowerMac's that I have access to for more =
than 5 months. When I tried my prior rebuild procedure to get from:
>=20
> # freebsd-version -ku; uname -aKU
> 11.0-CURRENT
> 11.0-CURRENT
> FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #12 r281630M: Sat =
Apr 18 01:15:13 PDT 2015     =
root@FBSDG5C0:/usr/obj/usr/src/sys/GENERIC64vtsc-NODEBUG  powerpc =
1100070 1100070
>=20
> to:
>=20
> # svnlite info /usr/src
> Path: /usr/src
> Working Copy Root Path: /usr/src
> URL: https://svn0.us-west.freebsd.org/base/head
> Relative URL: ^/head
> Repository Root: https://svn0.us-west.freebsd.org/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 291085
> Node Kind: directory
> Schedule: normal
> Last Changed Author: cem
> Last Changed Rev: 291085
> Last Changed Date: 2015-11-19 11:53:19 -0800 (Thu, 19 Nov 2015)
>=20
> it stopped based on:
>=20
> --- libkrb5.so.11.full ---
> /usr/local/bin/powerpc64-freebsd-ld: cannot find -lprivateheimipcc
> collect2: error: ld returned 1 exit status
> *** [libkrb5.so.11.full] Error code 1
>=20
> make[4]: stopped in /usr/src/kerberos5/lib/libkrb5
> 1 error
> . . .
>=20
> That was from the command:
>=20
> --- libkrb5.so.11.full ---
> building shared library libkrb5.so.11
> /usr/local/bin/powerpc64-portbld-freebsd11.0-gcc -Wl,--no-undefined =
-Wl,--version-script=3D/usr/src/kerberos5/lib/libkrb5/../../../crypto/heim=
dal/lib/krb5/version-script.map -fstack-protector-strong -shared -Wl,-x =
-Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o libkrb5.so.11.full =
-Wl,-soname,libkrb5.so.11  `NM=3D'/usr/local/powerpc64-freebsd/bin/nm' =
NMFLAGS=3D'' lorder acache.So acl.So add_et_list.So addr_families.So =
aname_to_localname.So appdefault.So asn1_glue.So auth_context.So =
build_ap_req.So build_auth.So cache.So changepw.So codec.So =
config_file.So constants.So context.So convert_creds.So =
copy_host_realm.So crc.So creds.So crypto-aes.So crypto-algs.So =
crypto-arcfour.So crypto-des-common.So crypto-des.So crypto-des3.So =
crypto-evp.So crypto-null.So crypto-pk.So crypto-rand.So crypto.So =
data.So deprecated.So digest.So doxygen.So eai_to_heim_errno.So =
error_string.So expand_hostname.So expand_path.So fcache.So free.So =
free_host_realm.So generate_seq_number.So generate_subkey.So =
get_addrs.So get_cred.So get_default_principal.So get_default_realm.So =
get_for_creds.So get_host_realm.So get_in_tkt.So get_port.So =
init_creds.So init_creds_pw.So kcm.So keyblock.So keytab.So =
keytab_any.So keytab_file.So keytab_keyfile.So keytab_memory.So =
krbhst.So kuserok.So log.So mcache.So misc.So mit_glue.So mk_error.So =
mk_priv.So mk_rep.So mk_req.So mk_req_ext.So mk_safe.So n-fold.So =
net_read.So net_write.So pac.So padata.So pcache.So pkinit.So plugin.So =
principal.So prog_setup.So prompter_posix.So rd_cred.So rd_error.So =
rd_priv.So rd_rep.So rd_req.So rd_safe.So read_message.So recvauth.So =
replay.So salt-aes.So salt-arcfour.So salt-des.So salt-des3.So salt.So =
scache.So send_to_kdc.So sendauth.So set_default_realm.So =
sock_principal.So store-int.So store.So store_emem.So store_fd.So =
store_mem.So ticket.So time.So transited.So verify_init.So =
verify_user.So version.So warn.So write_message.So heim_err.So =
k524_err.So krb5_err.So krb_err.So | tsort -q`  -lasn1  -lcom_err  =
-lcrypt  -lcrypto  -lhx509  -lroken  -lwind  -lheimbase =
-lprivateheimipcc
>=20
> where
>=20
> # ls -al /usr/obj/usr/src/tmp/usr/lib/libprivateh*
> -rwxr-xr-x  1 root  wheel  11398 Nov 23 22:54 =
/usr/obj/usr/src/tmp/usr/lib/libprivateheimipcc.a
> lrwxr-xr-x  1 root  wheel     24 Nov 23 22:54 =
/usr/obj/usr/src/tmp/usr/lib/libprivateheimipcc.so -> =
libprivateheimipcc.so.11
> -rwxr-xr-x  1 root  wheel  17736 Nov 23 22:54 =
/usr/obj/usr/src/tmp/usr/lib/libprivateheimipcc.so.11
>=20
> Note the lack of -L's or anything indicating to look in =
/usr/obj/usr/src/tmp/usr/lib/ and note  below that LDFLAGS and LIBADD in =
head/kerberos5/lib/libkrb5/Makefile override whatever might be in =
/etc/src.conf (via use of plain "=3D"):
>=20
> # $FreeBSD: head/kerberos5/lib/libkrb5/Makefile 275087 2014-11-25 =
22:43:17Z bapt $
>=20
> LIB=3D    krb5
> LDFLAGS=3D        -Wl,--no-undefined
> VERSION_MAP=3D ${KRB5DIR}/lib/krb5/version-script.map
> LIBADD=3D asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc
> . . .
>=20
> That seems to leave only SSP_CFLAGS in head/share/mk/bsd.lib.mk as a =
place for indicating to look in /usr/obj/usr/src/tmp/usr/lib/ (more use =
of just "=3D"):
>=20
>=20
> #       from: @(#)bsd.lib.mk    5.26 (Berkeley) 5/2/91
> # $FreeBSD: head/share/mk/bsd.lib.mk 291046 2015-11-19 00:45:36Z =
bdrewery $
> #
> . . .
> .if defined(LIB_CXX)
> LIB=3D    ${LIB_CXX}
> _LD=3D    ${CXX}
> .else
> _LD=3D    ${CC}
> .endif
> . . .
> SOLINKOPTS=3D     -shared -Wl,-x
> .if !defined(ALLOW_SHARED_TEXTREL)
> .if defined(LD_FATAL_WARNINGS) && ${LD_FATAL_WARNINGS} =3D=3D "no"
> SOLINKOPTS+=3D    -Wl,--no-fatal-warnings
> .else
> SOLINKOPTS+=3D    -Wl,--fatal-warnings
> .endif
> SOLINKOPTS+=3D    -Wl,--warn-shared-textrel
> .endif
> . . .
> ${SHLIB_NAME_FULL}: ${SOBJS}
>        @${ECHO} building shared library ${SHLIB_NAME}
>        @rm -f ${SHLIB_NAME} ${SHLIB_LINK}
> .if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld)
>        @${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK}
> .endif
>        ${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
>            -o ${.TARGET} -Wl,-soname,${SONAME} \
>            `NM=3D'${NM}' NMFLAGS=3D'${NMFLAGS}' lorder ${SOBJS} | =
tsort -q` ${LDADD}
> .if ${MK_CTF} !=3D "no"
>        ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
> .endif
> . . .
>=20
>=20

In my note I should have also reported the make command (powerpc64 host =
CROSS_TOOLCHAIN based self-cross-build) and related material:

make -j 8 CROSS_TOOLCHAIN=3Dpowerpc64-gcc \
WITH_LIBCPLUSPLUS=3D \
WITHOUT_CLANG_BOOTSTRAP=3D WITH_CLANG=3D WITH_CLANG_IS_CC=3D \
WITH_LLDB=3D \
WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D WITHOUT_GNUCXX=3D \
WITHOUT_BOOT=3D \
WITH_LIB32=3D \
buildworld buildkernel \
KERNCONF=3DGENERIC64vtsc-NODEBUG \
TARGET=3Dpowerpc TARGET_ARCH=3Dpowerpc64

and also that the powerpc64-gcc involved still dates back to the 4.9.1 =
days. It was just a quick attempt to see if I could build the modern =
11.0-CURRENT materials while I happen to be around the PowerMacs for a =
bit.

/etc/src.conf had:

WITH_DEBUG=3D
WITH_DEBUG_FILES=3D
MALLOC_PRODUCTION=3D
CC=3D/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc
CXX=3D/usr/local/bin/powerpc64-portbld-freebsd11.0-g++
CPP=3D/usr/local/bin/powerpc64-portbld-freebsd11.0-cpp
CROSS_BINUTILS_PREFIX=3D/usr/local/powerpc64-freebsd/bin/
X_COMPILER_TYPE=3Dgcc
DEPFLAGS+=3D-isystem /usr/obj/usr/src/tmp/usr/include/. =
-I/usr/obj/usr/src/tmp/usr/include/c++/v1/. -I
/usr/include/c++/v1/.
CFLAGS+=3D-isystem /usr/obj/usr/src/tmp/usr/include/. =
-L/usr/obj/usr/src/tmp/usr/lib/. -L/usr/obj/usr/
src/tmp/usr/lib/lib32/.
CXXFLAGS+=3D-isystem /usr/obj/usr/src/tmp/usr/include/. =
-I/usr/obj/usr/src/tmp/usr/include/c++/v1/. -s
td=3Dgnu++11 -L/usr/obj/usr/src/lib/libc++/. =
-L/usr/obj/usr/src/lib32/usr/lib/lib32/.

This is a hack for a powerpc64 self-hosted cross-toolchain-based =
build-for-self but I had been using it back in April and before. That =
suggests that libprivateheimipcc.so's handling changed such that it is =
no longer found automatically for such a context. (Or it did not used to =
be involved at all --I've not checked.)


=3D=3D=3D
Mark Millard
markmi at dsl-only.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6AA244B9-DE60-4D8B-A08E-AADD73F9D856>