premake-core icon indicating copy to clipboard operation
premake-core copied to clipboard

test_os.lua:68: expected true but was false

Open realroot2185 opened this issue 8 months ago • 11 comments

What seems to be the problem? One test fails:

[  PASSED  ] 2331 tests.
[  FAILED  ] 1 tests, listed below:
[  FAILED  ] base_os.findlib_FindSystemLib
/path/premake-core-5.0.0-beta7/tests/base/test_os.lua:68: expected true but was false

How can we reproduce this? Build premake package. OS: Alpine Linux v3.22 x86_64

pkgname=premake5
pkgver=5.0.0.7
ver=5.0.0-beta7
pkgrel=0
pkgdesc="Simple build configuration and project generation tool using Lua"
url="https://premake.github.io/"
license="BSD"
arch="all"
makedepends="git make"
depends="openssl"
source="$pkgname-$pkgver.tar.gz::https://github.com/premake/premake-core/archive/refs/tags/v$ver.tar.gz"
builddir="$srcdir/premake-core-$ver"

build() {
  make -f Bootstrap.mak linux
  bin/release/premake5 gmake
  make config=release
}

check(){
  ./bin/release/premake5 test
}

package() {
  install -Dm755 bin/release/premake5 "$pkgdir"/usr/bin/premake5
  install -Dm755 packages/debian/premake.1 "$pkgdir"/usr/share/man/man1/premake5.1
  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/premake-git/LICENSE.txt
}

sha512sums="
b6ed480c85db82d749b22b1b97537da525d8eb062514766393c1ff4fc8077289c0037200b7bc260754f320fd5d9c109cb56adbaeec59d485cd95728564927499  premake5-5.0.0.7.tar.gz
"
  • [ ] Visual Studio 2022 (vs2022)
  • [ ] Visual Studio 2019 (vs2019)
  • [ ] Visual Studio 2017 (vs2017)
  • [ ] Visual Studio 2015 (vs2015)
  • [ ] Visual Studio 2012 (vs2012)
  • [ ] Visual Studio 2010 (vs2010)
  • [ ] Visual Studio 2008 (vs2008)
  • [ ] Visual Studio 2005 (vs2005)
  • [x] GNU Makefile (gmake)
  • [ ] GNU Makefile Legacy (gmakelegacy)
  • [ ] XCode (xcode)
  • [ ] Codelite
  • [ ] Other (Please list below)

What version of Premake are you using? I tried to package 5.0.0-beta7.

realroot2185 avatar Aug 15 '25 17:08 realroot2185

Is libm installed?

Jarod42 avatar Aug 15 '25 17:08 Jarod42

What package is that? Do you have a link? libstdc++ and libstdc++-dev are installed.

realroot2185 avatar Aug 15 '25 18:08 realroot2185

The test checks for presence of libm, I don't know in which package it is.

Jarod42 avatar Aug 15 '25 18:08 Jarod42

If you're on Alpine, try installing this: https://pkgs.alpinelinux.org/package/edge/community/x86/openlibm-dev

I know Alpine is a bit different than other Linux distros, where MUSL is the default lib rather than glibc. Not sure if that makes a difference here.

nickclark2016 avatar Aug 15 '25 19:08 nickclark2016

Same error as before.

realroot2185 avatar Aug 15 '25 19:08 realroot2185

Could you provide the path of libm on your system?

nickclark2016 avatar Aug 15 '25 19:08 nickclark2016

I am not sure if you mean this:

openlibm-dev-0.8.4-r0 contains:
usr/include/openlibm/aarch64_fpmath.h
usr/include/openlibm/amd64_fpmath.h
usr/include/openlibm/bsd_cdefs.h
usr/include/openlibm/cdefs-compat.h
usr/include/openlibm/fpmath.h
usr/include/openlibm/i386_fpmath.h
usr/include/openlibm/k_log.h
usr/include/openlibm/k_logf.h
usr/include/openlibm/loongarch64_fpmath.h
usr/include/openlibm/math_private.h
usr/include/openlibm/math_private_openbsd.h
usr/include/openlibm/mips_fpmath.h
usr/include/openlibm/openlibm.h
usr/include/openlibm/openlibm_complex.h
usr/include/openlibm/openlibm_defs.h
usr/include/openlibm/openlibm_fenv.h
usr/include/openlibm/openlibm_fenv_amd64.h
usr/include/openlibm/openlibm_fenv_arm.h
usr/include/openlibm/openlibm_fenv_i387.h
usr/include/openlibm/openlibm_fenv_loongarch64.h
usr/include/openlibm/openlibm_fenv_mips.h
usr/include/openlibm/openlibm_fenv_powerpc.h
usr/include/openlibm/openlibm_fenv_riscv.h
usr/include/openlibm/openlibm_fenv_s390.h
usr/include/openlibm/openlibm_math.h
usr/include/openlibm/powerpc_fpmath.h
usr/include/openlibm/riscv_fpmath.h
usr/include/openlibm/s390_fpmath.h
usr/include/openlibm/types-compat.h
usr/lib/libopenlibm.so
usr/lib/pkgconfig/openlibm.pc

realroot2185 avatar Aug 15 '25 19:08 realroot2185

I just learned that musl C "includes" the libm functionality by default, so there's no need for libm. We may need to check for something else on Linux than libm so the tests pass on that distro. Appears to be a bug in the test, but likely not a bug in the underlying implementation.

nickclark2016 avatar Aug 15 '25 19:08 nickclark2016

I removed check() and I added subpackages="$pkgname-doc" and now it builds, thanks.

realroot2185 avatar Aug 16 '25 06:08 realroot2185

On my AArch64 system (running Fedora Linux 43) it fails same way.

libm is in /usr/lib64/ directory:

/usr/lib64/libm.so /usr/lib64/libm.so.6

hrw avatar Nov 28 '25 15:11 hrw

We may need to check for something else on Linux than libm so the tests pass on that distro.

We can probably check for libuuid since Premake requires it on Linux now?

samsinsane avatar Dec 12 '25 12:12 samsinsane