Opened 4 months ago

Last modified 4 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)

main.log (224.0 KB) - added by vidakris 4 months ago.
buildlog.txt (5.9 KB) - added by vidakris 4 months ago.
output of build.sh
LastTest.log (1.3 KB) - added by vidakris 4 months ago.
output of unittest

Download all attachments as: .zip

Change History (12)

Changed 4 months ago by vidakris

Attachment: main.log added

comment:1 Changed 4 months ago by kencu (Ken)

info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_fuse_encfs/encfs/work/encfs-1.9.5/encfs/NullCipher.cpp:81:36: error: no matching constructor for initialization of 'std::shared_ptr<AbstractCipherKey>'
1347	:info:build std::shared_ptr<AbstractCipherKey> gNullKey(new NullKey(), NullDestructor());
1348	:info:build                                    ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

comment:2 Changed 4 months ago by kencu (Ken)

Summary: encfs fails to compile on Sonomaencfs fails to compile on Sonoma: NullCipher.cpp:81:36: error: no matching constructor for initialization of 'std::shared_ptr<AbstractCipherKey>'

comment:3 Changed 4 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 4 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 4 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 4 months ago by kencu (Ken)

Milestone: MacPorts 2.9.0

comment:7 Changed 4 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 4 months ago by kencu (Ken)

We should probably apply the ChatGPT suggestion?

OK -- wanna test that and see if it is a good fix?

Changed 4 months ago by vidakris

Attachment: buildlog.txt added

output of build.sh

Changed 4 months ago by vidakris

Attachment: LastTest.log added

output of unittest

comment:9 Changed 4 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

Note: See TracTickets for help on using tickets.