Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to start on AsusWRT-Merlin with optware-ng
09-05-2016, 23:34 (This post was last modified: 10-05-2016 00:01 by z4r9.)
Post: #1
Question Unable to start on AsusWRT-Merlin with optware-ng
Has anyone gotten MinimServer running on AsusWRT-Merlin (RT-AC87U) with optware-ng? I'm getting an error pertaining to libohNet.so upon execution. Is my environment broken or do I need to compile libohNet.so against the libraries in my environment?

MinimServer-0.8.4-linux-arm.tar.gz

Code:
# ./bin/setup

MinimServer desktop integration is not available
MinimServer automatic startup is not available

Do you want to change these settings (y/n)?
n
# ./bin/startc
MinimServer 0.8.4 update 83, Copyright (c) 2012-2016 Simon Nash. All rights reserved.
java.lang.UnsatisfiedLinkError: /tmp/mnt/sda1/minimserver/tmp/native/libohNet.so: File not found
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1837)
        at java.lang.Runtime.loadLibrary0(Runtime.java:870)
        at java.lang.System.loadLibrary(System.java:1122)
        at org.jminim.lib.OhNetService.createLibrary(OhNetService.java:573)
        at org.jminim.lib.OhNetService.createDeviceStack(OhNetService.java:480)
        at org.jminim.lib.OhNetService.createDeviceFactory(OhNetService.java:383)
        at org.jminim.lib.OhNetService.access$1800(OhNetService.java:47)
        at org.jminim.lib.OhNetService$Proxy.createDeviceFactory(OhNetService.java:949)
        at org.jminim.lib.MonitorService$Monitor.createDevice(MonitorService.java:263)
        at org.jminim.lib.MonitorService$Monitor.listenerAdded(MonitorService.java:339)
        at org.jminim.core.RuntimeImpl.addEventListener(RuntimeImpl.java:1285)
        at org.jminim.lib.RuntimeService$Proxy.addEventListener(RuntimeService.java:217)
        at com.minimserver.Server.doStart(Server.java:693)
        at com.minimserver.Server.start(Server.java:456)
        at org.jminim.core.ContextImpl.startComponent(ContextImpl.java:167)
        at org.jminim.core.ContextImpl.start(ContextImpl.java:92)
        at org.jminim.core.RootContextImpl.startComponent(RootContextImpl.java:47)
        at org.jminim.core.ContextImpl.start(ContextImpl.java:92)
        at org.jminim.core.RuntimeImpl.run(RuntimeImpl.java:1417)
        at org.jminim.core.LauncherImpl.run(LauncherImpl.java:1110)
        at org.jminim.core.LauncherImpl.launch(LauncherImpl.java:121)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav​a:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.jminim.launch.Launcher.doLaunch(Launcher.java:677)
        at org.jminim.launch.Launcher.launch(Launcher.java:210)
        at com.minimserver.launch.LaunchServer.main(LaunchServer.java:34)
