You are not logged in.

#1 2025-06-28 07:59:12

korimitsu
Member
Registered: 2016-08-14
Posts: 175

Cannot build lib32-mozjpeg-git

This package fails to build:

$ paru -S lib32-mozjpeg-git
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1) lib32-mozjpeg-git-4.1.1.r67.gaf265e75-1

:: Proceed to review? [Y/n]: 

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: lib32-mozjpeg-git 4.1.1.r67.gaf265e75-1 (Sat 28 Jun 2025 09:55:55 AM PDT)
==> Retrieving sources...
  -> Updating mozjpeg git repo...
==> Validating source files with sha512sums...
    mozjpeg ... Skipped
==> Making package: lib32-mozjpeg-git 4.1.1.r67.gaf265e75-1 (Sat 28 Jun 2025 09:55:56 AM PDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating mozjpeg git repo...
==> Validating source files with sha512sums...
    mozjpeg ... Skipped
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of mozjpeg git repo...
Cloning into 'mozjpeg'...
done.
==> Starting pkgver()...
==> Updated version: lib32-mozjpeg-git 4.1.5.r279.g08265790-1
==> Sources are ready.
lib32-mozjpeg-git-4.1.1.r67.gaf265e75-1: parsing pkg list...
==> Making package: lib32-mozjpeg-git 4.1.5.r279.g08265790-1 (Sat 28 Jun 2025 09:55:58 AM PDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- The C compiler identification is GNU 15.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CMAKE_BUILD_TYPE = None
-- VERSION = 5.0.0, BUILD = 20250628
-- 32-bit build (i386)
-- CMAKE_INSTALL_PREFIX = /usr
-- CMAKE_INSTALL_BINDIR = bin (/usr/bin)
-- CMAKE_INSTALL_DATAROOTDIR = share (/usr/share)
-- CMAKE_INSTALL_DOCDIR = share/doc/mozjpeg (/usr/share/doc/mozjpeg)
-- CMAKE_INSTALL_INCLUDEDIR = include (/usr/include)
-- CMAKE_INSTALL_LIBDIR = /usr/lib32
-- CMAKE_INSTALL_MANDIR = share/man (/usr/share/man)
-- Shared libraries enabled (BUILD_SHARED_LIBS = 1)
-- Arithmetic decoding support enabled (WITH_ARITH_DEC = 1)
-- Arithmetic encoding support enabled (WITH_ARITH_ENC = 1)
-- TurboJPEG API library enabled (WITH_TURBOJPEG = 1)
-- TurboJPEG Java wrapper disabled (WITH_JAVA = 0)
-- Emulating libjpeg API/ABI v8.0 (WITH_JPEG7 = 0, WITH_JPEG8 = 1)
-- libjpeg API shared library version = 8.3.2
-- Compiler flags = -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/archuser/.cache/paru/clone/lib32-mozjpeg-git/src=/usr/src/debug/lib32-mozjpeg-git -flto=auto -m32 
-- Linker flags = -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto -m32 
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Performing Test HAVE_BUILTIN_CTZL
-- Performing Test HAVE_BUILTIN_CTZL - Success
-- Performing Test RIGHT_SHIFT_IS_UNSIGNED
-- Performing Test RIGHT_SHIFT_IS_UNSIGNED - Failed
-- Performing Test HIDDEN_WORKS
-- Performing Test HIDDEN_WORKS - Success
-- HIDDEN = __attribute__((visibility("hidden")))
-- Performing Test INLINE_WORKS
-- Performing Test INLINE_WORKS - Success
-- INLINE = __inline__ __attribute__((always_inline)) (FORCE_INLINE = 1)
-- Performing Test HAVE_THREAD_LOCAL
-- Performing Test HAVE_THREAD_LOCAL - Success
-- THREAD_LOCAL = __thread
-- Performing Test HAVE_VERSION_SCRIPT
-- Performing Test HAVE_VERSION_SCRIPT - Success
-- Linker supports GNU-style version scripts
-- CMAKE_EXECUTABLE_SUFFIX = 
-- Looking for a ASM_NASM compiler
-- Looking for a ASM_NASM compiler - /usr/bin/nasm
-- The ASM_NASM compiler identification is NASM
-- Found assembler: /usr/bin/nasm
-- CMAKE_ASM_NASM_COMPILER = /usr/bin/nasm
-- CMAKE_ASM_NASM_OBJECT_FORMAT = elf
-- CMAKE_ASM_NASM_FLAGS =  -DELF -DPIC 
-- SIMD extensions: i386 (WITH_SIMD = 1)
-- PNG reading support enabled (PNG_SUPPORTED = 1)
-- Found ZLIB: /usr/lib32/libz.so (found version "1.3.1")
-- Found PNG: /usr/lib32/libpng.so (found suitable version "1.6.49", minimum required is "1.6")
-- PNG reading support enabled (PNG_SUPPORTED = 1)
-- Found ZLIB: /usr/lib/libz.a (found version "1.3.1")
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
  Could NOT find PNG (missing: PNG_LIBRARY) (found suitable version "1.6.49",
  minimum required is "1.6")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindPNG.cmake:180 (find_package_handle_standard_args)
  CMakeLists.txt:811 (find_package)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'lib32-mozjpeg-git-4.1.1.r67.gaf265e75-1': 
error: packages failed to build: lib32-mozjpeg-git-4.1.1.r67.gaf265e75-1

Last edited by korimitsu (2025-06-28 20:32:57)

Offline

#2 2025-07-20 21:12:43

korimitsu
Member
Registered: 2016-08-14
Posts: 175

Re: Cannot build lib32-mozjpeg-git

I've uninstalled it since I don't need it, hope they fix it someday:

$ sudo pacman -Rc lib32-mozjpeg-git
checking dependencies...
:: lib32-avahi optionally requires lib32-gtk3: gtk3 bindings

Packages (17) lib32-colord-1.4.8-1  lib32-gdk-pixbuf2-2.42.12-2  lib32-gst-plugins-base-1.26.4-1  lib32-gst-plugins-base-libs-1.26.4-1  lib32-gst-plugins-good-1.26.4-1  lib32-gtk3-1:3.24.49-1  lib32-imlib2-1.12.5-1  lib32-lcms2-2.16-1
              lib32-libcaca-0.99.beta20-2  lib32-libcups-2.4.11-1  lib32-librsvg-2:2.60.0-2  lib32-libtiff-4.7.0-1  lib32-openjpeg2-2.5.3-2  lib32-poppler-25.05.0-1  lib32-poppler-glib-25.05.0-1  lib32-v4l-utils-1.28.1-1
              lib32-mozjpeg-git-4.1.5.r279.g08265790-1

Total Removed Size:  36.90 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
( 1/17) removing lib32-poppler-glib                                                                                                           [#######################################################################################] 100%
( 2/17) removing lib32-gtk3                                                                                                                   [#######################################################################################] 100%
( 3/17) removing lib32-colord                                                                                                                 [#######################################################################################] 100%
( 4/17) removing lib32-librsvg                                                                                                                [#######################################################################################] 100%
( 5/17) removing lib32-libcups                                                                                                                [#######################################################################################] 100%
( 6/17) removing lib32-gst-plugins-base                                                                                                       [#######################################################################################] 100%
( 7/17) removing lib32-poppler                                                                                                                [#######################################################################################] 100%
( 8/17) removing lib32-openjpeg2                                                                                                              [#######################################################################################] 100%
( 9/17) removing lib32-lcms2                                                                                                                  [#######################################################################################] 100%
(10/17) removing lib32-gst-plugins-good                                                                                                       [#######################################################################################] 100%
(11/17) removing lib32-libcaca                                                                                                                [#######################################################################################] 100%
(12/17) removing lib32-imlib2                                                                                                                 [#######################################################################################] 100%
(13/17) removing lib32-v4l-utils                                                                                                              [#######################################################################################] 100%
(14/17) removing lib32-gst-plugins-base-libs                                                                                                  [#######################################################################################] 100%
(15/17) removing lib32-gdk-pixbuf2                                                                                                            [#######################################################################################] 100%
(16/17) removing lib32-libtiff                                                                                                                [#######################################################################################] 100%
(17/17) removing lib32-mozjpeg-git                                                                                                            [#######################################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Remember to uninstall too lib32-mozjpeg-git-debug

Last edited by korimitsu (2025-07-20 21:20:15)

Offline

#3 2025-07-20 21:17:07

korimitsu
Member
Registered: 2016-08-14
Posts: 175

Re: Cannot build lib32-mozjpeg-git

This PKGBUILD builds the packages correctly, in case anybody wants to help:

# Maintainer: empty>

pkgname=lib32-mozjpeg-git
pkgver=4.1.5.r279.g08265790
pkgrel=1
pkgdesc='Improved JPEG encoder – 32‑bit multilib build'
url='https://github.com/mozilla/mozjpeg'
license=('BSD-3-Clause')
arch=('x86_64')

depends=(lib32-glibc lib32-gcc-libs)
makedepends=(git cmake nasm)     # no lib32-libpng, we disable PNG support

provides=(lib32-libjpeg libjpeg.so libturbojpeg.so lib32-libjpeg-turbo lib32-mozjpeg)
conflicts=(lib32-libjpeg lib32-libjpeg-turbo lib32-mozjpeg)

source=("git+$url")
sha512sums=('SKIP')

### helper: trim -march=x86-64 that makepkg injects for x86_64 ###
_prepare_flags() {
  CFLAGS=${CFLAGS/-march=x86-64/}
  CXXFLAGS=${CXXFLAGS/-march=x86-64/}
  export CFLAGS="$CFLAGS -m32 -march=i686"
  export CXXFLAGS="$CXXFLAGS -m32 -march=i686"
  export LDFLAGS="$LDFLAGS -m32"
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
}

prepare() { cd mozjpeg; _prepare_flags; }

pkgver() {
  cd mozjpeg
  git describe --tags --long |
    sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd mozjpeg
  _prepare_flags

  cmake -B build -S . \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=/usr/lib32 \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=ON \
        -DPNG_SUPPORTED=OFF      # <‑‑ disable PNG, avoids 64‑bit libpng clash
  make -C build
}

package() {
  cd mozjpeg
  make -C build DESTDIR="$pkgdir" install

  # Drop headers, docs, CLI tools – they belong to the 64‑bit mozjpeg package
  rm -r "$pkgdir"/usr/{include,share,bin}

  install -Dm644 LICENSE.md \
          "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}

Last edited by korimitsu (2025-07-20 21:19:13)

Offline

Board footer

Powered by FluxBB