C++ Logo

sg15

Advanced search

Re: P2717R1, EcoIS Introspection

From: Stephen Kelly <steveire_at_[hidden]>
Date: Thu, 15 Jun 2023 21:45:20 +0100
Could you be more specific about the problem?

Regardless, perhaps this is helpful to keep in mind: I used objcopy in
my example below, but that is not required. You don't have to run a
particular tool. All that is required is that there is some standard way
to extract the encoded data from the binary. I don't see how that could
be affected by build and host machines being different.

Does that help? Or can you be more specific about the problem you are
concerned about?

That said, I don't know if D2717 can be so vague as "use some
platform-specific way to extract the data from the binary" or does it
need to be more specific.

Thanks,

Stephen

On 15/06/2023 21:29, Jayesh Badwaik via SG15 wrote:
> How would this work in cases where the build and host machines are
> different?
>
> I'm using build and host terms as used by gcc in their build, host and
> target triplet.
>
> On Thu, 15 Jun 2023, 22:16 Stephen Kelly via SG15,
> <sg15_at_[hidden]> wrote:
>
>
> I have seen the suggestion of a command line option, and the
> option of a file next to the tool, but I haven't seen a suggestion
> of what Qt does for the last 11 years for plugin loading, which
> has many of the same challenges with cross-compiling etc. That is
> - embed the metadata into the binary itself and read the data from
> a readonly section of the binary:
>
> $ objcopy
> /usr/lib/x86_64-linux-gnu/qt5/plugins/imageformats/libqtiff.so
> /dev/null --dump-section .qtmetadata=/dev/stdout
> QTMETADATA
> !�x1org.qt-project.Qt.QImageIOHandlerFactoryInterfacekQTiffPlugin�dKeys�dtiffctifiMimeTypes�jimage/tiffjimage/tiff
>
>
> I think in Qt 6 it works the same way, but the plugins have cbor
> data encoded in them. This allows Qt to know whether a plugin can
> load .jpg or .png etc.
>
> https://lists.qt-project.org/pipermail/development/2012-February/001827.html
>
> You could try to pursue something similar, but it would
> assume/require a way to read data sections from a binary.
>
> Thanks,
>
> Stephen
>
>
> On 15/06/2023 13:06, René Ferdinand Rivera Morell via SG15 wrote:
>> On Fri, Jun 2, 2023 at 4:32 PM Tom Honermann<tom_at_[hidden]> <mailto:tom_at_[hidden]> wrote:
>>> On 6/2/23 5:08 PM, Olga Arkhipova wrote:
>>>> I believe that IDEs and different generators will very likely be interested in build tool capabilities. And those IDE/generators processes might not even be able to launch a tool as they are not necessarily running in the environment the tool can run. Or they might be running on a different OS altogether for some cross-platform development.
>>> This is a very good point.
>> Can someone point out some concrete examples of that situation that I
>> can investigate? As I'm not familiar with that use case.
>>
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15
>
>
> _______________________________________________
> SG15 mailing list
> SG15_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg15

Received on 2023-06-15 20:45:25