Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Ubuntu 24.04, lib_install scripts that rely on checkinstall fail to run. #642

Closed
junhaoliao opened this issue Dec 24, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@junhaoliao
Copy link
Member

junhaoliao commented Dec 24, 2024

Bug

as the title says.
e.g.,

junhao@GIGABYTE:~/workspace/clp/components/core/tools/scripts/lib_install$ sudo ./fmtlib.sh 8.0.1
...
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libfmt.a
CMake Error at cmake_install.cmake:46 (file):
  file INSTALL cannot copy file
  "/tmp/fmtlib-installation/fmt-8.0.1/cmake-build-release/libfmt.a" to
  "/usr/local/lib/libfmt.a": No such file or directory.


make: *** [Makefile:130: install] Error 1

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

CLP version

329edf6

Environment

junhao@GIGABYTE:~$ uname -a
Linux GIGABYTE 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
junhao@GIGABYTE:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble
junhao@GIGABYTE:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

Reproduction steps

  1. cd ~/workspace/clp/components/core/tools/scripts/lib_install
  2. sudo ./fmtlib.sh 8.0.1
@junhaoliao junhaoliao added the bug Something isn't working label Dec 24, 2024
@junhaoliao junhaoliao self-assigned this Dec 24, 2024
@junhaoliao
Copy link
Member Author

It appears that checkinstall's Ubuntu 24.04's official apt package installs /etc/checkinstallrc with TRANSLATE=1:

junhao@GIGABYTE:~/workspace/clp$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble
junhao@GIGABYTE:~/workspace/clp$ cat /etc/checkinstallrc | grep TRANSLATE
TRANSLATE=1

However, both Ubuntu 22.04 & 20.04's checkinstall official apt package install /etc/checkinstallrc with TRANSLATE=0:

junhao@GIGABYTE:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
junhao@GIGABYTE:~$ cat /etc/checkinstallrc | grep TRANSLATE
TRANSLATE=0

With --fstrans=no passed to the checkinstall command, the "No such file or directory" error was no longer reported and the dependency installation completely successfully.

@junhaoliao
Copy link
Member Author

TL;DR

In the checkinstall's Debian package source:
(July 24, 2008 at 2:14:22 p.m. EDT) debian/patches/checkinstall-defaults.diff: "Turn off system translation by default, since it is currently broken."
(April 15, 2010 at 3:08:25 p.m. EDT) debian/patches/checkinstall-defaults.diff -> debian/patches/0002-Change-default-configuration.patch: "Manage patches with gpb-pq"
(April 15, 2010 at 4:06:40 p.m. EDT) debian/patches/0002-Change-default-configuration.patch: "Reenable filesystem translation by default"

It appears that the TRANSLATE=1 default was never changed in the master branch in the Ubuntu package source https://git.launchpad.net/ubuntu/+source/checkinstall since (April 15, 2010 at 4:06:40 p.m. EDT).

However,
(2019-10-07 at 2:57 a.m.) debian/patches/0002-Change-default-configuration.patch: "1.6.2+git20170426.d24a630-2ubuntu1 (patches unapplied) - Imported using git-ubuntu import." 5113002a, which seemed to "incorrectly" import the old version of the ancient patch and set TRANSLATE=0, was done on branch ubuntu/eoan-devel and carried over to these ubuntu branches:

origin/ubuntu/eoan
origin/ubuntu/eoan-devel
origin/ubuntu/eoan-proposed
origin/ubuntu/focal
origin/ubuntu/focal-devel
origin/ubuntu/groovy
origin/ubuntu/groovy-devel
origin/ubuntu/hirsute
origin/ubuntu/hirsute-devel
origin/ubuntu/impish
origin/ubuntu/impish-devel
origin/ubuntu/impish-proposed
origin/ubuntu/jammy
origin/ubuntu/jammy-devel
origin/ubuntu/jammy-proposed

As a result, on these distributions file system translation was turned off by default, and we were lucky enough that we did not encounter the file system translation bug. (I tested that under both Ubuntu 20.04 ad 22.04, after the package was installed, with TRANSLATE=1 set in /etc/checkinstallrc the file translation bug was encountered.)

Now in Ubuntu 24.04 the default is again TRANSLATE=1 and we should pass --fstrans=no to checkinstall to mitigate the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant