head/kerberos5/lib/libkrb5/ and libhdb/ not looking in /usr/obj/usr/src/tmp/usr/lib/ for linking

Mark Millard markmi at dsl-only.net
Sun Nov 29 10:03:10 UTC 2015


The following additions of "-L/usr/obj/usr/src/tmp/usr/lib" just illustrate the kind of path that is missing for libkrb5 and libhdb: these additions were sufficient for my context to link. I do not think such hard wired path are appropriate outside such an experiment.


Index: /usr/src/kerberos5/lib/libhdb/Makefile
===================================================================
--- /usr/src/kerberos5/lib/libhdb/Makefile      (revision 291443)
+++ /usr/src/kerberos5/lib/libhdb/Makefile      (working copy)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 LIB=   hdb
-LDFLAGS=       -Wl,--no-undefined ${LDAPLDFLAGS}
+LDFLAGS=       -Wl,--no-undefined ${LDAPLDFLAGS} -L/usr/obj/usr/src/tmp/usr/lib
 VERSION_MAP=   ${KRB5DIR}/lib/hdb/version-script.map
 LIBADD=        asn1 com_err krb5 roken sqlite3
 LDADD= ${LDAPLDADD}
Index: /usr/src/kerberos5/lib/libkrb5/Makefile
===================================================================
--- /usr/src/kerberos5/lib/libkrb5/Makefile     (revision 291443)
+++ /usr/src/kerberos5/lib/libkrb5/Makefile     (working copy)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 LIB=   krb5
-LDFLAGS=       -Wl,--no-undefined
+LDFLAGS=       -Wl,--no-undefined -L/usr/obj/usr/src/tmp/usr/lib
 VERSION_MAP= ${KRB5DIR}/lib/krb5/version-script.map
 LIBADD=        asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc
 


Without those -L/usr/obj/usr/src/tmp/usr/lib additions the results were that the following were not found:

-lprivateheimipcc
and
-lprivatesqlite3

See below:

--- libkrb5.so.11.full ---
building shared library libkrb5.so.11
/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc -Wl,--no-undefined -Wl,--version-script=/usr/src/kerberos5/lib/libkrb5/../../../crypto/heimdal/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  . . .  -lasn1  -lcom_err  -lcrypt  -lcrypto  -lhx509  -lroken  -lwind  -lheimbase -lprivateheimipcc
/usr/local/bin/powerpc64-freebsd-ld: cannot find -lprivateheimipcc
collect2: error: ld returned 1 exit status
*** [libkrb5.so.11.full] Error code 1

and

--- kerberos5/lib/libhdb__L ---
/usr/local/bin/powerpc64-portbld-freebsd11.0-gcc -Wl,--no-undefined  -Wl,--version-script=/usr/src/kerberos5/lib/libhdb/../../../crypto/heimdal/lib/hdb/version-s
cript.map -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-textrel  -o libhdb.so.11.full -Wl,-soname,libhdb.so.11  . . .   -lasn1  -lcom_err  -lkrb5   -lroken -lprivatesqlite3  -lpthread
. . .
--- kerberos5/lib/libhdb__L ---
--- libhdb.so.11.full ---
/usr/local/bin/powerpc64-freebsd-ld: cannot find -lprivatesqlite3
collect2: error: ld returned 1 exit status
*** [libhdb.so.11.full] Error code 1

With the 2 -L/usr/obj/usr/src/tmp/usr/lib additions the build gets well past head/kerberos5 .



Context details if you care:

> # 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 at FBSDG5C0:/usr/obj/usr/src/sys/GENERIC64vtsc-NODEBUG  powerpc 1100070 1100070

I am attempting an update after having been away from the PowerMacs for months.

> # 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: 291443
> Node Kind: directory
> Schedule: normal
> Last Changed Author: nwhitehorn
> Last Changed Rev: 291442
> Last Changed Date: 2015-11-28 23:16:08 -0800 (Sat, 28 Nov 2015)

> make -j 8 WITH_FAST_DEPEND= CROSS_TOOLCHAIN=powerpc64-gcc \
> WITH_LIBCPLUSPLUS= \
> WITHOUT_CLANG_BOOTSTRAP= WITH_CLANG= WITH_CLANG_IS_CC= \
> WITH_LLDB= \
> WITHOUT_GCC_BOOTSTRAP= WITHOUT_GCC= WITHOUT_GNUCXX= \
> WITHOUT_BOOT= \
> WITHOUT_LIB32= \
> buildworld buildkernel \
> KERNCONF=GENERIC64vtsc-NODEBUG \
> TARGET=powerpc TARGET_ARCH=powerpc64

powerpc64-gcc had been updated to be modern first: it is from . . .

> # svnlite info /usr/ports
> Path: /usr/ports
> Working Copy Root Path: /usr/ports
> URL: https://svn0.us-west.freebsd.org/ports/head
> Relative URL: ^/head
> Repository Root: https://svn0.us-west.freebsd.org/ports
> Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> Revision: 402562
> Node Kind: directory
> Schedule: normal
> Last Changed Author: rene
> Last Changed Rev: 402562
> Last Changed Date: 2015-11-28 15:08:03 -0800 (Sat, 28 Nov 2015)




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




More information about the freebsd-toolchain mailing list