Official FreeBSD packages for 32-bit ARM are built using cross-compilation, and the ARM system root in that case is /nxb-bin/.
So these paths are baked directly into libtool:
$ grep nxb-bin /usr/local/bin/libtool
sys_lib_search_path_spec="/nxb-bin/usr/lib/clang/6.0.0 /usr/lib "
Which results in surprising errors when building stuff natively on arm:
libtool: link: /nxb-bin/usr/bin/cc -shared -fPIC -DPIC .libs/sgc.o -Wl,-soname -Wl,libmzgc-6.12.so -o ../.libs/libmzgc-6.12.so
eval: /nxb-bin/usr/bin/cc: not found
I'm not sure what's the right solution for this. Make a symlink from /nxb-bin to / on arm installs? Ugly. s|/nxb-bin||g on the generated libtool package? Will break the cross-compilation environment I think.
Actually, shouldn't all libtool invocations override these variables, so that both cross and native always work?
Is this still a problem?
I would build packages without setting systemroot and put whatever is in /nxb-bin/usr/bin/ in /usr/bin.
Yes the issue is still present.
poudriere still creates a make.nxb.conf  instead of creating hardlinks for the toolchain (like it's done for some utilities ).
(In reply to mikael.urankar from comment #2)
Ok, then please discuss this issue with the poudriere devs. I cannot address this in devel/libtool. The libtool script is generated during build for the compiler used during build. It cannot reliably use another compiler.