ferion11 / danrepo

Gentoo Linux - Personal Portage Overlay
MIT License
6 stars 0 forks source link

sys-auth/polkit-0.116-r3 with duktape #2

Closed oniGino closed 4 years ago

oniGino commented 4 years ago

for some reason this is broken for me

any clues?


(gdb) run
Starting program: /usr/lib/polkit-1/polkitd
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Successfully changed to user polkitd
[New Thread 0x7ffff775d700 (LWP 28380)]
[New Thread 0x7ffff6f5c700 (LWP 28381)]
/usr/lib/polkit-1/polkitd: symbol lookup error: /usr/lib64/libduktape.so.202: undefined symbol: __fpclassify
[Thread 0x7ffff6f5c700 (LWP 28381) exited]
[Thread 0x7ffff7776800 (LWP 28376) exited]
[Inferior 1 (process 28376) exited with code 0177]
(gdb) step```
ferion11 commented 4 years ago

The more close that I can think is: https://github.com/ARM-software/optimized-routines/issues/2 The patch: https://github.com/ferion11/danrepo/releases/download/polkit_patchs/polkit-0.116-duktape.patch.gz Include the line: +libpolkit_backend_1_la_LIBADD += -lm for the "la", I wonder if the ".so" don't have it too.

Maybe updating the duktape to v2.5.0, and/or using polkit v0.115-r7 instead, would solve this. But without replicating it, I can't be sure.

ferion11 commented 4 years ago

Please try using this duktape ebuild: duktape_mod_ebuild-2.5.0.tar.gz I have added "libm.so" reference to the "libduktape.so". Note that you will have to rebuild the polkit after install the new duktape.

ferion11 commented 4 years ago
ferion11 commented 4 years ago
ferion11 commented 4 years ago

ok! Now you should be able to debug, then I will close this issue.

oniGino commented 4 years ago

Hey sorry for the delay, here is the new error, looks like you improved things slightly with your new patch


~ $ sudo /usr/lib/polkit-1/polkitd
Successfully changed to user polkitd
19:32:16.596: Loading rules from directory /etc/polkit-1/rules.d
19:32:16.596: Loading rules from directory /usr/share/polkit-1/rules.d
/usr/lib/polkit-1/polkitd: symbol lookup error: /usr/lib64/libduktape.so.205: undefined symbol: fmod```

same error in 0.115-r7 as well as 0.116-r3
ferion11 commented 4 years ago

ok! Try using this ebuild: duktape_mod_ebuild-2.5.0-r3.tar.gz If don't work, then please post the output of:

ldd -r /usr/lib64/libduktaped.so.205

and other possible error message. EDIT: I will need your emerge --info too. And just to be sure nm /usr/lib/polkit-1/polkitd

oniGino commented 4 years ago

pretty sure that fixed it, going to reboot to be certain

$ sudo /usr/lib/polkit-1/polkitd
Successfully changed to user polkitd
21:20:17.479: Loading rules from directory /etc/polkit-1/rules.d
21:20:17.480: Loading rules from directory /usr/share/polkit-1/rules.d
21:20:17.480: Finished loading, compiling and executing 4 rules
Entering main event loop
Connected to the system bus
21:20:17.480: Lost the name org.freedesktop.PolicyKit1 - exiting
Shutting down
Exiting with code 0

But also I do have a linker problems turns out I need a multilib kernel? weird

$ nm /usr/lib/polkit-1/polkitd
nm: /usr/lib/polkit-1/polkitd: no symbols

$ ldd -r /usr/lib64/libduktaped.so.205
/usr/bin/ldd: line 160: /lib/ld-linux.so.2: cannot execute binary file: Exec format error
        linux-vdso.so.1 (0x00007fffa5584000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f9d57af2000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f9d57923000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f9d57cbc000)
oniGino commented 4 years ago

fixed, thanks! maybe leave the libm in?

ferion11 commented 4 years ago

fixed, thanks! maybe leave the libm in?

I will leave it in the ebuild enabled by the flag only (not default), because here ldd -u /usr/lib64/libduktape.so give me:

Unused direct dependencies:
    /lib64/libm.so.6

The normal of duktape is the libm be linked on the polkit. But it, on the ".so", can be useful for debug.