Bug 254241

Summary: net/mosquitto 2.0.8 Fails to build
Product: Ports & Packages Reporter: Paul Boehmer <freebsd>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: brd, freebsd-bt, joe, rozhuk.im
Priority: --- Flags: bugzilla: maintainer-feedback? (joe)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
build log none

Description Paul Boehmer 2021-03-12 17:06:20 UTC
Created attachment 223213 [details]
build log

Full build log attached.  Last lines of build:
----------------
/usr/ports/net/mosquitto/work/mosquitto-2.0.8/plugins/dynamic-security/acl.c:240:8: error: use of undeclared identifier 'MOSQ_ACL_UNSUBSCRIBE'
                case MOSQ_ACL_UNSUBSCRIBE:
                     ^
13 warnings and 14 errors generated.
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/mosquitto
*** Error code 1

Stop.
make: stopped in /usr/ports/net/mosquitto
------------------
Comment 1 Brad Davis freebsd_committer freebsd_triage 2021-03-14 01:11:17 UTC
Builds OK for me, what version of FreeBSD? What arch? What build tool?
Comment 2 Ivan Rozhuk 2021-03-14 02:00:59 UTC
For me build fails because it include /usr/local/include/mosquitto.h from currently installed mosquito, whitch is not contain some required defines.

I am deinstall mosquito to build new one.
Comment 3 Paul Boehmer 2021-03-15 12:15:24 UTC
FreeBSD 12.2-STABLE FreeBSD 12.2-STABLE r369361 amd64

I believe rozhuk.im@gmail.com has figuired out the problem as 'pkg delete mosquitto' and re-building port resolves this issue for me.
Comment 4 Brad Davis freebsd_committer freebsd_triage 2021-03-15 17:45:08 UTC
Glad you got it figured out.
Comment 5 Sigi 2021-03-15 18:32:16 UTC
Ok, we know a workaround now. Thanks!! 
But it does not deserve the flag "FIXED" as long build does not work as expected.
Fixing need patching! (IMHO)
Comment 6 Ivan Rozhuk 2021-03-16 11:55:53 UTC
I am waiting for fix, do not want update via deinstall - install by hands.
Suppose other users wait fix to update.
And in future this will strike again many times.
Comment 7 joe 2021-03-22 19:39:58 UTC
I believe the problem here is caused by `-I/usr/local/include` appearing first in the compilation command-line.
Comment 8 Ivan Rozhuk 2021-05-13 22:56:43 UTC
(In reply to Brad Davis from comment #4)

It is not fixed, we will get same errors on updates in future until some one change include order to prefer mosquito src dirs.