get-cmake icon indicating copy to clipboard operation
get-cmake copied to clipboard

libidn11 not found

Open flagarde opened this issue 1 year ago • 3 comments

Thx for this action !

In some ubuntu runner I had the error with libidn11 not found (cmake3.3 and cmake 3.5). A hacky fix is to do :

sudo apt-get update ; sudo apt-get install --no-install-recommends -y libidn12; sudo ln -s /usr/lib/x86_64-linux-gnu/libidn.so.12 /usr/lib/x86_64-linux-gnu/libidn.so.11

Maybe this could be done one this action directly

flagarde avatar May 16 '24 14:05 flagarde

@flagarde thank you for the suggestion! Glad to get a PR from the community for this improvement.

lukka avatar May 17 '24 05:05 lukka

@lukka I would like to do a PR but I'm really not an expert on javascript. This is workaroud trick I have done :

async function fixes()
{
  if(process.platform === "linux")
  {
    let cout ='';
    let cerr='';
    const options = {};
    options.listeners = {
      stdout: (data) => {
        cout = data.toString();
      },
      stderr: (data) => {
        cerr = data.toString();
      }
    }
    options.silent = true
    await exec.exec('sudo apt-get update', [], options)
    await exec.exec('sudo apt-get install --no-install-recommends -y libidn12', [], options)
    await exec.exec('sudo ln -sf /usr/lib/x86_64-linux-gnu/libidn.so.12 /usr/lib/x86_64-linux-gnu/libidn.so.11', [], options)
  }

}

In you case you can download and make the change only if cmake is <=3.5 as this appears only for some version from 3.0 to 3.5.

I have found an other tricky problem related to SSL and dowload with file(DOWNLOAD) function for old CMake who are no related to this problem

flagarde avatar Aug 03 '24 17:08 flagarde

@flagarde for this niche scenario, the best option is to just add documentation about how to install the required dependencies for cmake v3.5 and older version (i.e. just a run: step executing the commands, different for each Linux distro, to install the dependencies).

lukka avatar Sep 20 '24 09:09 lukka

@flagarde closing this stale issue, contributions are always welcome though.

lukka avatar Jun 26 '25 04:06 lukka