Date: Fri, 22 Sep 2017 14:23:11 +0200 (CEST) From: Gerald Pfeifer <gerald@pfeifer.com> To: Richard Gallamore <ultima@FreeBSD.org>, Mathieu Arnold <mat@FreeBSD.org>, freebsd-ports@FreeBSD.org Cc: Mark Linimon <linimon@lonesome.com> Subject: Re: USE_GCC usage Message-ID: <alpine.LSU.2.21.1709221410040.7183@anthias.pfeifer.com>
next in thread | raw e-mail | index | archive | help
On Jun 25 2016 Richard Gallamore wrote: > When using USE_GCC= 5+, errors occur because this USE only sets > build and run time dependency, and not lib dependency. > > Error: /usr/local/bin/ann_in is linked to /usr/local/lib/gcc5/libgfortran.so.3 from lang/gcc but it is not declared as a dependency > Error: /usr/local/bin/ann_in is linked to /usr/local/lib/gcc5/libquadmath.so.0 from lang/gcc but it is not declared as a dependency > Error: /usr/local/bin/c81merge is linked to /usr/local/lib/gcc5/libstdc++.so.6 from lang/gcc but it is not declared as a dependency > Error: /usr/local/bin/c81merge is linked to /usr/local/lib/gcc5/libgcc_s.so.1 from lang/gcc but it is not declared as a dependency > > Should this be considered a false positive? or should USE_GCC > also add a LIB_DEPEND to ports? Thanks for reporting this, Richard. I missed this back in June, but a friendly soul pointed me towards this. USE_GCC currently implies BUILD_DEPENDS (since GCC is used to build such a port) and RUN_DEPENDS, where I am now thinking we should have LIB_DEPENDS instead of RUN_DEPENDS, actually. And Mathieu Arnold responded: > This is quite strange. lang/gcc does not provide any of those libraries. > lang/gcc is a metapackage, the only thing it does is depend on the > lang/gccXX you asked for, and it provide symlinks: > > # pkg info -l lang/gcc > gcc-5.4.0_2: > /usr/local/bin/g++ > /usr/local/bin/gcc > /usr/local/bin/gfortran > # ls -l $(pkg info -ql lang/gcc) > lrwxr-xr-x 1 root wheel 4 29 mai 15:21 /usr/local/bin/g++@ -> g++5 > lrwxr-xr-x 1 root wheel 4 29 mai 15:21 /usr/local/bin/gcc@ -> gcc5 > lrwxr-xr-x 1 root wheel 9 29 mai 15:21 /usr/local/bin/gfortran@ -> gfortran5 Is it possible the reporter(s) had an older ports tree, predating r441883 from 2017-05-27 which adjusted lang/gcc to appear like you reported? What do you think about replacing RUN_DEPENDS by LIB_DEPENDS via the patch below? My only challenge is that I don't know what to put in instead of ... there given that different lang/gcc* ports do carry the same libraries (and usually with the same .so version).? Gerald Index: bsd.gcc.mk =================================================================== --- bsd.gcc.mk (revision 450347) +++ bsd.gcc.mk (working copy) @@ -167,7 +167,7 @@ .if defined(_GCC_PORT_DEPENDS) BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} -RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:lang/${_GCC_PORT} +LIB_DEPENDS+= ...:lang/${_GCC_PORT} # Later GCC ports already depend on binutils; make sure whatever we # build leverages this as well. USE_BINUTILS= yes @@ -199,5 +199,5 @@ @echo CC=${CC} - CXX=${CXX} - CPP=${CPP} - CFLAGS=\"${CFLAGS}\" @echo LDFLAGS=\"${LDFLAGS}\" @echo "BUILD_DEPENDS=${BUILD_DEPENDS}" - @echo "RUN_DEPENDS=${RUN_DEPENDS}" + @echo "LIB_DEPENDS=${LIB_DEPENDS}" .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.LSU.2.21.1709221410040.7183>