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

Some packages cannot be built 2: Electric boogaloo #21130

Open
TomJo2000 opened this issue Aug 15, 2024 · 40 comments
Open

Some packages cannot be built 2: Electric boogaloo #21130

TomJo2000 opened this issue Aug 15, 2024 · 40 comments
Assignees
Labels
has build issues Package compilation fails help wanted Help is wanted in order to solve the issue information Informational post packaging Issue related to building packages, not affecting end users directly tracker WIP Work in progress, do not close the issue (PR)

Comments

@TomJo2000
Copy link
Member

TomJo2000 commented Aug 15, 2024

Important

Build validation should be done without use of the "fast build" -i/-I flags!

[ "$TERMUX_ON_DEVICE_BUILD" = "false" ] && echo " -i Download and extract dependencies instead of building them."
echo " -I Download and extract dependencies instead of building them, keep existing $TERMUX_BASE_DIR files."

e.g.

./scripts/run-docker.sh ./build-package.sh -f [package [, ...]]

We want to verify that every package can be "bootstrapped" without the need for pre-compiled dependencies.

List of packages that ran into build issues

Batch 1

Batch 2

Batch 3 - now at commit de39934

Batch 4 - now at commit 51516dd + #21120 applied

  • tvheadend (-Wunused-but-set-variable)
  • eltclsh (license)
  • jack-example-tools (Did not find CMake 'cmake')
  • pypy (Related to bionic-host, pypy: bump to 7.3.16 #21197)
    wasn't this supposed to be fixed in pypy: fix build #21026?
  • python-scipy (returning, ERROR: Could not find a version that satisfies the requirement numpy==1.26.5)
  • gdb
  • gobject-introspection (Download of gobject-introspection from https://packages-cf.termux.dev/apt/termux-main failed)

Batch 5 - now at commit 9016ef0 + #21120 applied

  • libosmium
  • osmium-tool (protobuf version mismatch)
  • python-contourpy (ERROR: Could not find a version that satisfies the requirement numpy==1.26.5)
  • ravencoin (returning, ravencoin: revbump to rebuild #21229)
  • smalltalk (symbols)
  • termux-x11-nightly (really slow AWS download) (7455a5e)
  • enchant (hunspell dependency is really slow to download)
  • lgogdownloader
  • libarrow-cpp (protobuf or zlib)
  • libspatialite (really slow source)
  • lnav (symbols?)
  • mesa (ERROR: Failed running '/data/data/com.termux/files/usr/bin/llvm-config', binary or interpreter not executable.)
  • pypy3 (Related to bionic-host)
  • python-pyarrow (libarrow-cpp related)
  • rust (failed to execute command: "/data/data/com.termux/files/usr/bin/llvm-config" "--version"; ERROR: Exec format error (os error 8))
  • samba (libbsd related)
  • silicon (rust: time crate, fix(main/silicon): Update time crate for rust 1.80 compatibility #21276)
  • spatialite-tools (libspatialite related)
  • swift (SIMDMaskScalar)
  • weechat-matrix-rs (weechat-matrix-rs: revbump to rebuild #21232)
  • frida (wants NDK 25)
  • far2l (libbsd related)
  • gw (can't find xz/lzma)
  • picom (xcb-util-image related)
  • qt6-qtbase (xcb-util-image related)
  • qt6-qtimageformats (xcb-util-image related)
  • virglrenderer (mesa related)
  • xorg-server-xvfb (mesa related)
  • xwayland (mesa related)
  • bitlbee
  • chrony (fix(main/chrony): build with NDK r27 #21200)
  • crystal (doesn't like our LLVM version)
  • cups (strip out systemd stuff, cp: cannot create regular file '/etc/dbus-1/system.d/#inst.2175092#': Permission denied)
  • cups-pdf (strip out systemd stuff, cp: cannot create regular file '/etc/dbus-1/system.d/#inst.2175092#': Permission denied)
  • dpkg (probably see apt's source change, Failed to download https://mirrors.kernel.org/debian/pool/main/d/dpkg/dpkg_1.22.6.tar.xz)
  • emacs
  • enscript (cups related)
  • gdal (Auto update failing for gdal #21147)
  • ghc-libs (returning, wants LLVM between 9 and 15)
  • gst-plugins-base (libtheora related)
  • gst-plugins-ugly (libtheora related)
  • gst-python (libtheora related)
  • ices (configure: error: Unable to link with libxml)
  • ldc (returning, ldc: revbump to rebuild #21243)
  • lfortran
  • libgnustep-base
  • libkiwix (libzim related)
  • libspice-server
  • lilypond (ghostscript related)
  • mapserver (gdal related)
  • matplotlib (ERROR: Could not find a version that satisfies the requirement numpy==1.26.5)
  • openjdk-17 (cups related)
  • plantuml (openjdk-17 related)
  • postgis (gdal related)
  • procyon-decompiler (cups related)
  • qemu-system-x86-64-headless (libspice-server related)
  • scala (openjdk-17 related)
  • shellcheck (ghc-libs related)
  • termplay
  • termux-services (dpkg related)
  • texlive-bin
  • texlive-installer (texlive-bin related)
  • tinygo (symbols)
  • tizonia (libmediainfo related)
  • unar (libgnustep-base related)
  • alacritty (license)
  • emacs-x (see emacs)
  • feathernotes (hunspell-en-us related)
  • featherpad (hunspell-en-us related)
  • freerdp
  • mesa-demos (mesa related)
  • qt5-qtwebengine (bump(x11/qt5-qtwebengine): 5.15.17 #21368)
  • qt6-qtdeclarative
  • qt6-qttools
  • qt6-qttranslations
  • qt6-qtwayland
  • qt6ct
  • the-powder-toy (symbols)
  • tigervnc (mesa related)
  • tuxpaint (symbols)
  • weston (freerdp related)
  • winestable (mesa related)
  • wlroots (mesa related)
  • xorg-server (mesa related)
  • xpdf
  • xrdp (mesa related)
  • ant (cups related)
  • apksigner (cups related)
  • apt (dpkg related)
  • aptitude (dpkg related)
  • bdsup2sub (cups related)
  • cabal-install (ghc-libs related)
  • d8 (cups related)
  • dex2jar (cups related)
  • dvdauthor (can't find xz/lzma)
  • gradle (openjdk-17 related)
  • graphviz (configure: error: invalid ltdl library directory: '/data/data/com.termux/files/usr/lib')
  • groovy (openjdk-17 related)
  • gst-plugins-bad (libtheora related)
  • imagemagick (can't find xz/lzma)
  • imlib2 (can't find xz/lzma)
  • jython (openjdk-17 related)
  • kiwix-tools (libzim related)
  • kotlin (openjdk-17 related)
  • libapt-pkg-perl (dpkg related)
  • libbcprov-java (openjsk-17 related)
  • libcaca (can't find xz/lzma)
  • libcommons-lang3-java (openjsk-17 related)
  • libtsduck (openjdk-17 related)
  • lsix (can't find xz/lzma)
  • libtsduck (openjdk-17 related)
  • maven (openjdk-17 related)
  • mdbook-graphviz (graphviz related)
  • octave (symbols)
  • pdftk (openjdk-17 related, pdftk: revbump to rebuild #21223)
  • php-imagick (can't find xz/lzma, php-imagick: revbump to rebuild #21227)
  • python-apt (dpkg related)
  • quilt (graphviz related)
  • toilet (can't find xz/lzma)
  • valac (graphviz related)
  • w3m (can't find xz/lzma)
  • yosys (can't find xz/lzma)
  • zbar (imagemagick related)
  • ayatana-ido (can't find xz/lzma)
  • bluefish (hunspell dependency is really slow to download)
  • cairo-dock-core (graphviz related)
  • chocolate-doom (symbols)
  • clutter-gst (configure: error: Unable to locate required GL library)
  • dosdox-x (SDL symbols)
  • fcitx5 (hunspell dependency is really slow to download)
  • fcitx5-hangul (hunspell dependency is really slow to download)
  • fcitx5-qt (hunspell dependency is really slow to download)
  • feh (can't find xz/lzma)
  • fluxbox (can't find xz/lzma)
  • gcr (can't find xz/lzma)
  • gcr4 (can't find xz/lzma)
  • godot (returning, can't find OpenGL, godot: revbump to rebuild #21237)
  • goffice (ghostscript related)
  • gspell (hunspell dependency is really slow to download)
  • gtksourceview3 (libltdl related)
  • gtksourceview4 (libltdl related)
  • gtkwave (can't find xz/lzma)
  • gucharmap (libltdl related)
  • gvfs (libltdl related)
  • keepassxc (botan3 related)
  • kf6-karchive (qt6-qttools related)
  • kf6-kcodecs (qt6-qtdeclarative related)
  • kf6-kconfig (qt6-qtdeclarative related)
  • kf6-kcoreaddons (qt6-qtdeclarative related)
  • kf6-kguiaddons (qt6-qtdeclarative related)
  • kf6-ki18n (qt6-qtdeclarative related)
  • kf6-kitemmodels (qt6-qtdeclarative related)
  • kf6-kitemviews (qt6-qtdeclarative related)
  • kf6-kwidgetsaddons (qt6-qtdeclarative related)
  • kf6-kwindowsystem (qt6-qtdeclarative related)
  • layer-shell-qt (qt6-qtdeclarative related)
  • libayatana-indicator (valac related)
  • libdazzle (graphviz related)
  • libdbusmenu (graphviz related)
  • libgtksourceviewmm-3.0 (valac related)
  • libhandy (graphviz related)
  • libhandy-0.0 (graphviz related)
  • libportal (graphviz related)
  • libvte (graphviz related)
  • libxfce4util (graphviz related)
  • libxklavier (graphviz related)
  • lite-xl (SDL symbols)
  • love (SDL symbols)
  • lxqt-menu-data (qt6-qtdeclarative related)
  • lyx (ghostscript related)
  • mate-terminal (libvte related)
  • mindforger (hunspell-en-us related)
  • mogan (ghostscript related)
  • octave-x (symbols)
  • openbox (imlib2 reated)
  • orca (gst-plugins-base related)
  • pavucontrol-qt (qt6-qtdeclarative related)
  • pidgin (gstreamer related)
  • qemu-system-x86-64 (libtheora related)
  • qt-creator (qt-creator: revbump to rebuild #21244)
  • qt5-qtmultimedia (unable to find SDL)
  • qt5-qtwebkit (EGL/eglplatform.h)
  • qt6-qtcharts (qt6-qtdeclarative related)
  • qt6-qtmultimedia
  • qtermwidget
  • quassel (EGL/eglplatform.h)
  • rhythmbox (EGL/eglplatform.h)
  • roxterm (valac related)
  • schismtracker (SDL symbols)
  • scrot (imlib2 related)
  • simulide (EGL/eglplatform.h)
  • sway (wlroots related)
  • synaptic (dpkg related)
  • texstudio (hunspell related)
  • texworks (hunspell related)
  • tilda (valac related)
  • tint2 (imlib2)
  • trojita (qt5-qtmultimedia related)
  • tsmuxergui (EGL/eglplatform.h)
  • tumbler (graphviz related)
  • wireshark-qt (EGL/eglplatform.h)
  • wkhtmltopdf (EGL/eglplatform.h)
  • wmaker (imagemagick related)
  • xf86-input-void (mesa related)
  • xf86-video-dummy (mesa related)
  • xfconf (graphviz related)
  • appstream (graphviz related)
  • apt-file (dpkg related)
  • awesomeshot (imagemagick related)
  • babl (graphviz related)
  • dmtx-utils (imagemagick related)
  • ffmpeg
  • ffmpegthumbnailer
  • gegl (graphviz related)
  • gexiv2 (libltdl related)
  • gpac (libtheora related)
  • gst-libav (libtheora related)
  • gst-plugins-good (libtheora related)
  • imgflo (graphviz related)
  • libgee (graphviz related)
  • libgmime (graphviz related)
  • libsecret (graphviz related)
  • libvips (imagemagick related)
  • manim (ERROR: Could not find a version that satisfies the requirement numpy==1.26.5)
  • megacmd
  • minidlna
  • mplayer
  • mpv (libtheora related)
  • mu (emacs related)
  • nala (dpkg related)
  • navidrome (libtheora related)
  • notcurses (libtheora related)
  • notmuch (graphviz related)
  • pianobar (libtheora related)
  • pipewire (libtheora related)
  • proton-bridge (graphviz related)
  • rsgain (libtheora related)
  • srt2vobsub (cups related)
  • timg (cups related)
  • unpaper (libtheora related)
  • vgmstream (libtheora related)
  • waypipe
  • ytui-music (libtheora related)
  • zile (graphviz related)
  • abiword (hunspell related)
  • audacious-plugins
  • cherrytree (hunspell related)
  • deadbeef (EGL/eglplatform.h, revbump(x11/deadbeef): remove -msse3 to fix build with NDK r27 #21501)
  • eog (valac related)
  • evince (EGL/eglplatform.h)
  • eww (valac related)
  • ffplay (can't find SDL)
  • firefox (skipped for time, I wanna be done)
  • geany (libvte related)
  • geany-plugins (geany related)
  • gimp (SDL symbols)
  • gimp-lqr-plugin (gimp related)
  • handbrake
  • kf6-kauth
  • libfm-qt (qt6-qtdeclarative related)
  • libqtxdg (qt6-qtdeclarative related)
  • libsysstat
  • lximage-qt
  • lxqt-archiver
  • lxqt-qtplugin (qt6-qttools related)
  • mgba (SDL symbols)
  • mpv-x (mpv related)
  • obconf (imlib2 related)
  • olivia (can't find xz/lzma)
  • opencv
  • oshu (SDL symbols)
  • otter-browser (qt5-qtwebengine)
  • parole (imlib2 related)
  • pcmanfm-qt (qt6-qtdeclarative)
  • phantomjs (qt5-qtwebengine)
  • pulseeffects (imlib2 related)
  • gnome-themes-extra (EGL/eglplatform.h)
  • fluent-gtk-theme (EGL/eglplatform.h)
  • python-pyqtwebengine (EGL/eglplatform.h)
  • python-qscintilla (EGL/eglplatform.h)
  • python-torch (EGL/eglplatform.h)
  • python-torchaudio (EGL/eglplatform.h)
  • python-torchvision (EGL/eglplatform.h)
  • qterminal
  • qtkeychain (EGL/eglplatform.h)
  • qtxdg-tools
  • ristretto (EGL/eglplatform.h)
  • scrcpy (EGL/eglplatform.h)
  • thunderbird (EGL/eglplatform.h, bump(x11/thunderbird): 128.2.0 #21486, [Bug]: thunderbird with Segmentation fault on armv7l devices. #21511)
  • webkit2gtk-4.1 (hunspell-en-us related)
  • webkitgtk-6.0 (hunspell-en-us related)
  • wxwidgets
  • xfce-theme-manager (EGL/eglplatform.h)
  • xfce4-session (EGL/eglplatform.h)
  • xfce4-taskmanager (EGL/eglplatform.h)
  • xfce4-terminal (EGL/eglplatform.h)
  • xfwm4 (EGL/eglplatform.h)
  • zenity (EGL/eglplatform.h)
  • vlc (symbols)
  • ardour (EGL/eglplatform.h)
  • atril (EGL/eglplatform.h)
  • audacity (EGL/eglplatform.h)
  • cantata (EGL/eglplatform.h)
  • codeblock (EGL/eglplatform.h)
  • epiphany (EGL/eglplatform.h)
  • exo (EGL/eglplatform.h)
  • file-roller (EGL/eglplatform.h)
  • garcon (EGL/eglplatform.h)
  • gedit (hunspell-en-us related)
  • ghex (EGL/eglplatform.h)
  • gnome-font-viewer (EGL/eglplatform.h)
  • hugin (can't find OpenGL)
  • kid3 (EGL/eglplatform.h)
  • komorebi (can't find OpenGL)
  • lenmus (symbols)
  • liblxqt
  • lxqt-about
  • lxqt-config
  • lxqt-globalkeys
  • lxqt-notificationd
  • lxqt-openssh-askpass
  • lxqt-panel
  • lxqt-runner
  • lxqt-session
  • marco (EGL/eglplatform.h)
  • news-flash-gtk (EGL/eglplatform.h)
  • nextcloud-client (EGL/eglplatform.h)
  • obconf-qt (vulkan-headers related)
  • spek (can't find OpenGL)
  • surf (EGL/eglplatform.h)
  • vlc-qt (vlc related)
  • wxmaxima (can't find OpenGL)
  • xfce4-appfinder (EGL/eglplatform.h)
  • xfce4-panel (EGL/eglplatform.h)
  • xfce4-panel-profiles (EGL/eglplatform.h)
  • xfce4-places-plugin (EGL/eglplatform.h)
  • xfce4-pulseaudio-plugin (EGL/eglplatform.h)
  • xfce4-screensaver (EGL/eglplatform.h)
  • xfce4-screenshooter (EGL/eglplatform.h)
  • xfce4-settings (EGL/eglplatform.h)
  • xfce4-timer-plugin (EGL/eglplatform.h)
  • xfce4-wavelan-plugin (EGL/eglplatform.h)
  • xfce4-whiskermenu-plugin (EGL/eglplatform.h)
  • thunar (EGL/eglplatform.h)
  • thunar-archive-plugin (EGL/eglplatform.h)
  • vala-panel-appmenu (EGL/eglplatform.h, probably also valac)
  • xfce4-calculator-plugin (EGL/eglplatform.h)
  • xfce4-clipman-plugin (EGL/eglplatform.h)
  • xfce4-datetime-plugin (EGL/eglplatform.h)
  • xfce4-dict (EGL/eglplatform.h)
  • xfce4-docklike-plugin (EGL/eglplatform.h)
  • xfce4-eyes-plugin (EGL/eglplatform.h)
  • xfce4-genmon-plugin (EGL/eglplatform.h)
  • xfce4-mailwatch-plugin (EGL/eglplatform.h)
  • xfce4-netload-plugin (EGL/eglplatform.h)
  • xfce4-notes-plugin (EGL/eglplatform.h)
  • xfce4-notifyd (EGL/eglplatform.h)
  • xfdesktop (EGL/eglplatform.h)

I'll update this as I go.

fornwall added a commit that referenced this issue Aug 15, 2024
Fixes the current rust 1.80 build failure (#21130).
fornwall added a commit that referenced this issue Aug 15, 2024
Switch from freedesktop.org to www.freedesktop.org as the former has an
invalid certificate, fixing the build error noted in #21130.
fornwall added a commit that referenced this issue Aug 15, 2024
Fixes the build failure in (#21130) by backporting
kakoune-lsp/kakoune-lsp@bb9734c

As kak-lsp does seem to have rather regular releases, another
alternative could be awaiting the next release which will include this.
fornwall added a commit that referenced this issue Aug 15, 2024
Fixes the current rust 1.80 build failure (#21130).
fornwall added a commit that referenced this issue Aug 15, 2024
Fixes the build failure in (#21130) by backporting
kakoune-lsp/kakoune-lsp@bb9734c

As kak-lsp does seem to have rather regular releases, another
alternative could be awaiting the next release which will include this.
fornwall added a commit that referenced this issue Aug 15, 2024
Switch from freedesktop.org to www.freedesktop.org as the former has an
invalid certificate, fixing the build error noted in #21130.
@TomJo2000
Copy link
Member Author

Started the second batch, looks like mostly simple linker problems so far.

@Maxython
Copy link
Member

glibc-repo (complains about cgct, Maxy's problem)

I know the reason for this error

@TomJo2000
Copy link
Member Author

I know the reason for this error

Figured it'd be quicker to just leave that one for you to figure out.

@TomJo2000
Copy link
Member Author

Just finished the second batch, that officially puts us at 51 problems.
And 791/2517

@TomJo2000
Copy link
Member Author

We're up to 80 now.
I wanna get to 50%, and then I think I'm gonna call it a night.

@TomJo2000 TomJo2000 added help wanted Help is wanted in order to solve the issue information Informational post WIP Work in progress, do not close the issue (PR) labels Aug 17, 2024
@TomJo2000
Copy link
Member Author

148 now.
1557/2517, 61.86%

I've decided to clean up my build container,
rebase to the latest commit,
and apply #21120.

I think we get that everything that depends on coreutils is gonna be effected by it, so I'm just gonna save myself the hassle of writing it down another 20 times.

@TomJo2000
Copy link
Member Author

@Maxython I can't get gobject-introspection to build.
You might wanna look into that, seeing as its half the reason for 20513.

twaik added a commit that referenced this issue Oct 22, 2024
twaik pushed a commit that referenced this issue Oct 22, 2024
…10.2

Fixes gradle hanging under certain conditions in the two remaining packages where the issue could be reproduced. See:

- #21130 (comment)
- gradle/gradle#14961
- a7627ac

[no ci]
termux-pacman-bot added a commit to termux-pacman/termux-packages that referenced this issue Oct 22, 2024
…10.2

Fixes gradle hanging under certain conditions in the two remaining packages where the issue could be reproduced. See:

- termux/termux-packages#21130 (comment)
- gradle/gradle#14961
- termux/termux-packages@a7627ac

[no ci]
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 22, 2024
Fixes "`error: incomplete definition of type 'struct _win_st'`" during
build.

Progress on termux#21130

Copied and pasted from https://gitlab.archlinux.org/archlinux/packaging/packages/aalib/-/commit/05e22fdc66114a51ac0a6ff07f3c156356439c63

`0005-aalib-m4.patch`: Fix --with-aalib-prefix argument

`0006-aalib-c99.patch`: Fix builtin-declaration-mismatch compiler warnings

`0007-aalib-free-offset-pointer.patch`: Fix free-nonheap-object compiler warning

`0008-aalib-key-down-OOB.patch`: Fix aggressive-loop-optimizations compiler warning

`0009-aalib-aalinuxkbd-return.patch`: Fix 'return' with no value compiler warning

`0010-aalib-opaque-ncurses-fix.patch`: Fix build for ncurses built with opaque-curses option

`0011-aalib-fix-aarender.patch`: Fix rendering with custom aspect ratio

`0012-aalib-mouse.patch`: Fix typo for KEY_MOUSE condition
twaik added a commit that referenced this issue Oct 23, 2024
twaik added a commit that referenced this issue Oct 23, 2024
@robertkirkman
Copy link
Contributor

robertkirkman commented Oct 24, 2024

I am not sure if I should be opening separate issues for every "independent root cause error" (errors in packages that are unlikely to share that exact root cause with too many other packages due to the uniqueness of the error as it relates to that package's code) or continuing to use this issue to describe all package build errors generally, but since the docker builder image was updated to Ubuntu 24.04 which comes with glibc 2.39 ce35b3a, the hostbuild-step of the termux-packages fte package now fails to complete successfully due to the presence of glibc >= 2.38 in the build environment:

termux_step_host_build() {
find "$TERMUX_PKG_SRCDIR" -mindepth 1 -maxdepth 1 -exec cp -a \{\} ./ \;
make CC="gcc -m${TERMUX_ARCH_BITS}" LDFLAGS="-m${TERMUX_ARCH_BITS}" \
TARGETS=cfte
}

Result:

g++ -c s_string.cpp   -Wall -Wpointer-arith -Wconversion -Wwrite-strings -Winline -g    -I/usr/include/qt3 -I/usr/lib64/qt-3.3/include  -I/usr/include/slang -DUNIX -DLINUX
In file included from s_string.cpp:3:
/usr/include/string.h:506:15: error: conflicting declaration of ‘size_t strlcpy(char*, const char*, size_t)’ with ‘C’ linkage
  506 | extern size_t strlcpy (char *__restrict __dest,
      |               ^~~~~~~
In file included from s_string.cpp:1:
s_string.h:10:8: note: previous declaration with ‘C++’ linkage
   10 | size_t strlcpy(char *dst, const char *src, size_t size);
      |        ^~~~~~~
/usr/include/string.h:506:15: error: declaration of ‘size_t strlcpy(char*, const char*, size_t) noexcept’ has a different exception specifier
  506 | extern size_t strlcpy (char *__restrict __dest,
      |               ^~~~~~~
s_string.h:10:8: note: from previous declaration ‘size_t strlcpy(char*, const char*, size_t)’
   10 | size_t strlcpy(char *dst, const char *src, size_t size);
      |        ^~~~~~~
/usr/include/string.h:512:15: error: conflicting declaration of ‘size_t strlcat(char*, const char*, size_t)’ with ‘C’ linkage
  512 | extern size_t strlcat (char *__restrict __dest,
      |               ^~~~~~~
s_string.h:14:8: note: previous declaration with ‘C++’ linkage
   14 | size_t strlcat(char *dst, const char *src, size_t size);
      |        ^~~~~~~
/usr/include/string.h:512:15: error: declaration of ‘size_t strlcat(char*, const char*, size_t) noexcept’ has a different exception specifier
  512 | extern size_t strlcat (char *__restrict __dest,
      |               ^~~~~~~
s_string.h:14:8: note: from previous declaration ‘size_t strlcat(char*, const char*, size_t)’
   14 | size_t strlcat(char *dst, const char *src, size_t size);
      |        ^~~~~~~
make[2]: *** [fte-unix.mak:159: s_string.o] Error 1

Very fortunately, there is actually an existing package for fte in the Ubuntu 24.04 official repository, so because the toolchain and build environment that termux-packages hostbuild-steps use is uncannily similar to the build environment that Ubuntu 24.04 official packages use, I can see the exact solution they have used for the same error by looking at the source code created by Ubuntu or Debian for the fte packaged in Ubuntu 24.04 and newer.
https://git.launchpad.net/ubuntu/+source/fte/tree/debian/patches/strlcpy.patch

Using that patch seems to successfully solve the problem and allow the hostbuild-step and all the other steps of the fte package to successfully complete, so I have opened a draft PR to potentially solve the problem, if the package remains enabled and is not removed from this repository.

@TomJo2000
Copy link
Member Author

This round of testing was opened before we moved the build container to 24.04,
so it's probably better to move this to a new issue.

twaik added a commit that referenced this issue Oct 27, 2024
Fixes error 
```
checking C++ compiler aarch64-linux-android-clang++  -I/data/data/com.termux/files/usr/include  -fstack-protector-strong -Oz -L/data/data/com.termux/files/usr/lib... no, program does not run
configure: error: C++ compiler not available, see config.log for details
...
configure:10520: checking C++ compiler aarch64-linux-android-clang++  -I/data/data/com.termux/files/usr/include  -fstack-protector-strong -Oz -L/data/data/com.termux/files/usr/lib
Test compile:
configure:10534: aarch64-linux-android-clang++  -I/data/data/com.termux/files/usr/include  -fstack-protector-strong -Oz -L/data/data/com.termux/files/usr/lib conftest.cc >&5
configure:10537: $? = 0
configure:10541: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
CANNOT LINK EXECUTABLE "./a.out": library "libc++_shared.so" not found
libc: CANNOT LINK EXECUTABLE "./a.out": library "libc++_shared.so" not found
libc: Fatal signal 6 (SIGABRT), code -6 in tid 952305 (a.out)
libc: failed to spawn debuggerd dispatch thread: Invalid argument
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./b.out: No such file or directory
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./a.exe: No such file or directory
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./a_out.exe: No such file or directory
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./conftest: No such file or directory
configure:10544: $? = 127
failed program was:

int main (void) { return 0; }
configure:10649: result: no, program does not run
configure:10665: error: C++ compiler not available, see config.log for details
```

Related to #21130.
twaik added a commit that referenced this issue Oct 28, 2024
Fix for `error: call to undeclared library function 'memmove/calloc/malloc/memcpy/free/sprintf/etc.'` during running `build-all.sh`
Probably it would be easier to add `-Wimplicit-function-declaration` to `CFLAGS`, but this solution feels more correct.

Related to #21130.

I will merge this in 36 hours if nobody minds or after it gets 2+ approves.
twaik added a commit that referenced this issue Oct 28, 2024
Fixes error 
```
checking C++ compiler aarch64-linux-android-clang++  -I/data/data/com.termux/files/usr/include  -fstack-protector-strong -Oz -L/data/data/com.termux/files/usr/lib... no, program does not run
configure: error: C++ compiler not available, see config.log for details
...
configure:10520: checking C++ compiler aarch64-linux-android-clang++  -I/data/data/com.termux/files/usr/include  -fstack-protector-strong -Oz -L/data/data/com.termux/files/usr/lib
Test compile:
configure:10534: aarch64-linux-android-clang++  -I/data/data/com.termux/files/usr/include  -fstack-protector-strong -Oz -L/data/data/com.termux/files/usr/lib conftest.cc >&5
configure:10537: $? = 0
configure:10541: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
CANNOT LINK EXECUTABLE "./a.out": library "libc++_shared.so" not found
libc: CANNOT LINK EXECUTABLE "./a.out": library "libc++_shared.so" not found
libc: Fatal signal 6 (SIGABRT), code -6 in tid 952305 (a.out)
libc: failed to spawn debuggerd dispatch thread: Invalid argument
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./b.out: No such file or directory
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./a.exe: No such file or directory
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./a_out.exe: No such file or directory
/home/builder/.termux-build/libgmp/src/configure: line 10542: ./conftest: No such file or directory
configure:10544: $? = 127
failed program was:

int main (void) { return 0; }
configure:10649: result: no, program does not run
configure:10665: error: C++ compiler not available, see config.log for details
```

Related to #21130.
twaik added a commit that referenced this issue Oct 28, 2024
Fixes the following error which appears during running `./build-all.sh`.
```
/home/builder/.termux-build/libnfc/src/examples/pn53x-tamashell.c:48:12: fatal error: 'readline/readline.h' file not found
   48 | #  include <readline/readline.h>
      |            ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
```

Since `libnfc.so` has only `libc.so` in `NEEDED` section I put `readline` to build dependency section.

Related to #21130.
twaik added a commit that referenced this issue Oct 29, 2024
Fix for `error: call to undeclared library function 'memmove/calloc/malloc/memcpy/free/sprintf/etc.'` during running `build-all.sh`
Probably it would be easier to add `-Wimplicit-function-declaration` to `CFLAGS`, but this solution feels more correct.

Related to #21130.

I will merge this in 36 hours if nobody minds or after it gets 2+ approves.
twaik added a commit that referenced this issue Oct 30, 2024
Fixes the following error which appears during running `./build-all.sh`.
```
/home/builder/.termux-build/libnfc/src/examples/pn53x-tamashell.c:48:12: fatal error: 'readline/readline.h' file not found
   48 | #  include <readline/readline.h>
      |            ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
```

Since `libnfc.so` has only `libc.so` in `NEEDED` section I put `readline` to build dependency section.

Related to #21130.
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 30, 2024
Progress on termux#21130

Fixes this error during build:

```
ld.lld: error: undefined symbol: posix_spawn_file_actions_init
>>> referenced by fdevent.c:495 (../src/src/fdevent.c:495)
>>>               src/test_mod.p/fdevent.c.o:(fdevent_fork_execve)
```

I successfully tested this by using the docker container to
cross-compile this package, then copying the .deb file to
my aarch64 Android 10 device. I was able to successfully test the
resulting program as a functioning web server
at runtime after installing the .deb file by
typing these commands:

```bash
mkdir -p $PREFIX/var/log/lighttpd
mkdir -p $PREFIX/var/www/htdocs
echo 'hello lighttpd' > $PREFIX/var/www/htdocs/index.html
lighttpd -f $PREFIX/etc/lighttpd/lighttpd.conf
```

My Android 10 device's WiFi LAN local IP address is 192.168.120.74, so
then I used a separate computer's web browser to go to this address:
http://192.168.120.74:8080/index.html, where I am able to see the text I
wrote into the `index.html` file, "hello lighttpd"
twaik pushed a commit that referenced this issue Oct 30, 2024
Progress on #21130

Fixes this error during build:

```
ld.lld: error: undefined symbol: posix_spawn_file_actions_init
>>> referenced by fdevent.c:495 (../src/src/fdevent.c:495)
>>>               src/test_mod.p/fdevent.c.o:(fdevent_fork_execve)
```

I successfully tested this by using the docker container to
cross-compile this package, then copying the .deb file to
my aarch64 Android 10 device. I was able to successfully test the
resulting program as a functioning web server
at runtime after installing the .deb file by
typing these commands:

```bash
mkdir -p $PREFIX/var/log/lighttpd
mkdir -p $PREFIX/var/www/htdocs
echo 'hello lighttpd' > $PREFIX/var/www/htdocs/index.html
lighttpd -f $PREFIX/etc/lighttpd/lighttpd.conf
```

My Android 10 device's WiFi LAN local IP address is 192.168.120.74, so
then I used a separate computer's web browser to go to this address:
http://192.168.120.74:8080/index.html, where I am able to see the text I
wrote into the `index.html` file, "hello lighttpd"
termux-pacman-bot added a commit to termux-pacman/termux-packages that referenced this issue Oct 30, 2024
Progress on termux/termux-packages#21130

Fixes this error during build:

```
ld.lld: error: undefined symbol: posix_spawn_file_actions_init
>>> referenced by fdevent.c:495 (../src/src/fdevent.c:495)
>>>               src/test_mod.p/fdevent.c.o:(fdevent_fork_execve)
```

I successfully tested this by using the docker container to
cross-compile this package, then copying the .deb file to
my aarch64 Android 10 device. I was able to successfully test the
resulting program as a functioning web server
at runtime after installing the .deb file by
typing these commands:

```bash
mkdir -p $PREFIX/var/log/lighttpd
mkdir -p $PREFIX/var/www/htdocs
echo 'hello lighttpd' > $PREFIX/var/www/htdocs/index.html
lighttpd -f $PREFIX/etc/lighttpd/lighttpd.conf
```

My Android 10 device's WiFi LAN local IP address is 192.168.120.74, so
then I used a separate computer's web browser to go to this address:
http://192.168.120.74:8080/index.html, where I am able to see the text I
wrote into the `index.html` file, "hello lighttpd"
twaik added a commit that referenced this issue Oct 30, 2024
Fixes error `#error "Cannot find a 32-bit data type"` from `gettext.h` while invoking `build-all.sh` in docker.

Related to #21130.
twaik added a commit that referenced this issue Oct 31, 2024
Fixes error `#error "Cannot find a 32-bit data type"` from `gettext.h` while invoking `build-all.sh` in docker.

Related to #21130.
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 31, 2024
…K internal version file

Progress on termux#21130

This seems to be a completely independent issue from other issues
because it is reproducible in a clean repo using this command:
```
scripts/run-docker.sh ./build-package.sh -I fish
```

I also tried temporarily unapplying the line
`grep -lrw $_TERMUX_TOOLCHAIN_TMPDIR/sysroot/usr/include/c++/v1 -e '<version>' | xargs -n 1 sed -i 's/<version>/\"version\"/g'`
from the end of `termux_setup_toolchain_27b.sh` and deleting the `~/.termux-build/_cache` in case it made any difference,
but at least in my test, it does not seem to make a difference on the fish package (whether or not `#include "version"` or `include <version>` is forced in the toolchain)
so, it seems like the `fish` package itself has to be patched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has build issues Package compilation fails help wanted Help is wanted in order to solve the issue information Informational post packaging Issue related to building packages, not affecting end users directly tracker WIP Work in progress, do not close the issue (PR)
Projects
None yet
Development

No branches or pull requests

7 participants