Created attachment 176024 [details] port patch Update our www/ufdbguard 1.31-16 -> 1.32.3
Testing shows this port failing on FreeBSD 10.1 and 9.3. Looks like some make problem, a race on engine.o. Could you please investigate? Here is the error: ar rc libufdbd.a ../crypt.o ../lex.yy.o ../sgDiv.o ../sgLog.o ../ufdbLogConfig.o ../ufdbLookup.o ../ufdblib.o ../ufdbdb.o ../ufdbUserlist.o ../y.tab.o ../ufdbbase.o ../engine.o ../ufdbglobals.o ../ufdbHostnames.o ar: warning: can't open file: ../engine.o: No such file or directory cc -O2 -pipe -fstack-protector -fno-strict-aliasing -I. -I.. -fstack-protector -o ufdbguardd ufdbguardd.o -L. -lufdbd -lufdbssl -lssl -lcrypto -lz -lbz2 -lpthread -lm -lm ufdbguardd.o: In function `dynamic_domainlist_updater_main': ufdbguardd.c:(.text+0x17c9): undefined reference to `TheDynamicCategoriesLock' ufdbguardd.c:(.text+0x17df): undefined reference to `TheDynamicCategoriesLock' ufdbguardd.o: In function `main': ufdbguardd.c:(.text+0x271b): undefined reference to `UFDBaclEngineInit' ufdbguardd.o: In function `worker_main': ufdbguardd.c:(.text+0x56fb): undefined reference to `UFDBfindSource' ufdbguardd.c:(.text+0x572a): undefined reference to `UFDBfindACLbySource' ufdbguardd.c:(.text+0x577a): undefined reference to `UFDBdecideAccessBasedOnURL' ufdbguardd.c:(.text+0x5cbd): undefined reference to `UFDBdecideImplicitAccessBasedOnURL' ufdbguardd.c:(.text+0x63d4): undefined reference to `UFDBdecideAccessBasedOnHostname' ufdbguardd.c:(.text+0x65c1): undefined reference to `UFDBdecideAccessBasedOnHostname' ./libufdbd.a(ufdbLogConfig.o): In function `UFDBlogConfig': ufdbLogConfig.c:(.text+0x1925): undefined reference to `TheDynamicSourcesLock' ufdbLogConfig.c:(.text+0x1941): undefined reference to `TheDynamicSourcesLock' ./libufdbd.a(ufdbUserlist.o): In function `UFDBrefreshExecUserlist': ufdbUserlist.c:(.text+0x692): undefined reference to `TheDynamicSourcesLock' ufdbUserlist.c:(.text+0x6d1): undefined reference to `TheDynamicSourcesLock' ./libufdbd.a(y.tab.o): In function `sgReadConfig': y.tab.c:(.text+0x5b02): undefined reference to `BuildImplicitPassLists' *** [ufdbguardd] Error code 1 1 error *** [daemon] Error code 2 1 error *** [all] Error code 1 1 error ===> Compilation failed unexpectedly.
(In reply to Guido Falsi from comment #1) Ok, I'll try to fix it
Looks like it's some kind of bug in base make(1). This is not reproducible on 10.2+. Digging.
(In reply to timp87 from comment #3) > Looks like it's some kind of bug in base make(1). This is not reproducible > on 10.2+. > Digging. If I remember correctly the make program was upgraded/modified between 9.x and 10.x. SO they don't work the same. I can't look into this right now, I'll try to find time to better look into this.
(In reply to timp87 from comment #3) It builds if I add 'gmake' to USES. madpilot@, do you know if there is a way to use gmake only for FreeBSD less than 10.2?
I suppose it's better to set USES= gmake for all FreeBSD release and do not check version. I'll provide new patch with this change.
(In reply to timp87 from comment #5) > (In reply to timp87 from comment #3) > It builds if I add 'gmake' to USES. > > madpilot@, do you know if there is a way to use gmake only for FreeBSD less > than 10.2? You can do that by including bsd.port.pre.mk/bsd.port.post.mk and adding something like this after bsd.port.pre.mk, but before the targets: .if ${OSVERSION} < 1000100 USES+= gmake .endif That will add a build time gmake dependency and enable it as make tool only when the condition applies. The OSVERSION value I've used in the sample is the 10.0 branch point. Since there isn't a specific __FreeBSD_version value for changes in make functionality you will have to use an approximation.
(In reply to timp87 from comment #6) > I suppose it's better to set USES= gmake for all FreeBSD release and do not > check version. > I'll provide new patch with this change. Well, FreeBSD 9.x will EOL in a month, so I'd avoid forcing all FreeBSD versions on gmake when they can manage with base make. We still have to support 9.x, but after the end of the year, with the next update, you will be able to drop the exception.
(In reply to Guido Falsi from comment #8) Ok, got it. Not only 9.x, but also 10.1 is affected. It will EOL in a month too. So, I'll use OSVERSION to evaluate FreeBSD less than 10.2.
Created attachment 177402 [details] patch2 (In reply to Guido Falsi from comment #8) Fixed.
A commit references this bug: Author: madpilot Date: Mon Nov 28 12:41:18 UTC 2016 New revision: 427301 URL: https://svnweb.freebsd.org/changeset/ports/427301 Log: - Update ufdbGuard to 1.32.3 PR: 213677 Submitted by: timp87@gmail.com (maintainer) Changes: head/www/ufdbguard/Makefile head/www/ufdbguard/distinfo head/www/ufdbguard/files/patch-src_Makefile.in head/www/ufdbguard/files/patch-src_check__config__file head/www/ufdbguard/files/patch-src_install__etcfiles.sh.in head/www/ufdbguard/files/patch-src_ufdbGuard.conf.in head/www/ufdbguard/files/patch-src_ufdbHostnames.c head/www/ufdbguard/pkg-plist
Committed. Thanks!