System trying to use wrong libs

I tried to build Virtualbox on my amd64 machine. The port apparently needs 32 bit libs and requested that I run this:
Code:
make build32 install32 ; ldconfig -v -m -R /usr/lib32
I did this and the build proceeded. It failed for whatever reason but that's secondary. After that, trying to fix a USB issue I tried to compile a new kernel and that failed during the 'make all install' part because it couldn't find the correct libraries. How do I un-do my earlier command commited for virtualbox's needs?
Code:
ldconfig -v -m -R /usr/lib
on a guess, doesn't work. (Just in case, I have a fresh buildworld waiting if need be).

thx,

sa
 
That tip is bogus. You should invoke ldconfig(8) with -32 flag. Better, rather than remembering all the needed options for ldconfig(8) it's easier to just run # /etc/rc.d/ldconfig restart

In case you have messed up linker hints above command should rectify them, too.
 
Bigger than I thought

Your suggestion didn't help, but probably because this is bigger than i thought. Installing the new buildworld didn't help. My edited kernel config looked OK but, just in case, I tried a build of a straight copy of GENERIC and that failed too. Building a kernel as part of a make buildkernel works; I just can't seem to build a kernel alone doing make config, make cleandepend && make depend && make all install

thanks

sa
 
If you have compat.ia32. sysctls then you don't need to worry about kernel. Such is the case for GENERIC.

build32 and install32 are part of world. So...
semi-ambivalent said:
Installing the new buildworld didn't help.
is too cryptic for me. What exactly is the error?
semi-ambivalent said:
I just can't seem to build a kernel alone doing 'make config, make cleandepend && make depend && make all install'.
Have you tried buildkernel target?
 
When I first ran into this problem trying to build virtualbox-ose I went and did a make buildworld to install in case I had permanently overwritten needed libraries on my system. I tried your initial suggestion and, when it didn't work I did the remaining make installkernel and make installworld. That didn't change anything either, which put me on the idea that there was something wrong with my kernel config file. So I copied GENERIC, unchanged except for
Code:
#makeoptions    DEBUG=-g
to test and tried to compile that and it died at the same point at which the earlier compiles died (when I still thought this was a virtualbox-related issue:

Code:
...100 --param large-function-growth=1000  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-
sse3 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror  vnode_if.c
:> hack.c
cc -shared -nostdlib hack.c -o hack.So
rm -f hack.c
MAKE=make sh ../../../conf/newvers.sh GENERIC
cc -c -O2 -fno-strict-aliasing -pipe -march=athlon64 -std=c99  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-
prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc  -I. -I../../.. -../../../contrib/altq 
-D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-
function-growth=1000  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  -
msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror  vers.c
linking kernel
hack.So: could not read symbols: File in wrong format
*** Error code 1

Stop in /usr/src/sys/amd64/compile/test.

So I can't compile any kernel right now except by going through [CMD=""]make buildkernel && make installkernel[/CMD]
Configging a kernel and doing blah, blah, build all install dies as above.

By the by, preview is formatting this post with long lines. Sorry for the scrolling.

sa
 
More info

This completes without issue:
Code:
cd /usr/src && make buildkernel KERNCONF=test && make installkernel KERNCONF=test

sa
 
Back
Top