Solved stable/11 buildworld ZFS linking issues

ComradeSlice

Member

Reaction score: 10
Messages: 75

I am running 11.0-PRERELEASE and am attempting to upgrade to the latest revision of stable/11. When building world I get linker issues involving ZFS libraries. Some experimentation I have done indicates that the builder is actually trying to link to my own system's ZFS libraries. As a test I copied libzfs.so.2 from /usr/obj into /lib and was able to get further into the build where I am now getting this error:
Code:
ztest.o: In function `ztest_resume_thread':
/usr/src/cddl/usr.bin/ztest/../..//contrib/opensolaris/cmd/ztest/ztest.c:5416: undefined reference to `zfs_compressed_arc_enabled'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
It does not make sense to me that the build system would be attempting to link my host system's libraries. Hopefully someone with a bit more experience can enlighten me.
 
OP
ComradeSlice

ComradeSlice

Member

Reaction score: 10
Messages: 75

I decided to copy libzpool.so.2 into /lib, libzpool.a into /usr/lib, libzfs_core.so.2 into /lib, and libzfs_core.a into /usr/lib. I was able to continue with the build. Now I am getting new errors. Why is the build process trying to link libraries and include headers from my base system?
Code:
clang -O2 -pipe   -g -MD  -MF.depend.elfcore.o -MTelfcore.o -std=gnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses  -Qunused-arguments  -c /usr/src/usr.bin/gcore/elfcore.c -o elfcore.o
/usr/src/usr.bin/gcore/elfcore.c:589:10: error: no member named 'pr_pid' in
      'struct prpsinfo'
        psinfo->pr_pid = pid;
        ~~~~~~  ^
1 error generated.
*** Error code 1
 
Top