Bug 254173 - pkgbase: installing FreeBSD-clang clang and FreeBSD-lld doesn't pull all dependencies necessary to actually compile and link programs
Summary: pkgbase: installing FreeBSD-clang clang and FreeBSD-lld doesn't pull all depe...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkgbase (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-09 21:54 UTC by Mina Galić
Modified: 2021-04-12 07:43 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mina Galić 2021-03-09 21:54:28 UTC
pkg -r /isolates/clang-dependendy-bug/root -r FreeBSD-base FreeBSD-clang FreeBSD-utilities FreeBSD-lld

…

sudo pkg -r /isolates/clang-dependendy-bug/root info
FreeBSD-clang-14.snap20210306210736 Clang Utilities
FreeBSD-clibs-14.snap20210306210736 Core C Libraries
FreeBSD-libarchive-14.snap20210306210736 libarchive package
FreeBSD-libbegemot-14.snap20210306210736 libbegemot package
FreeBSD-libbsdxml-14.snap20210306210736 libbsdxml package
FreeBSD-libbsm-14.snap20210306210736 libbsm package
FreeBSD-libbz2-14.snap20210306210736 libbz2 package
FreeBSD-libdwarf-14.snap20210306210736 libdwarf package
FreeBSD-libefivar-14.snap20210306210736 libefivar package
FreeBSD-libevent1-14.snap20210306210736 libevent1 package
FreeBSD-libexecinfo-14.snap20210306210736 libexecinfo package
FreeBSD-libldns-14.snap20210306210736 libldns package
FreeBSD-liblzma-14.snap20210306210736 liblzma package
FreeBSD-libmagic-14.snap20210306210736 libmagic package
FreeBSD-libnetmap-14.snap20210306210736 libnetmap package
FreeBSD-libopie-14.snap20210306210736 libopie package
FreeBSD-libregex-14.snap20210306210736 libregex package
FreeBSD-libsmb-14.snap20210306210736 libsmb package
FreeBSD-libsqlite3-14.snap20210306210736 libsqlite3 package
FreeBSD-libucl-14.snap20210306210736 libucl package
FreeBSD-lld-14.snap20210306210736 lld package
FreeBSD-runtime-14.snap20210306210736 FreeBSD Base System
FreeBSD-utilities-14.snap20210306210736 Non-vital programs and librairies

meena@beastix /u/src (main)> sudo chroot /isolates/clang-dependendy-bug/root
root@beastix:/ # cd
root@beastix:~ # cat pls-compile.c
int main(){return 0;}

oot@beastix:~ # make pls-compile
cc -O2 -pipe  pls-compile.c  -o pls-compile
ld: error: unable to find library -lgcc
ld: error: unable to find library -lgcc_s
ld: error: unable to find library -lc
ld: error: unable to find library -lgcc
ld: error: unable to find library -lgcc_s
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make: stopped in /root


okay! let's add dependencies…

sudo pkg -r /isolates/clang-dependendy-bug/root install FreeBSD-libcompiler_rt

same error.
install FreeBSD-libcompiler_rt-dev

same error.

install  FreeBSD-clibs-dev:

root@beastix:~ # make pls-compile
cc -O2 -pipe  pls-compile.c  -o pls-compile
ld: error: cannot open /usr/lib/libc_nonshared.a: No such file or directory
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.

now we're getting somewhere!!

root@beastix:~ # make pls-compile
cc -O2 -pipe  pls-compile.c  -o pls-compile
root@beastix:~ # ./pls-compile
root@beastix:~ # echo $?
0
root@beastix:~ #

I honestly don't know which angle to attack this from, but this makes it really hard to build jails with pkgbase.