Opened 2 weeks ago
Last modified 10 days ago
#70889 assigned defect
oath-toolkit @2.6.7: error: call to undeclared library function 'realloc' with type 'void *(void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Reported by: | laughingtiger | Owned by: | fracai |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.1 |
Keywords: | arm64 sequoia | Cc: | laughingtiger |
Port: | oath-toolkit |
Description
The OS is running on a M2 mac mini under UTM VM updated from Sequoia beta to 15.0 release. Ran latest Sequoia Macports installer and installed large number of ports without issue. xcode-select is latest version. Cleaned failed install of oath-toolkit and ran rm -rf /Library/Developer/CommandLineTools/usr/include/c++ Second attempted install also failed.
Attachments (4)
Change History (10)
Changed 2 weeks ago by laughingtiger
comment:1 Changed 2 weeks ago by laughingtiger
Cc: | laughingtiger added |
---|
comment:2 Changed 2 weeks ago by jmroot (Joshua Root)
Cc: | arno+macports@… fracai removed |
---|---|
Keywords: | arm64 sequoia added; arm-64 Sequoia removed |
Owner: | set to fracai |
Status: | new → assigned |
Changed 2 weeks ago by calebstein1 (Caleb Stein)
Attachment: | include_stdlib.diff added |
---|
comment:3 Changed 2 weeks ago by calebstein1 (Caleb Stein)
I was able to build on 15.0 using the patch I've attached. I'm not too familiar with the structure of upstream, so I'd rather someone with more familiarity there confirm whether adding these includes is actually safe or a good idea, but at least on my end this allows the build to succeed now.
comment:4 Changed 2 weeks ago by ryandesign (Ryan Carsten Schmidt)
Summary: | oath-toolkit fails to build on Sequoia 15.0 on M2 Mac mini → oath-toolkit @2.6.7: error: call to undeclared library function 'realloc' with type 'void *(void *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] |
---|
In version 2.6.11, two of the three files you're patching already include stdlib.h. Let's start by trying to update the port to that version, adding the patch for the remaining file if it's needed.
comment:5 Changed 2 weeks ago by amolinas
Confirmed that it works with version 2.6.11 and applying the attached patch (patch-2.6.11-include-stdlib.diff). The difference with the previous submitted patch, apart from patching only global.c, is that stdlib.h is included after config.h (required). I also include my Portfile as a reference. It can contain obvious errors, as I just hacked it quickly.
Changed 2 weeks ago by amolinas
Attachment: | patch-2.6.11-include-stdlib.diff added |
---|
Changed 2 weeks ago by amolinas
comment:6 Changed 10 days ago by ksbeattie (Keith Beattie)
I too can confirm that using the attached Portfile
and patch-2.6.11-include-stdlib.diff
files, this is now working.