Skip to content

the package manager does not respect OS release version #1535

Open
@trombik

Description

@trombik

Configuration

N/A

Operating system:

FreeBSD (also applies to OpenBSD).

PlatformIO Version (platformio --version):

PlatformIO, version 3.5.1

Description of problem

platform.io does not respect ABIs of OS. FreeBSD keeps ABI compatibility in minor releases. a package for release N.M works on release N.M+1, but not necessarily for N+1.0. it might work sometimes, but not always. the package manager only respects OS name and ${ARCH} (see

def get_systype():
). the system attribute in package.json should include major release version so that different release version installs packages built for the major release, something like FreeBSD_11_amd64.

Steps to Reproduce

  1. install a platform.io package on a FreeBSD release, preferably CURRENT since most of, if not all, packages were built on a release.
  2. see the release version the package was built for, such as file ~/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-gcc. the file come with toolchain-xtensa version 1.40802.0
  3. it shows unmatched release version

Actual Results

uname -r on my machine says 12.0-CURRENT, but file(1) says the binary was built for FreeBSD 9.2:

ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 9.2 (902502), stripped

in this case, the binary happened to run fine on my machine, probably on 10.x and 11.x. but when ABI changes, it will break.

this issue affects OpenBSD hard. in OpenBSD, ABI compatibility is not kept even in minor releases, and they are known to be aggressive to bump library versions in the base system. for OpenBSD, minor release version should be included.

Expected Results

the version in the output should match the major release version of the OS.

an example of expected results:

ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 12.0 (1200060), FreeBSD-style, stripped

If problems with PlatformIO Build System:

N/A

Additional info

the expected result above is one from toolchain-xtensa32 that I am currently building for FreeBSD, which is not available in the platform.io package repository. note that package for FreeBSD CURRENT may be missing in the official package repository for obvious reasons. the point is, packages are built for a particular release.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions