I'm running Termux 0.65 on an Android 5.1 phone. After the last update (today, Sept 16 2018) I've been getting several instances of
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
whenever running either apt update of pkg upgrade.
I have the same version of the app on a Nexus 4 running LineageOS 15.1 (so based on Android 8.1) and the problem does _not_ occur there.
I've found references to the issue: here, for instance, it's noted as 'normal'. Is it possible to rectify it in any manner?
__Edit__
I'm adding the info requested in a similar context for an analogous error (0x9 rather than 0x8).
The output of which gcc is
/data/data/com.termux/files/usr/bin/gcc
(though I encountered the issue _before_ installing clang). The output of env is
LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
LANG=en_US.UTF-8
MDIR=storage/shared/Android/data/de.danoeh.antennapod/files/media/
EDITOR=emacs -nw
PREFIX=/data/data/com.termux/files/usr
PAGER=/data/data/com.termux/files/usr/bin/less
PWD=/data/data/com.termux/files/home
HOME=/data/data/com.termux/files/home
TMPDIR=/data/data/com.termux/files/usr/tmp
SHELL=/data/data/com.termux/files/usr/bin/bash
TERM=xterm-256color
SHLVL=1
ANDROID_ROOT=/system
ANDROID_DATA=/data
EXTERNAL_STORAGE=/storage/emulated/legacy
PATH=/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
_=/data/data/com.termux/files/usr/bin/env
Finally,
echo "int main() { return 0; }" > test.c
gcc test.c
never returns a warning. So far, commands that have returned the warning (always several instances of it, say 2, 3 or 4) have been
apt update
pkg upgrade
curl
Known issue mentioned (possibly not clearly) in readme for this repository.
Hello here....
I have same problem when I run pkg update && pkg upgrade
How can fix that
My android version is 5.1
You cant do anything really unfortunately. Nature of 5.1.
I see ...... But never have I seen this error .... maybe in the future there will be a solution
how about running "termux-elf-cleaner" on all the binaries and dependencies of apt ?
Maybe it can solve the problem ... but in what Path or directory is the error according to you
"apt update" causes the linker warning: "Unsupported flags DT_FLAGS_1=0x8". plain "apt" or "apt upgrade" doesn't cause the warning, so far.
I will try
Please You have an idea of ​​the path of the error so that I can run termux-elf ....
I have a tricky fix for that!
I've passed stderr to my own stream function!
Then cut off the Warning: linker:* messages!
https://github.com/anikhasibul/wsh
This may give you the tricky bypass from the linker warning messages!
I hope termux team will implement this in the termux app too.
I was thinking more of removing DT_FLAG entries not supported on lollipop linker from concerned binaries but as I don't know the binaries that cause this warnings("curl" and "apt upgrade" so far), can't be sure of the source of problem.
$ ls libcr*
libcroco-0.6.so libcrypto.so
libcrypt.so libcrypto.so.1.1
Those are the dependency that causes the warning message!
$ ls libcr* libcroco-0.6.so libcrypto.so libcrypt.so libcrypto.so.1.1Those are the dependency that causes the warning message!
This confuses me a little @AnikHasibul:
First, which directory are you in? $LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib ?
Secondly, what is the proposed solution? Running termux-elf-cleaner on those files?
Among those files I only have the two libcrypto files (one being a symlink to the other). Running termux-elf-cleaner on them changes nothing, but perhaps this is not what you were proposing?
If I run ldd on $(which curl) for instance I get
libcurl.so
libz.so
libdl.so
libc.so
so totally different .so files than the ones you mention.
The first of those four files is in $LD_LIBRARY_PATH and running termux-elf-cleaner on it changes nothing (warnings still appear), while the last three are in /system/lib/, and termux-elf-cleaner cannot be run on them (Read-only file system error).
Running termux-elf-cleaner on them changes nothing
termux-elf-cleaner is run on files before packaging *.deb file. So if you will run it on files in $PREFIX, probably nothing will be changed. See script build-package.sh (line 1089).
termux-elf-cleaner does not remove DT_FLAGS_1 and this is done intentionally (see https://github.com/termux/termux-elf-cleaner/commit/a2a69ef90fa5f4cecc9ca620fead4d216c39486f).
termux-elf-cleaneris run on files before packaging *.deb file. So if you will run it on files in $PREFIX, probably nothing will be changed. See script build-package.sh (line 1089).
termux-elf-cleanerdoes not removeDT_FLAGS_1and this is done intentionally (see termux/termux-elf-cleaner@a2a69ef).
Ah, I see, thank you! It was a misunderstanding on my part.
I think I'll try something along the lines of @AnikHasibul's trick but without requiring installation of any additional utilities (I want this as portable as self-contained as possible).
For Bash (which is my shell):
There's a Stack Exchange thread addressing the issue of modifying each command before running it.
I'll try to apply that technique to change every $command to $command 2> >(grep -v WARNING). That should prune out all stderr lines containing warnings.
Or for an even less fancy solution, I could just alias commands to their $command 2> >(grep -v WARNING) versions as I encounter the ones that return warnings. The aliasing could be automated through a script so it's done easily on each newly-encountered warning-returning executable.
termux-elf-cleaner does not remove DT_FLAGS_1 and this is done intentionally (see termux/termux-elf-cleaner@a2a69ef).
I see, maybe we want to provide a termux-elf-cleaner-5 package which also strips this symbol, at least while we support android 5
@Grimler91 Problem is that most people don't know when and where to use termux-elf-cleaner. Even if we provide termux-elf-cleaner-5, there still be issues like that.
@xeffyr yeah, you're right
The warning is caused by flag DF_1_NODELETE with tag 0xffffffb and type FLAGS_1. Presence of this flag can be checked by readelf -d <elf-filename> . Look for "NODELETE" in the output or grep it if you like.
In my case ( arch : arm/arm-v7l ) concerned files were :
$PREFIX/lib/libcrypto.so
$PREFIX/lib/libcrypto.so.1.1
$PREFIX/lib/libssl.so.1.1.
For those stuck on Android 5.x who do not like these warnings ( who would ? ) you can use modified termux-elf-cleaner to get rid of unsupported DT entries and flags.
Try https://github.com/Harshiv-Patel/termux-elf-cleaner.git
You will need to build it(on your device),which is fairly easy. Or for devices running arm/arm-v7l here's a google drive link(only tested on one device so far, confirmed working on Samsung SM-E700H):
https://drive.google.com/file/d/1rbRVYiN4EMNfl7ymwerC8rHCOU88Xvaj/view?usp=drivesdk
GCC or CLANG and make are required for building.
make (plain "make" will do), binary termux-elf-cleaner should be available nowcp ./termux-elf-cleaner ../..../../termux-elf-cleaner ./termux-elf-cleanercp ./termux-elf-cleaner $PREFIX/bin/$PREFIX/lib/ and $PREFIX/bin/ (if future updates pollute any binary there)readelf -d <filename> on them, if its dirty, clean it.Thank you @AnikHasibul for pointing out dirty libs. I no longer see warning when doing curl or apt update. :+1: :smiley:
Hopefully this will solve the issue.
Anyone tested the thing posted above for any other devices? It almost appears as if I'm the only noob stuck on Android 5.x.
Anyone tested the thing posted above for any other devices? It almost appears as if I'm the only noob stuck on Android 5.x.
(also noob, also stuck on 5.1 on this particular gadget; device does not do OTA updates and is unsupported by either TWRP or LineageOS, my go-to choices)
Tested just now: works like a charm exactly as instructed: git clone the github link you posted, then cd to the new directory and make; I had clang and make installed beforehand.
In my case the same .so files contained the offending NODELETE entry:
for i in $PREFIX/lib/*.so* ; do [ -z "$(readelf -d "$i" |grep NODELETE)" ] || echo "$i"; done
initially returned
/data/data/com.termux/files/usr/lib/libcrypto.so
/data/data/com.termux/files/usr/lib/libcrypto.so.1.1
/data/data/com.termux/files/usr/lib/libssl.so
/data/data/com.termux/files/usr/lib/libssl.so.1.1
I ran your executable on those and the warnings are gone. Specifically, apt update dropped the warnings after treating the libssl file; it was unaffected by libcrypto.
Anyway, thank you!
Glad to hear it. If someone can confirm it for aarch64, we'd be good to close the issue.
@stuart-little If you're running on same device as me, that is SM-E700H/DD/M/F , TWRP is available on XDA and I'm using it(its not maintained though), not officially supported by TWRP. But it gets most of the important stuff done. As far as ROMs are concerned, stock one is the stable most for daily driver, not that there are any custom ROMs available.
The XDA thread for twrp: https://forum.xda-developers.com/galaxy-e-series/orig-development/recovery-twrp-touch-recovery-sm-e700-t3267563
and page for Odin flashable file : https://androidfilehost.com/?fid=24369303960683348
Don't working for me ..
I hope it's my Android Rom...
@Ambroise7 , please make sure you followed all the steps correctly and share the output of termux-info as well as output for @stuart-little 's one-liner finder :
for i in $PREFIX/lib/*.so* do [ -z "$(readelf -d "$i" |grep NODELETE)" ] || echo "$i"; done
As well as what exact commands produce warnings, and how many(warnings).
That is my termux-info...
Updatable packages:
All packages up to date
System information:
Linux localhost 3.10.65 #11 SMP PREEMPT Mon Dec 19 19:02:51 CST 2016 armv7l Android
Termux-packages arch:
arm
Android version:
5.1
Device manufacturer:
InnJoo
Device model:
Halo Plus
Terminated
Now if I tape apt update or nmap or ./metasploit-framework i see this error linker
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
Running the modified version of termux-elf-cleaner on
/data/data/com.termux/files/usr/lib/libcrypto.so
/data/data/com.termux/files/usr/lib/libcrypto.so.1.1
/data/data/com.termux/files/usr/lib/libssl.so
/data/data/com.termux/files/usr/lib/libssl.so.1.1
should fix the apt update related warnings.
Anyway, do the one thing that remains, run the for I in $PREFIX... finder mentioned earlier and we should know which exact files need cleaning.
Also, when you do apt update does the warning come up 3 or 6 times (or any other number of times)?
@Harshiv-Patel:
Glad to hear it. If someone can confirm it for aarch64, we'd be good to close the issue.
@stuart-little If you're running on same device as me, that is SM-E700H/DD/M/F , TWRP is available on XDA
Thanks for that, but no, that's not the gadget. Fat chance you'd guess it anyway: there are apparently over 4000 different Android-running devices out there :). It's an Allview A5 Quad Plus.
I was at one point considering compiling TWRP and some ROM from source for it, but it's just not worth the headache for me.. I'll just use it until Android 5.1 rots and then switch to something more hackable / rootable.
and I'm using it(its not maintained though), not officially supported by TWRP. But it gets most of the important stuff done. As far as ROMs are concerned, stock one is the stable most for daily driver, not that there are any custom ROMs available.
The XDA thread for twrp: https://forum.xda-developers.com/galaxy-e-series/orig-development/recovery-twrp-touch-recovery-sm-e700-t3267563
and page for Odin flashable file : https://androidfilehost.com/?fid=24369303960683348
Those are good links to have anyway. Thanks!
Please but how can run this version of termux-elif-cleaner ...
Which command I will tape
Le lun. 24 sept. 2018 13:29, Harshiv-Patel notifications@github.com a
écrit :
Running the modified version of termux-elf-cleaner on
/data/data/com.termux/files/usr/lib/libcrypto.so
/data/data/com.termux/files/usr/lib/libcrypto.so.1.1
/data/data/com.termux/files/usr/lib/libssl.so
/data/data/com.termux/files/usr/lib/libssl.so.1.1should fix the apt update related warnings.
Anyway, do the one thing that remains, run the for I in $PREFIX... finder
mentioned earlier and we should know which exact files need cleaning.
Also, when you do `apt updatedoes the warning come up 3 or 6 times (or
any other number of times)?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/2846#issuecomment-423957820,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Akuf-9XVzkS1to1WAihBifWwAqotlMamks5ueNAsgaJpZM4WrJSV
.
@Ambroise7 , The simplest but less reliable way is,
cp $PREFIX/bin/termux-elf-cleaner ~/ we backup the original file to ~/ dir,cp -f ./termux-elf-cleaner $PREFIX/bin/ we replace the original with modified one, - - copy and paste the whole line of for i in... above in terminal and it should find the files causing warnings.Ok...
/data/data/com.termux/files/usr/lib/libcrypto.so
/data/data/com.termux/files/usr/lib/libcrypto.so.1.1
/data/data/com.termux/files/usr/lib/libssl.so
/data/data/com.termux/files/usr/lib/libssl.so.1.1
Thanks i solve it 😘
Perhaps we should add stripping of DT_FLAGS_1 in the official package by reverting https://github.com/termux/termux-elf-cleaner/commit/a2a69ef for now? Do we know if removing it could cause any problem on later Android versions?
When can always change it back after a new package Android 7+ package repo is created as discussed in #2874.
Numbers are not in favor of Android 5.x and despite ugly warnings concerned executables do function.
What with more than 85% of active installation running on Android 6 and higher, it'd be safe to revert the termux/termux-elf-cleaner@a2a69ef after Android 7+ repo gets ready.
SM-J210F running Android 6.0.1 doesn't seem to care whether NODELETE was present or absent in $PREFIX/lib/libssl.so . It still functions without any unusual behavior. Test on one is basically irrelevant though.
I didn't need to run it on the *.1.1 files, only the other two.
I renamed it termux-elf-cleaner-5, like @Grimler91 suggested.
@Harshiv-Patel Thanks for this, it works, now curl is OK. But curiously, it itself gives a warning for me. Though it doesn't really matter, since I won't use it often.
$ termux-elf-cleaner-5
WARNING: linker: termux-elf-cleaner-5: unused DT entry: type 0x6ffffef5 arg 0x524
usage: termux-elf-cleaner-5 <filenames>
Processes ELF files to remove unsupported section types
and dynamic section entries which the Android linker warns about.
That's what the GNU_HASH ( 0x6ffffef5 ) step is supposed to do :
this copy of termux-elf-cleaner has GNU_HASH entry in it, to remove it (optional) you need to run termux-elf-cleaner on itself. simply do:
cp ./termux-elf-cleaner ../..
../../termux-elf-cleaner ./termux-elf-cleaner
cp ./termux-elf-cleaner $PREFIX/bin/
The clang given with Termux has this bug/feature whatever. It adds GNU_HASH entry in binaries, which is not supported on Android 5.x. Hence the warning.
@Harshiv-Patel Of course! I didn't think of that. I see making a cp is necessary, as you get Text file busy if it tries to ckean itself.
@harshiv-patel
In my case,its didnt working
I dont know why
I try go to cd $PREFIX/bin and find termux-elf-cleaner
But i try like you do,but error still show up
I used arm64 on android 5.1
Can you give me some spesific command for this issues? Im glad if you tell me step by step for this issues
@XSecr3t , Unfortunately I don't have a 64bit device at hand to test for.
Did you build it on your (arm64)device or downloaded from Google Drive link? just to verify. Building it on your device should work.
Are you able to run the executable w/o any errors?
There should be a hexadecimal number followed by error, something like: "0x6ffffef5", post that number here.
Please make sure that you followed every step correctly,
@Harshiv-Patel
I build with arm64 aarch64
This the hexadecimal result above show in my termux
[email protected]:~#pkg install
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
I run every command always show that hexadecimal warning
Pkg
Apt
Msfconsole
Always show
try running the modified elf cleaner binary you built on device on these files:
/data/data/com.termux/files/usr/lib/libcrypto.so
/data/data/com.termux/files/usr/lib/libcrypto.so.1.1
/data/data/com.termux/files/usr/lib/libssl.so
/data/data/com.termux/files/usr/lib/libssl.so.1.1
and
try
for i in $PREFIX/lib/*.so* do [ -z "$(readelf -d "$i" |grep NODELETE)" ] || echo "$i"; done
which should find you the culprit libs.
Also check dependencies of Msfconsole.
@harshiv-Patel
Is this true command?
[email protected]:~#termux-elf-cleaner /data/data/com.termux/files/usr/lib/libcrypto.so
WARNING: linker: termux-elf-cleaner: unused DT entry: type 0x6ffffef5 arg 0x398
termux-elf-cleaner: Replacing unsupported DF_1_* flags 8 with 0 in '/data/data/com.termux/files/usr/lib/libcrypto.so'
[email protected]:~#termux-elf-cleaner/data/data/com.termux/files/usr/lib/libcrypto.so.1.1
bash: termux-elf-cleaner/data/data/com.termux/files/usr/lib/libcrypto.so.1.1: Not a directory
[email protected]:~#termux-elf-cleaner /data/data/com.termux/files/usr/lib/libcrypto.so.1.1
WARNING: linker: termux-elf-cleaner: unused DT entry: type 0x6ffffef5 arg 0x398
[email protected]:~#termux-elf-cleaner /data/data/com.termux/files/usr/lib/libssl.so
WARNING: linker: termux-elf-cleaner: unused DT entry: type 0x6ffffef5 arg 0x398
termux-elf-cleaner: Replacing unsupported DF_1_* flags 8 with 0 in '/data/data/com.termux/files/usr/lib/libssl.so'
[email protected]:~#termux-elf-cleaner /data/data/com.termux/files/usr/lib/libssl.so.1.1
WARNING: linker: termux-elf-cleaner: unused DT entry: type 0x6ffffef5 arg 0x398
Wow its works!!
When i run pkg install and apt not show warning linker
But my msfconsole still showing Warning Linker.
Wow, new error show up
[email protected]:~#msfconsole
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.0/lib/nokogiri/nokogiri.so: unused DT entry: type 0x6ffffef5 arg 0xba0 WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/pcaprub-0.12.4/lib/pcaprub_c.so: unused DT entry: type 0x6ffffef5 arg 0x3e0 WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/bcrypt-3.1.12/lib/bcrypt_ext.so: unused DT entry: type 0x6ffffef5 arg 0x2d0
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/msgpack-1.2.4/lib/msgpack/msgpack.so: unused DT entry: type 0x6ffffef5 arg 0x690
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/redcarpet-3.4.0/lib/redcarpet.so: unused DT entry: type 0x6ffffef5 arg 0x330
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/pg_array_parser-0.0.9/lib/pg_array_parser/pg_array_parser.so: unused DT entry: type 0x6ffffef5 arg 0x230
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0x6ffffef5 arg 0xbc8
[-] Failed to connect to the database: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/network_interface-0.0.2/lib/network_interface_ext.so: unused DT entry: type 0x6ffffef5 arg 0x270
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.so: unused DT entry: type 0x6ffffef5 arg 0x620
Unable to handle kernel NULL pointer dereference at virtual address 0xd34db33f
EFLAGS: 00010046
eax: 00000001 ebx: f77c8c00 ecx: 00000000 edx: f77f0001
esi: 803bf014 edi: 8023c755 ebp: 80237f84 esp: 80237f60
ds: 0018 es: 0018 ss: 0018
Process Swapper (Pid: 0, process nr: 0, stackpage=80377000)
Stack: 90909090990909090990909090
90909090990909090990909090
90909090.90909090.90909090
90909090.90909090.90909090
90909090.90909090.09090900
90909090.90909090.09090900
..........................
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
ccccccccc.................
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
.................ccccccccc
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
..........................
ffffffffffffffffffffffffff
ffffffff..................
ffffffffffffffffffffffffff
ffffffff..................
ffffffff..................
ffffffff..................
Code: 00 00 00 00 M3 T4 SP L0 1T FR 4M 3W OR K! V3 R5 I0 N4 00 00 00 00
Aiee, Killing Interrupt handler
Kernel panic: Attempted to kill the idle task!
In swapper task - not syncing
After use elf cleaner this error show
Now that we know that shared library files under $PREFIX/lib/ruby are causing the errors, you can "clean" every one of those files that give the error. Kernel panics and debugging them is unrelated to the issue, and frankly I know nothing about them.
@Harshiv-Patel
So, what should i do? What kind of files should i clean? Can you give me spesific path?
The "spesific path[s]" are in your previous reply 30mins ago.
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/nokogiri-1.8.0/lib/nokogiri/nokogiri.so
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/pcaprub-0.12.4/lib/pcaprub_c.so
...
and so on. Every shared lib that gives out 0x6ffffef5 (GNU_HASH) entry error.
@Harshiv-Patel
But warning linker still showing up, its looks like different linker
See this
[email protected]:~#msfconsole
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/bcrypt-3.1.12/lib/bcrypt_ext.so: unused DT entry: type 0x6ffffef5 arg 0x2d0
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/msgpack-1.2.4/lib/msgpack/msgpack.so: unused DT entry: type 0x6ffffef5 arg 0x690
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/redcarpet-3.4.0/lib/redcarpet.so: unused DT entry: type 0x6ffffef5 arg 0x330
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/pg_array_parser-0.0.9/lib/pg_array_parser/pg_array_parser.so: unused DT entry: type 0x6ffffef5 arg 0x230
WARNING: linker: /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/pg-0.20.0/lib/pg_ext.so: unused DT entry: type 0x6ffffef5 arg 0xbc8
Well
Thanks for the help @Harshiv-Patel
With my intelegent i see the warning linker always show up that because the path where warning linker showing is not cleaning
So when i run
termux-elf-cleaner
Ex : termux-elf-cleaner /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/msgpack-1.2.4/lib/msgpack/msgpack.so
And my msfconsole is clean :D
All CLEAR
THANKS FOR THE HELP!! it really helping me for fix this problems after two weeks ago
Edited :
Well guys, if you having some trouble like this for android 5.1
All you need to do is
Download git clone https://github.com/termux/termux-elf-cleaner
And try for install first
Then
you can see your linker warning like
/data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/msgpack-1.2.4/lib/msgpack/msgpack.so
Clean everything and do the same things after the linker warning problem above is clean using this similiar command
Ex : termux-elf-cleaner /data/data/com.termux/files/usr/lib/ruby/gems/2.5.0/gems/msgpack-1.2.4/lib/msgpack/msgpack.so ( this linker warning should be change to your linker warning above that you have trouble is)
Happy clean /:~
Problem solved..
I not guarantee if this is work for another version androis but you can try.
@XSecr3t , if you had carefully read through the thread from start, you could have solved the problem much faster than getting help from someone here, so I suggest you to always go through the thread before posting here, as each message/reply here goes to every mail-list subscriber.
Just a heads up that upgrading the affected packages will undo this, so you'll have to undertake the procedure again. I just had to do that after the most recent apt full-upgrade (and referred to this thread to remind myself how it went).
It might be profitable to alias the process to a short command in order to run it more easily. Say something like
alias elfc='for i in $PREFIX/lib/*.so* ; do [ -z "$(readelf -d "$i" |grep NODELETE)" ] || termux-elf-cleaner "$i"; done'
in your .bashrc file. Then, running elfc after having added @Harshiv-Patel's termux-elf-cleaner executable to $PREFIX/bin should do the trick every time the problem reoccurs.
Well, for me it's the openssl updates, "$PREFIX/lib/libssl.so"(or associated destination file) and "$PREFIX/lib/libcrypto.so"(or associated destination file) that cause the warnings(every single time).
I think cleaning these two files after update/upgrade seems somewhat better(for me atleast):
alias update='apt upgrade && termux-elf-cleaner $PREFIX/lib/libssl.so $PREFIX/lib/libcrypto.so'
Of course, every user will have different config and different culprit files so this thing is pretty much user dependent.
Reached same warnings on Android 5.1.x with latest Termux 0.66
Help me for
exec("/data/data/com.termux/files/usr/bin/login") : permission denied
https://youtu.be/IAKXvyTz52c > Script link ..... > http://bit.ly/2IqmSIi
Link http://bit.ly/2IqmSIi contains ADS. Why not to just write instructions here or at least use real link https://github.com/InformaTutos-geek/Termux-cleaner ?
Utility termux-elf-cleaner provided in https://github.com/InformaTutos-geek/Termux-cleaner is only for ARM:
[xeffyr]:~:$ file termux-elf-cleaner
termux-elf-cleaner: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, with debug_info, not stripped
About Link It is bitly short Link
Le dim. 17 févr. 2019 22:50, Leonid Plyushch notifications@github.com a
écrit :
https://youtu.be/IAKXvyTz52c > Script link ..... > http://bit.ly/2IqmSIi
1.
Link http://bit.ly/2IqmSIi contains ADS. Why not to just write
instructions here or at least use real link
https://github.com/InformaTutos-geek/Termux-cleaner ?
2.Utility termux-elf-cleaner provided in
https://github.com/InformaTutos-geek/Termux-cleaner is only for ARM:[xeffyr]:~:$ file termux-elf-cleaner
termux-elf-cleaner: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /system/bin/linker, with debug_info, not stripped—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/termux/termux-packages/issues/2846#issuecomment-464514360,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Akuf-5vxRtdjOMy_f4vIL-CO7NpEEhkFks5vOc6vgaJpZM4WrJSV
.
About Link It is bitly short Link
That's okay. But why it redirects to ad page (uclaut.net) in the middle ? Notice that ads (for any purpose) are very discouraged here.
Redirect logs:
[xeffyr]:~:$ curl -LI http://bit.ly/2IqmSIi
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sun, 17 Feb 2019 22:05:59 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 110
Connection: keep-alive
Cache-Control: private, max-age=90
Location: http://dapalan.com/StSr
HTTP/1.1 301 Moved Permanently
Date: Sun, 17 Feb 2019 22:05:59 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: __cfduid=d81985b5839ac3f780e2d41f80865ee511550441159; expires=Mon, 17-Feb-20 22:05:59 GMT; path=/; domain=.dapalan.com; HttpOnly
Set-Cookie: FLYSESSID=7bb0084ae195e6b47872b7bffeff90973d7f96ec; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
X-Powered-By: adfly
Location: http://uclaut.net/-64808YHNB/StSr?rndad=1565173352-1550441159
X-Turbo-Charged-By: LiteSpeed
Server: cloudflare
CF-RAY: 4aab8efecb378ae0-KBP
I do not know ... but I have already withdrawn my publication
@Harshiv-Patel
Glad to hear it. If someone can confirm it for aarch64, we'd be good to close the issue.
If you still need this info I can confirm that it worked for mine.
This is my termux-info
Updatable packages:
All packages up to date
System information:
Linux localhost 3.10.72+ #1 SMP PREEMPT Thu Jul 7 19:25:40 CST 2016 aarch64 Android
Termux-packages arch:
aarch64
Android version:
5.1
Device manufacturer:
ALLVIEW
Device model:
X2_Soul_Xtreme
Thanks for the help.
Also see #3382 for recently added support for building termux-elf-cleaner for a specific Android version (by API level.)
@Quasic It does not solve #2846. The API version specified at compile-time and main purpose is to prepare for https://github.com/termux/termux-packages/issues/2874. But I can make fix for this issue too.
Yeah, it would be nice to be able to build for an API on device.
Should be finally solved by https://github.com/termux/termux-packages/pull/3434.
If you found that something produces linker warnings, post either here or to new issue so package will be rebuilt and processed by new elf cleaner.
Should be finally solved by
Should we install termux-elf-cleaner or need wait for next release of Termux app?
a. It is not merged currently.
b. It is a regular package (as always).
c. With its release nothing will suddenly get fixed unless someone reports which packages produce linker warnings - these packages should be rebuilt after termux-elf-cleaner update.
which packages produce linker warnings
Currently I always got linker warnings when execute any commands (bash script; package upgrading; any Python scripts such as youtube-dl; etc.)
The warnings occur more frequently due to dependencies. Any time it links to an affected binary, the warning is issued. Most packages seem to be unaffected on my arm device. Only two library files that I've found, so far. (Both are in package openssl.) When openssl updates, I get linker warnings until my cleaner runs on those two files immediately after.
YouTube-dl works on my arm Android 5 without linker warnings after cleaning. I'll try disabling my autocleaner to see if I still need it for the next update. (Just updated with it today.)
Still needed cleaning after upgrading openssl today...
Still needed cleaning after upgrading openssl today...
Of course, termux-elf-cleaner merged but not actually updated.
Debs for new cleaner can be obtained from CI build:
aarch64: https://gitlab.com/termux-mirror/termux-packages/-/jobs/171162386/artifacts/browse/debs/
arm: https://gitlab.com/termux-mirror/termux-packages/-/jobs/171162387/artifacts/browse/debs/
i686: https://gitlab.com/termux-mirror/termux-packages/-/jobs/171162388/artifacts/browse/debs/
x86_64: https://gitlab.com/termux-mirror/termux-packages/-/jobs/171162389/artifacts/browse/debs/
Download and install termux-elf-cleaner v1.4 or higher. You can use URLs above.
For those who is not familiar with dpkg: install *.deb package with dpkg -i ${packagename}, where ${packagename} is path to *.deb file you want to install.
Verify that you have installed termux-elf-cleaner v1.4 or higher: dpkg -l termux-elf-cleaner and check version number.
Execute termux-elf-cleaner on all *.so files in $PREFIX/lib.
Execute termux-elf-cleaner on all binaries in $PREFIX/bin.
I am using a Kindle Fire 7, so I am stuck with Fire OS (fork of Android 5).
I tried using the elf-cleaner @xeffyr suggested (arm: https://gitlab.com/termux-mirror/termux-packages/-/jobs/171162387/artifacts/browse/debs/) on all the so files I could find, but I still get this:
WARNING: linker: Unsupported flags DT_FLAGS_1=0x8
Any help would be appreciated.
yep i have this problem to how can i fix it
Most helpful comment
The warning is caused by flag
DF_1_NODELETEwith tag0xffffffband typeFLAGS_1. Presence of this flag can be checked byreadelf -d <elf-filename>. Look for "NODELETE" in the output or grep it if you like.In my case ( arch : arm/arm-v7l ) concerned files were :
$PREFIX/lib/libcrypto.so$PREFIX/lib/libcrypto.so.1.1$PREFIX/lib/libssl.so.1.1.For those stuck on Android 5.x who do not like these warnings ( who would ? ) you can use modified
termux-elf-cleanerto get rid of unsupported DT entries and flags.Try https://github.com/Harshiv-Patel/termux-elf-cleaner.git
You will need to build it(on your device),which is fairly easy. Or for devices running
arm/arm-v7lhere's a google drive link(only tested on one device so far, confirmed working on Samsung SM-E700H):https://drive.google.com/file/d/1rbRVYiN4EMNfl7ymwerC8rHCOU88Xvaj/view?usp=drivesdk
GCC or CLANG and make are required for building.
make(plain "make" will do), binary termux-elf-cleaner should be available nowcp ./termux-elf-cleaner ../..../../termux-elf-cleaner ./termux-elf-cleanercp ./termux-elf-cleaner $PREFIX/bin/There you have a copy of termux-elf-cleaner (which should be only used on Android 5.x, not on 6.0+)
$PREFIX/lib/and$PREFIX/bin/(if future updates pollute any binary there)readelf -d <filename>on them, if its dirty, clean it.May be future build for Android 5.x (the separate repo devs are talking about) will have all these steps included.
Thank you @AnikHasibul for pointing out dirty libs. I no longer see warning when doing
curlorapt update. :+1: :smiley:Hopefully this will solve the issue.