Carlos-Ariel Vanegas via <help-guix@gnu.org> writes:

> Hi,I have been attempting to write a guix package definition for the r2retdec 
> radare2 plugin (https://github.com/radareorg/r2retdec) and have encountered 
> an error specifying that the retdec source code could not be fetched from 
> github by cmake. How should I fix this? I have included the error log and the 
> package definition.
> Thank you in advance!
>
> PS: You may receive this message several times due to problems on my side. 
> please excuse this inconvenience.

Hi,

For reproducibility, package builds are run in a container without the
network, so you can’t git clone inside it.

This means you have to prevent it somehow, usually there are two cases:

1. CMake did not find a library and is trying to download and build it
itself, in which case you need to make CMake find the library.

2. The build actually needs the source, in which case you can add the
source to the inputs and unpack it and place it where expected as a
build step.

In the case of r2retdec, you can see in
https://github.com/radareorg/r2retdec/blob/master/deps/retdec/CMakeLists.txt
that it is trying to build it itself and also trying to build iaito.

This is called in deps/CMakeLists.txt, in it you can see that by setting
the BUILD_BUNDLED_RETDEC and BUILD_IAITO_PLUGIN to OFF it will not try
to build them, but it will actually try to find them like normal
libraries like in src/r2plugin/CMakeLists.txt.

So, in summary. Add -DBUILD_BUNDLED_RETDEC=OFF and
-DBUILD_IAITO_PLUGIN=OFF to your configure-flags and add those libraries
as input.

Does that make sense?

Have a nice day,
Noé

Attachment: signature.asc
Description: PGP signature

Reply via email to