Trying to build the new version (10.80.00) with the old one (10.35.98) still installed, I kept getting various errors like: cc -o ppmtompeg ppmtompeg.o mfwddct.o postdct.o huff.o bitio.o mheaders.o mpeg.o subsample.o param.o rgbtoycc.o readframe.o combine.o jrevdct.o frame.o fsize.o frametype.o specifics.o rate.o opts.o input.o parallel.o psocket.o gethostname.o frames.o iframe.o pframe.o bframe.o psearch.o bsearch.o block.o jpeg.o -L/opt/lib -ljpeg -L/mi/ports/graphics/netpbm/work/netpbm-10.80.00/lib -lnetpbm -lm ppmtompeg.o: In function `main': ppmtompeg.c:(.text+0x9a5): undefined reference to `pm_strfree' ppmtompeg.o: In function `getUserFrameFile': ppmtompeg.c:(.text+0xcb1): undefined reference to `pm_asprintf' ppmtompeg.c:(.text+0xcfb): undefined reference to `pm_strfree' ppmtompeg.c:(.text+0xd04): undefined reference to `pm_strfree' Evidently, ${LOCALBASE}/lib is in the linker's search path ahead of the build-directory and so the already installed libnetpbm is picked instead of the just-built version. Obviously, this is unhealthy and dangerous.
(In reply to Mikhail T. from comment #0) Yes, this is documented in UPDATING.
(In reply to Tobias Kortkamp from comment #1) > Yes, this is documented in UPDATING. That's nice, I suppose, but why not just fix it?..
Created attachment 188083 [details] Move the local build directory to the front of the linker's search path This moves the output of the software's own libopt to the front. No port-revision bump is necessary.
Created attachment 188084 [details] netpbm.diff Can you test with this patch instead?
Comment on attachment 188084 [details] netpbm.diff This replaces "-Lpath -lnetpbm" with "path/libnetpbm.so". I'm not sure, that's desirable... But the build does succeed now. Whichever method you choose -- mine or yours -- be sure, to remove the offensive entry from UPDATING. Thank you for the prompt attention!
A commit references this bug: Author: tobik Date: Sat Nov 18 00:51:34 UTC 2017 New revision: 454404 URL: https://svnweb.freebsd.org/changeset/ports/454404 Log: graphics/netpbm: Fix build with older netpbm versions installed The build currently fails when older netpbm version are still installed in the build environment e.g. when upgrading from 10.35.98 to 10.80.00 the build fails with ppmtompeg.o: In function `main': ppmtompeg.c:(.text+0x9a5): undefined reference to `pm_strfree' ppmtompeg.o: In function `getUserFrameFile': ppmtompeg.c:(.text+0xcb1): undefined reference to `pm_asprintf' ppmtompeg.c:(.text+0xcfb): undefined reference to `pm_strfree' ppmtompeg.c:(.text+0xd04): undefined reference to `pm_strfree' - Use explicit paths when linking with libnetpbm - Remove UPDATING entry that previously recommended deinstalling netpbm first when using portmaster/portupgrade PR: 223724 Changes: head/UPDATING head/graphics/netpbm/Makefile head/graphics/netpbm/files/config.mk