Summary: | security/fwknop Fix compilation error on 13 and 14 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jens Grassel <freebsd-ports> | ||||||||
Component: | Individual Port(s) | Assignee: | freebsd-ports-bugs (Nobody) <ports-bugs> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Only Me | CC: | kbowling, sean.greven | ||||||||
Priority: | --- | Flags: | sean.greven:
maintainer-feedback+
sean.greven: maintainer-feedback+ |
||||||||
Version: | Latest | ||||||||||
Hardware: | Any | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Comment on attachment 223598 [details]
Fix compilation error on FreeBSD 13 and 14.
Hey Jens, thank you for creating this diff.
I am unable to apply this patch and I suspect I am doing something drastically wrong.
I manually created the file patch-client_log__msg.h
and updated the Makefile with the changes however when I try run make I get:
root@BBD13RC3:/usr/ports/security/fwknop # make
===> Patching for fwknop-2.6.10_2
===> Applying FreeBSD patches for fwknop-2.6.10_2 from /usr/ports/security/fwknop/files
File to patch:
and when I point that to the log_msg.h file manually it patches the file but ends up with an error anyway.
./log_msg.h:1:1: error: expected identifier or '('
--- client/log_msg.h.orig 2021-03-26 08:55:00 UTC
^
./log_msg.h:7:2: error: extraneous closing brace ('}')
-} log_level_t;
^
./log_msg.h:7:4: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
-} log_level_t;
^
./log_msg.h:8:1: error: expected external declaration
+};
^
./log_msg.h:8:2: error: extraneous closing brace ('}')
+};
^
./log_msg.h:52:3: error: redefinition of 'log_level_t' with a different type: 'enum (anonymous enum at ./log_msg.h:43:1)' vs 'int'
} log_level_t;
^
./log_msg.h:7:4: note: previous definition is here
-} log_level_t;
^
1 warning and 5 errors generated.
*** [fwknop-fwknop.o] Error code 1
Any ideas
(In reply to sean.greven from comment #1) Hi, likely I've messed up the patch. I'll re-create a proper one. Stay tuned. Sorry for the inconvenience, Jens Created attachment 223710 [details]
Fix compilation error on 13 and 14.
Hi,
here is another patch. For me it works.
Kind regards,
Jens
Comment on attachment 223710 [details] Fix compilation error on 13 and 14. Hey jens Still running into patching issues. I am now using git to replicate the same procedure you have used to create the patch. I init the repository in /usr/ports and I create the patch file there. I apply the patch: And the results are as below. root@BBD13RC3:/usr/ports/security/fwknop # uname -a FreeBSD BBD13RC3 13.0-RC3 FreeBSD 13.0-RC3 #0 releng/13.0-n244696-8f731a397ad: Fri Mar 19 04:00:20 UTC 2021 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 root@BBD13RC3:/usr/ports/security/fwknop # root@BBD13RC3:/usr/ports # pwd /usr/ports root@BBD13RC3:/usr/ports # git apply patch.pat root@BBD13RC3:/usr/ports # cd security/fwknop ####Just checking here that the files have been modified with todays date. root@BBD13RC3:/usr/ports/security/fwknop # ls -la Makefile files/patch-client_log__msg.h -rw-r--r-- 1 root wheel 1277 Mar 31 20:01 Makefile -rw-r--r-- 1 root wheel 414 Mar 31 20:01 files/patch-client_log__msg.h ### The are indeed modified and the patch file has been placed into the files dir root@BBD13RC3:/usr/ports/security/fwknop # make ===> License GPLv2 accepted by the user ===> fwknop-2.6.10_2 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by fwknop-2.6.10_2 for building ===> Extracting for fwknop-2.6.10_2 => SHA256 Checksum OK for fwknop-2.6.10.tar.gz. ===> Patching for fwknop-2.6.10_2 ===> Applying FreeBSD patches for fwknop-2.6.10_2 from /usr/ports/security/fwknop/files File to patch: ### And of course it breaks here Created attachment 223785 [details]
patch for fwknop to fix compilation error
Thanks to jens for pointing me in the right direction.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=29a38528ec03a278dbad9e165195570ad575be0d commit 29a38528ec03a278dbad9e165195570ad575be0d Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2021-04-08 18:56:17 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-04-08 18:58:07 +0000 security/fwknop: Fix compilation on FreeBSD 13+ PR: 254570 Reported by: Jens Grassel <freebsd-ports@jan0sch.de> Approved by: Sean Greven <sean.greven@gmail.com> (maintainer) security/fwknop/Makefile | 5 +---- security/fwknop/files/patch-client_log__msg.h (new) | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) Committed, thanks! |
Created attachment 223598 [details] Fix compilation error on FreeBSD 13 and 14. Hi, I've attached a patch that fixes the compilation error (ld: error: duplicate symbol: log_level_t) on FreeBSD 13 and 14. Kind regards, Jens