Opened 10 months ago
Last modified 10 months ago
#69157 new defect
encfs @1.9.5_2: fails to compile on Sonoma: NullCipher.cpp:81:36: error: no matching constructor for initialization of 'std::shared_ptr<AbstractCipherKey>'
Reported by: | vidakris | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Sonoma | Cc: | |
Port: | encfs |
Description
see description. It wasn't working earlier either, but I keep trying every few months for some reason.
Attachments (3)
Change History (12)
Changed 10 months ago by vidakris
comment:2 Changed 10 months ago by kencu (Ken)
Summary: | encfs fails to compile on Sonoma → encfs fails to compile on Sonoma: NullCipher.cpp:81:36: error: no matching constructor for initialization of 'std::shared_ptr<AbstractCipherKey>' |
---|
comment:3 Changed 10 months ago by kencu (Ken)
looks like something to take upstream to me. Not a MacPorts build issue.
ChatGPT has a suggestion for the c++ fix, but not sure what upstream wants to do about it.
comment:4 Changed 10 months ago by kencu (Ken)
Keywords: | Sonoma added; encfs removed |
---|---|
Summary: | encfs fails to compile on Sonoma: NullCipher.cpp:81:36: error: no matching constructor for initialization of 'std::shared_ptr<AbstractCipherKey>' → encfs @1.9.5_2: fails to compile on Sonoma: NullCipher.cpp:81:36: error: no matching constructor for initialization of 'std::shared_ptr<AbstractCipherKey>' |
comment:5 Changed 10 months ago by kencu (Ken)
ChatGPT:
It seems like the error is related to the constructor of std::shared_ptr<AbstractCipherKey>
. The code is attempting to create a shared pointer with a custom deleter, NullDestructor()
, but it seems there's an issue with the constructor parameters.
One possible solution could be to use std::make_shared
instead of the direct constructor, and provide the custom deleter as a second argument to std::make_shared
. Here's how you can modify the line:
`cpp
:info:build std::shared_ptr<AbstractCipherKey> gNullKey = std::make_shared<NullKey>();
`
This assumes that NullKey
is a class derived from AbstractCipherKey
. The std::make_shared
function automatically deduces the type and allocates memory for both the object and the control block, which should help resolve the issue.
If NullKey
does not take any arguments in its constructor, this should work. If it does, you may need to provide the necessary arguments within the std::make_shared
call.
comment:6 Changed 10 months ago by kencu (Ken)
Milestone: | MacPorts 2.9.0 |
---|
comment:7 Changed 10 months ago by mouse07410 (Mouse)
Yes it is an upstream issue. No, upstream is not maintaining this package anymore. Yes, we probably should apply the patch, because I don't expect any more upstream updates coming for encfs.
comment:8 Changed 10 months ago by kencu (Ken)
We should probably apply the ChatGPT suggestion?
OK -- wanna test that and see if it is a good fix?
comment:9 Changed 10 months ago by vidakris
I tried the suggestion, it indeed solves the compiling issue. build.sh, however, still isn't successful, it fails at running the unittest stage. build.sh
runs make
-- make unittest
-- make test
, so at the last step, see attachments