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

[Bug]: swift could not be installed #21903

Open
afrhan-repo opened this issue Oct 20, 2024 · 10 comments
Open

[Bug]: swift could not be installed #21903

afrhan-repo opened this issue Oct 20, 2024 · 10 comments
Labels
bug report Something is not working properly

Comments

@afrhan-repo
Copy link

Problem description

I tried to install swift on my system but unsatisfied dependency error occurred

`pkg install swift
Checking availability of current mirror:
[*] https://ftp.agdsn.de/termux/termux-main: ok
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

Unsatisfied dependencies:
libobjc2 : Conflicts: libblocksruntime but 1:5.10 is to be installed
Error: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.`

What steps will reproduce the bug?

pkg install swift

What is the expected behavior?

I should install without any broken dependency.

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=GITHUB
TERMUX_APP_AM_SOCKET_SERVER_ENABLED=true
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PACKAGE_VARIANT=apt-android-7
TERMUX_APP_PID=4573
TERMUX_IS_DEBUGGABLE_BUILD=1
TERMUX_VERSION=0.119.1
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://ftp.agdsn.de/termux/termux-main stable main
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://ftp.agdsn.de/termux/termux-x11 x11 main
# sources.list.d/termux-adb.list
deb https://nohajc.github.io termux extras
# root-repo (sources.list.d/root.list)
deb https://ftp.agdsn.de/termux/termux-root root stable
Updatable packages:
audacity-ffmpeg/x11 3.6.4-1 aarch64 [upgradable from: 3.6.4]
audacity/x11 3.6.4-1 aarch64 [upgradable from: 3.6.4]
command-not-found/stable 2.4.0-47 aarch64 [upgradable from: 2.4.0-46]
gnupg/stable 2.4.5-3 aarch64 [upgradable from: 2.4.5-2]
gpgme/stable 1.23.2-3 aarch64 [upgradable from: 1.23.2-2]
gpgv/stable 2.4.5-3 aarch64 [upgradable from: 2.4.5-2]
libassuan/stable 3.0.1 aarch64 [upgradable from: 2.5.7-1]
libuv/stable 1.49.2 aarch64 [upgradable from: 1.49.1]
pinentry/stable 1.3.1-1 aarch64 [upgradable from: 1.3.1]
termux-tools version:
1.44.1
Android version:
9
Kernel build information:
Linux localhost 4.4.153-perf+ #1 SMP PREEMPT Thu Sep 17 11:35:50 WIB 2020 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Note 5 Pro
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:15
com.termux.styling versionCode:1000
@afrhan-repo afrhan-repo added bug report Something is not working properly untriaged labels Oct 20, 2024
@twaik
Copy link
Member

twaik commented Oct 20, 2024

Ping @fornwall @Grimler91 @finagolfin because you commited to swift build recipes.

@fingolfin
Copy link
Contributor

Nope I never did that (I only contributed to the package for the computer algebra system "gap", other than that I don't even use termux myself, nor swift)

@twaik
Copy link
Member

twaik commented Oct 20, 2024

Sorry, wrong ping.

@finagolfin
Copy link
Member

It looks like libobjc2 ships with its own blocks runtime which conflicts with the one from Swift, as detailed in the linked issue from our build script. It appears you have to choose one or the other, they conflict for a reason.

Of course, you could always submit a patch to make them play nice, if you need both.

@truboxl truboxl removed the untriaged label Oct 20, 2024
@afrhan-repo
Copy link
Author

My problem is solved by doing
apt reinstall libblocksruntime,then I successfully installed swift

@twaik
Copy link
Member

twaik commented Oct 20, 2024

@finagolfin
It seems like the problem in referenced issue is gone or not reproducible in termux anymore.

twaik@twaikpc:~/termux-packages$ for i in libdispatch libobjc2; do termux apt-file show $i | grep -v "/usr/share/"; done
apt-file show libdispatch
libdispatch: /data/data/com.termux/files/usr/include/dispatch/base.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/block.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/data.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/dispatch.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/group.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/introspection.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/io.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/object.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/once.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/queue.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/semaphore.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/source.h
libdispatch: /data/data/com.termux/files/usr/include/dispatch/time.h
libdispatch: /data/data/com.termux/files/usr/include/os/generic_base.h
libdispatch: /data/data/com.termux/files/usr/include/os/generic_unix_base.h
libdispatch: /data/data/com.termux/files/usr/include/os/generic_win_base.h
libdispatch: /data/data/com.termux/files/usr/include/os/object.h
libdispatch: /data/data/com.termux/files/usr/lib/libdispatch.so
apt-file show libobjc2
libobjc2: /data/data/com.termux/files/usr/include/Block.h
libobjc2: /data/data/com.termux/files/usr/include/Block_private.h
libobjc2: /data/data/com.termux/files/usr/include/objc/Availability.h
libobjc2: /data/data/com.termux/files/usr/include/objc/Object.h
libobjc2: /data/data/com.termux/files/usr/include/objc/Protocol.h
libobjc2: /data/data/com.termux/files/usr/include/objc/blocks_private.h
libobjc2: /data/data/com.termux/files/usr/include/objc/blocks_runtime.h
libobjc2: /data/data/com.termux/files/usr/include/objc/capabilities.h
libobjc2: /data/data/com.termux/files/usr/include/objc/developer.h
libobjc2: /data/data/com.termux/files/usr/include/objc/encoding.h
libobjc2: /data/data/com.termux/files/usr/include/objc/hooks.h
libobjc2: /data/data/com.termux/files/usr/include/objc/message.h
libobjc2: /data/data/com.termux/files/usr/include/objc/objc-api.h
libobjc2: /data/data/com.termux/files/usr/include/objc/objc-arc.h
libobjc2: /data/data/com.termux/files/usr/include/objc/objc-auto.h
libobjc2: /data/data/com.termux/files/usr/include/objc/objc-class.h
libobjc2: /data/data/com.termux/files/usr/include/objc/objc-runtime.h
libobjc2: /data/data/com.termux/files/usr/include/objc/objc-visibility.h
libobjc2: /data/data/com.termux/files/usr/include/objc/objc.h
libobjc2: /data/data/com.termux/files/usr/include/objc/runtime-deprecated.h
libobjc2: /data/data/com.termux/files/usr/include/objc/runtime.h
libobjc2: /data/data/com.termux/files/usr/include/objc/slot.h
libobjc2: /data/data/com.termux/files/usr/lib/libobjc.so
libobjc2: /data/data/com.termux/files/usr/lib/pkgconfig/libobjc.pc

libdispatch does not ship Block.h or Block_private.h so there is no interference. Should we remove the TERMUX_PKG_CONFLICTS?

@twaik
Copy link
Member

twaik commented Oct 20, 2024

Probably fixed by this. gnustep/libobjc2#293

@finagolfin
Copy link
Member

libdispatch does not ship Block.h or Block_private.h so there is no interference.

The issue is not libdispatch but libblocksruntime:

> dpkg -L libblocksruntime | ag usr/include/
/data/data/com.termux/files/usr/include/Block.h

@twaik
Copy link
Member

twaik commented Oct 21, 2024

Oh, right. Sorry.

@finagolfin
Copy link
Member

Probably fixed by this. gnustep/libobjc2#293

We could probably use that in the next libobjc2 release to remove this conflict, or backport that patch to the current release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly
Projects
None yet
Development

No branches or pull requests

5 participants