MinimServer error: now stopped, use 'restart' or 'exit'
Enter command (? for help):
>
# ls -la /tmp/mnt/sda1/minimserver/tmp/native/libohNet.so
-rw-rw-rw-    1 user     root       1776112 May  9 21:57 /tmp/mnt/sda1/minimserver/tmp/native/libohNet.so
# ldd /tmp/mnt/sda1/minimserver/tmp/native/libohNet.so
-sh: /tmp/mnt/sda1/minimserver/tmp/native/libohNet.so: Permission denied
# ipkg list |grep libstd
libstdc++ - 6.0.21-6 - Standard C++ library, needed for dynamically linked C++ programs
# uname -a
Linux RT-AC87U-7FA8 2.6.36.4brcmarm #2 SMP PREEMPT Sun Mar 20 16:07:06 EDT 2016 armv7l GNU/Linux
# java -version
openjdk version "1.8.0_102-Optware-ng"
OpenJDK Runtime Environment (build 1.8.0_102-Optware-ng-b02)
OpenJDK Zero VM (build 25.102-b02, interpreted mode)
# ldd --version
-sh: --version: not found
# /lib/libc.so.0
stack smashing detected:  terminated()
Segmentation fault
# cat /etc/ld.so.conf
/opt/lib
/opt/usr/lib
/lib
/usr/lib
Find all posts by this user
Quote this message in a reply
10-05-2016, 23:00
Post: #2
RE: Unable to start on AsusWRT-Merlin with optware-ng
If your Linux runtime is built for ARM hard float (I can't be sure from the information you have provided), you need to use the MinimServer armhf download instead of the arm download.
Find all posts by this user
Quote this message in a reply
10-05-2016, 23:32
Post: #3
RE: Unable to start on AsusWRT-Merlin with optware-ng
Thanks for the response. I have tried both soft and hard float version which result in the same error upon execution. The platform is soft float from what I gather:

Code:
# cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 0 (v7l)
processor       : 0
BogoMIPS        : 1998.84

processor       : 1
BogoMIPS        : 1998.84

Features        : swp half thumb fastmult edsp
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : Northstar Prototype
Revision        : 0000
Serial          : 0000000000000000
# free
             total         used         free       shared      buffers
Mem:        255708        91964       163744            0         1828
-/+ buffers:              90136       165572
Swap:       524284            0       524284
Find all posts by this user
Quote this message in a reply
10-05-2016, 23:48 (This post was last modified: 10-05-2016 23:48 by simoncn.)
Post: #4
RE: Unable to start on AsusWRT-Merlin with optware-ng
Is the /tmp directory mounted as noexec? This could cause the problem you are seeing.
Find all posts by this user
Quote this message in a reply
10-05-2016, 23:51
Post: #5
RE: Unable to start on AsusWRT-Merlin with optware-ng
No, it's mounted with rw,relatime and perms are 777.

Code:
# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=127748k,nr_inodes=31937,mode=755)
proc on /proc type proc (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/mtdblock4 on /jffs type jffs2 (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /tmp/mnt/sda1 type ext4 (rw,nodev,relatime,barrier=1,data=ordered)
/dev/sda2 on /tmp/mnt/sda2 type ext4 (rw,nodev,relatime,barrier=1,data=ordered)
Find all posts by this user
Quote this message in a reply
11-05-2016, 17:01
Post: #6
RE: Unable to start on AsusWRT-Merlin with optware-ng
The problem might be related to Optware-ng. I have not used this myself and I am not sure whether anyone has run MinimServer in this environment. Is it necessary to build shared libaries in some special way so that they can run in an Optware-ng environment?
Find all posts by this user
Quote this message in a reply
11-05-2016, 19:22
Post: #7
RE: Unable to start on AsusWRT-Merlin with optware-ng
I'm going to reset my router to factory defaults and re-install optware-ng in case its a configuration problem. I couldn't find anyone else who'd attempted to run MinimServer on optware-ng. Building libohNet.so is a little beyond my knowledge, although I'm willing to learn.
Find all posts by this user
Quote this message in a reply
13-05-2016, 21:56 (This post was last modified: 13-05-2016 21:57 by z4r9.)
Post: #8
RE: Unable to start on AsusWRT-Merlin with optware-ng
Update:
After upgrading to the latest AsusWRT-Merlin firmware version for my router, resetting NVRAM, re-making JFFS, re-formatting USB, creating / enabling 2GB swap and installing optware-ng I still get the same error upon attempting to execute MinimServer. BubbleUPNP and a number of other packages install and run as expected.

tmp/native/libohNet.so is extracted from lib/ohnet\(linux-arm\)-1.6.1919.zip without executable permissions but I think my environment might need libs to be executable:

Code:
# ldd `which zip`
        libc.so.1 => /opt/lib/libc.so.1 (0x401c6000)
        ld-uClibc.so.1 => /opt/lib/ld-uClibc.so.1 (0x400d7000)
# ldd /opt/lib/libc.so.1
        ld-uClibc.so.1 => /opt/lib/ld-uClibc.so.1 (0x4000f000)
# ll /opt/lib/libc.so.1
lrwxrwxrwx    1 user     root            19 May 13 19:38 /opt/lib/libc.so.1 -> libuClibc-1.0.13.so*
# chmod -x /opt/lib/libc.so.1
# ldd /opt/lib/libc.so.1
-sh: /opt/lib/libc.so.1: Permission denied
# chmod +x /opt/lib/libc.so.1
# ldd /opt/lib/libc.so.1
        ld-uClibc.so.1 => /opt/lib/ld-uClibc.so.1 (0x400be000)

tmp/ is cleared every time I run MinimServer so I can't just make libohNet.so executable there and then remove it from the ZIP file to prevent it being overwritten. I also tried setting libohNet.so executable and then re-adding it to the ZIP file but ZIP doesn't appear store this attribute.

I am not familiar with Java. Is there some way to make libohNet.so executable after extraction before it is called?
Find all posts by this user
Quote this message in a reply
13-05-2016, 23:28
Post: #9
RE: Unable to start on AsusWRT-Merlin with optware-ng
Have you tried running ldd on libohNet.so "as is" and then changing libohNet.so to be executable and runnng ldd again?

I have never come across a Linux system that requires all shared libraries to be executable.
Find all posts by this user
Quote this message in a reply
13-05-2016, 23:55 (This post was last modified: 14-05-2016 00:21 by z4r9.)
Post: #10
RE: Unable to start on AsusWRT-Merlin with optware-ng
(13-05-2016 23:28)simoncn Wrote:  Have you tried running ldd on libohNet.so "as is" and then changing libohNet.so to be executable and runnng ldd again?

I have never come across a Linux system that requires all shared libraries to be executable.
Neither had I, until now. Perhaps it's a quirk of uClibc?

Code:
# ldd tmp/native/libohNet.so
-sh: tmp/native/libohNet.so: Permission denied
# chmod +x tmp/native/libohNet.so
# ldd tmp/native/libohNet.so
Segmentation fault
And a new problem. Perhaps I need to compile libohNet for uClibc specifically?
Edit: Might be relevant https://www.uclibc.org/FAQ.html#ldd
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)