Bug 278185 - net/netatalk 3.1.18 compile fails on uams
Summary: net/netatalk 3.1.18 compile fails on uams
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-05 12:26 UTC by Dutchman01
Modified: 2024-05-28 11:36 UTC (History)
2 users (show)

See Also:


Attachments
git patch for net/netatalk3 (2.45 KB, patch)
2024-05-28 11:36 UTC, geoffroy desvernay
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dutchman01 2024-04-05 12:26:20 UTC
FreeBSD 13.3 p1 Compile this port with option setting set:

Acl on
Pam on
AVAHI on

leaving the rest of selection left disabled
wil result in error:


uams_pam.c:127:3: error: incompatible function pointer types initializing 'int (*)(int, const struct pam_message **, struct pam_response **, void *)' with an expression of type 'int (*)(int, struct pam_message **, struct pam_response **, void *)' [-Wincompatible-function-pointer-types]
  127 |   &PAM_conv,
      |   ^~~~~~~~~
1 error generated.
gmake[3]: *** [Makefile:795: uams_pam_la-uams_pam.lo] Error 1
gmake[3]: *** Waiting for unfinished jobs....
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../include -I../.. -DLIBICONV_PLUG -I/usr/include/openssl -I/usr/local/include -I/usr/local/include "-D_U_=__attribute__((unused))" -O2 -pipe -I/usr/local/include -L/usr/local/lib -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -MT uams_randnum.lo -MD -MP -MF .deps/uams_randnum.Tpo -c uams_randnum.c -o uams_randnum.o >/dev/null 2>&1
gmake[3]: Leaving directory '/usr/ports/net/netatalk3/work/netatalk-3.1.18/etc/uams'
gmake[2]: *** [Makefile:476: all-recursive] Error 1
gmake[2]: Leaving directory '/usr/ports/net/netatalk3/work/netatalk-3.1.18/etc'
gmake[1]: *** [Makefile:533: all-recursive] Error 1
gmake[1]: Leaving directory '/usr/ports/net/netatalk3/work/netatalk-3.1.18'
gmake: *** [Makefile:465: all] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/netatalk3

Regards,
Dutchman01
Comment 1 Adrian Waters 2024-04-09 08:31:27 UTC
This looks similar to Bug #275261.  Changing the patches to check for __FreeBSD_version >= 1303000 produced a working build for me.
Comment 2 Andrew 2024-04-23 09:10:25 UTC
(In reply to Adrian Waters from comment #1)
Thanks Adrian, I just hit the problem and solved writing this:
__FreeBSD_version >= 1302000

Maybe it's better to set the minimum supported FreeBSD release number here, don't you think so?
Comment 3 geoffroy desvernay 2024-05-28 11:27:42 UTC
it have been discussed upstream:
https://github.com/Netatalk/netatalk/issues/560
and corrected for future versions:
https://github.com/Netatalk/netatalk/commit/1bc5dcf5ce23593e62f65b08cb9711df05e26d5e

I suppose we could use the same patch waiting for the next release ?
Comment 4 geoffroy desvernay 2024-05-28 11:36:14 UTC
Created attachment 251035 [details]
git patch for net/netatalk3

this patch mimics upstream's one, replacing `#ifdef LINUX` by `#if !defined(__svr4__)`