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

Update Basis Universal plugin for UASTC #86

Closed
marinjurjevic opened this issue May 28, 2020 · 4 comments
Closed

Update Basis Universal plugin for UASTC #86

marinjurjevic opened this issue May 28, 2020 · 4 comments

Comments

@marinjurjevic
Copy link

marinjurjevic commented May 28, 2020

I used PKG from @mosra archlinux repo basis-universal-src. (link)
After installing suceeds, I proceed with plugins installation which fails on missing files:

magnum-plugins makepkg...

makepkg -fp PKGBUILD
==> Making package: magnum-plugins dev-1 (četvrtak, 28. svibnja 2020. 19:51:40 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> Extracting sources...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Found Corrade: /usr/include  found components: Containers rc Utility 
-- Found Magnum: /usr/include   
-- Found Corrade: /usr/include  found components: Containers rc Utility Main TestSuite 
-- Found Corrade: /usr/include  found components: Containers rc Utility Main PluginManager 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found BasisUniversal: /opt/basis-universal  found components: Encoder Transcoder 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found BasisUniversal: /opt/basis-universal  found components: Transcoder 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Audio 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: TextureTools GL Text 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools Primitives 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: MeshTools Trade GL Primitives 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: Trade MeshTools Primitives SceneGraph Shaders GL DebugTools 
-- Found Magnum: /usr/include  found components: Trade 
-- Found Magnum: /usr/include  found components: TextureTools GL Text 
-- Found Magnum: /usr/include  found components: Audio 
-- Found Magnum: /usr/include  found components: Trade GL MeshTools 
-- Found Magnum: /usr/include  found components: Trade AnyImageImporter 
-- Found Magnum: /usr/include  found components: Trade 
-- Configuring done
CMake Error at /usr/share/cmake/Corrade/UseCorrade.cmake:565 (add_library):
  Cannot find source file:

    /opt/basis-universal/basisu_astc_decomp.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx
Call Stack (most recent call first):
  src/MagnumPlugins/CMakeLists.txt:29 (corrade_add_plugin)
  src/MagnumPlugins/BasisImageConverter/CMakeLists.txt:38 (add_plugin)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
==> ERROR: A failure occurred in build().
    Aborting...

It seems PKGBUILD of basis-universal-src is missing basisu_astc_decomp.{cpp,h}. After prepending that to package function everything builds smoothly.

basis-universal-src PKGBUILD

# Contributor: mosra <mosra@centrum.cz>

_pkgname=basis_universal
pkgname=basis-universal-src
pkgver=2f43afcc97d0a5dafdb73b4e24e123cf9687a418
pkgrel=1
pkgdesc="Basis Universal GPU Texture Codec (sources)"
arch=('any')
url="https://github.com/BinomialLLC/basis_universal"
license=("MIT")
source=("https://github.com/BinomialLLC/${_pkgname}/archive/${pkgver}.tar.gz")
md5sums=('fde3b32e8927409fd3aa0563dbe57099')

build() {
    true
}

package() {
    cd "$srcdir/$_pkgname-$pkgver"

    install -m755 -d $pkgdir/opt/basis-universal/transcoder
    for i in basisu_file_headers.h basisu_global_selector_cb.h basisu_global_selector_palette.h basisu_transcoder_internal.h basisu_transcoder_tables_{astc_0_255,astc,atc_55,atc_56,bc7_m5_alpha,bc7_m5_color,bc7_m6,dxt1_5,dxt1_6,pvrtc2_45,pvrtc2_alpha_33}.inc basisu_transcoder.{cpp,h} basisu.h; do
        install -m644 transcoder/$i $pkgdir/opt/basis-universal/transcoder/$i
    done

    install -m755 -d $pkgdir/opt/basis-universal
    for i in basisu_astc_decomp.{cpp,h} basisu_backend.{cpp,h} basisu_basis_file.{cpp,h} basisu_comp.{cpp,h} basisu_enc.{cpp,h} basisu_etc.{cpp,h} basisu_frontend.{cpp,h} basisu_global_selector_palette_helpers.{cpp,h} basisu_gpu_texture.{cpp,h} basisu_pvrtc1_4.{cpp,h} basisu_resample_filters.cpp basisu_resampler_filters.h  basisu_resampler.{cpp,h} basisu_ssim.{cpp,h} lodepng.{cpp,h}; do
        install -m644 $i $pkgdir/opt/basis-universal/$i
    done
}

I was not sure where to post this issue, here or on your archlinux repo. I posted it here because it might reach more people.

@mosra mosra added this to the 2020.0a milestone May 28, 2020
@mosra mosra added this to TODO in Project management via automation May 28, 2020
@mosra
Copy link
Owner

mosra commented May 28, 2020

Thanks! This is on my TODO list, Basis Universal support in Magnum (and thus this package also) still needs to be updated for the latest UASTC version.

@mosra
Copy link
Owner

mosra commented May 29, 2020

The missing file is added in mosra/archlinux@5a5a811, I still need to update for the UASTC support tho, so keeping this open.

@mosra mosra changed the title [arch] basis-universal-src Update Basis Universal plugin for UASTC May 29, 2020
@mosra mosra moved this from TODO to In Progress in Project management May 29, 2020
@mosra mosra modified the milestones: 2020.0a, 2020.0b Jun 25, 2020
@mosra
Copy link
Owner

mosra commented Jun 25, 2020

After updating to latest Basis commit (BinomialLLC/basis_universal@102275a) some of the tests in Magnum started crashing on an OOB access inside Basis code. Seems like a regression. No time to look into that right now, postponing to after the release.

@mosra
Copy link
Owner

mosra commented Nov 1, 2021

This is finally fixed with #112; the Arch basis-universal-src package got updated in mosra/archlinux@106a818.

@mosra mosra closed this as completed Nov 1, 2021
Project management automation moved this from In Progress to Done Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants