What's new

Optware compilation packages error

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Marko Polo

Senior Member
I am trying to build some app from source and oddly cannot set up automake and aclocal properly.
I installed them from ipkg as usual but they are not seen by the system.

When I want to configure the sources, e.g. aclocal && autoconf && automake -a:

Code:
aclocal && autoconf && automake -a

Starting automake or aclocal standalone gives also "Not found".

When I do which automake, it gives correct path:
Code:
/opt/bin/automake

This is the listing of /opt/bin directory:

Code:
lrwxrwxrwx    1 Zapatist root            12 Jul 16 13:19 aclocal -> aclocal-1.12
-rwxr-xr-x    1 Zapatist root         31042 May 10  2012 aclocal-1.12
-rwxr-xr-x    1 Zapatist root         14944 Jun  3  2012 asn1Coding
-rwxr-xr-x    1 Zapatist root         14628 Jun  3  2012 asn1Decoding
-rwxr-xr-x    1 Zapatist root         13364 Jun  3  2012 asn1Parser
-rwxrwxrwx    1 Zapatist root        247188 May  9 05:25 asus_lighttpd
-rwxr-xr-x    1 Zapatist root         14768 May 10  2012 autoconf
-rwxr-xr-x    1 Zapatist root          8534 May 10  2012 autoheader
-rwxr-xr-x    1 Zapatist root         32176 May 10  2012 autom4te
lrwxrwxrwx    1 Zapatist root            13 Jul 16 13:19 automake -> automake-1.12
-rwxr-xr-x    1 Zapatist root        255805 May 10  2012 automake-1.12
-rwxr-xr-x    1 Zapatist root         21066 May 10  2012 autoreconf
-rwxr-xr-x    1 Zapatist root         17123 May 10  2012 autoscan
-rwxr-xr-x    1 Zapatist root         33872 May 10  2012 autoupdate

Any suggestions? Thx in advance.
 
maybe try to upgrade to newer automake? mine is 1.15-4

on my router (optware-ng):

Code:
# ipkg list | grep ^automake
automake - 1.15-4 - Creates GNU standards-compliant Makefiles from template files
automake1.10 - 1.10.3-3 - Creates GNU standards-compliant Makefiles from template files
automake1.14 - 1.14.1-3 - Creates GNU standards-compliant Makefiles from template files
automake1.4 - 1.4-p6-3 - Creates GNU standards-compliant Makefiles from template files
automake1.9 - 1.9.6-3 - Creates GNU standards-compliant Makefiles from template files
 
Check your PATH variables... your aclocal and automake are sym links, and they might not be in the path....

Your path probably should include both /opt/bin and /opt/sbin
 
maybe try to upgrade to newer automake? mine is 1.15-4
What repos do you have? And how to include new repos to optware? For me list gives only one version of automake
Code:
/tmp/home/root# ipkg list | grep ^automake
automake - 1.12-1 - Creates GNU standards-compliant Makefiles from template files
 
Your path probably should include both /opt/bin and /opt/sbin
No, echo $PATH gives me

Code:
/bin:/usr/bin:/sbin:/usr/sbin:/home/Polo:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin

What else can I check?
 
What repos do you have? And how to include new repos to optware? For me list gives only one version of automake
Code:
/tmp/home/root# ipkg list | grep ^automake
automake - 1.12-1 - Creates GNU standards-compliant Makefiles from template files

Sorry I just realized you are running optware, not optware-ng.

What's in your /mmc/usr/bin and /mmc/usr/sbin? optware-ng does not have /opt/usr/bin and /opt/usr/sbin, I am not sure optware though, do you want to move /opt/sbin:/opt/bin: before /mmc/usr/bin:/mmc/usr/sbin: and try again?
 
What are you trying to build?
Chan-dongle package: https://github.com/bg111/asterisk-chan-dongle/wiki/Installation
But the issue must be fixed, 'cause I will definitely need to build other packages in future.

What's in your /mmc/usr/bin and /mmc/usr/sbin? optware-ng does not have /opt/usr/bin and /opt/usr/sbin, I am not sure optware though, do you want to move /opt/sbin:/opt/bin: before /mmc/usr/bin:/mmc/usr/sbin: and try again?

My /mmc dir is empty. I removed all /mmc records from $PATH but it didn't help. I even placed /opt/bin at the vary beginning, but it didn't help either.
BTW, how do I set $PATH permanently? Here they say, that only profile.add supported for profile. But what I want to replace PATH string?
 
Sometimes the error "not found" really means "failed to load the executable".

Try some tools such as

ldd /opt/bin/automake
strace /opt/bin/automake

and check if there are any problems.

BTW, how do I set $PATH permanently? Here they say, that only profile.add supported for profile. But what I want to replace PATH string?

I don't quite understand your question here... Check your /etc/profile, if it source /jffs/configs/profile.add then you just modify /jffs/configs/profile.add and change $PATH to whatever you want.
 
Sometimes the error "not found" really means "failed to load the executable".

Try some tools such as

ldd /opt/bin/automake
strace /opt/bin/automake

and check if there are any problems.

I agree...

Anyways - try each standalone -- example would be "automake --version" which should print out the version string, if that works, then it's likely something in the source dump... if it doesn't work, see below

If that doesn't work - then explictly call the path -- "/opt/bin/automake --version" - if that runs, then it's definitely a PATH problem - if it doesn't work...

Do the same - but adding a dot prefix - e.g. "./opt/bin/automake --version" - if that runs, that means that you have a permissions issue with the account running the command.... This normally would be around the user/group membership - is the user a member of the group that can run things?

It's been a very long time since I've futzed around with entware/optware/optware-ng - but this is my thoughts.

As a side note - interesting, but perhaps a folly trying to run a complicated package like asterix on such a limited platform (RAM/Storage wise) running what is essentially an embedded linux - have you considered something a bit more recent with more memory and storage available?

Just because one can, doesn't mean one should...
 
ldd /opt/bin/automake
strace /opt/bin/automake
ldd gives
Code:
# ldd /opt/bin/automake
-sh: /opt/bin/automake: not found

strace gives
Code:
# strace /opt/bin/automake
execve("/opt/bin/automake", ["/opt/bin/automake"], [/* 13 vars */]) = -1 ENOENT (No such file or directory)
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
exit(1)

I don't quite understand your question here... Check your /etc/profile, if it source /jffs/configs/profile.add then you just modify /jffs/configs/profile.add and change $PATH to whatever you want.

OK, got it. And how to re-fetch new profile.add PATH value without reboot?
Anyways - try each standalone -- example would be "automake --version" which should print out the version string, if that works, then it's likely something in the source dump... if it doesn't work, see below

It doesn't.
If that doesn't work - then explictly call the path -- "/opt/bin/automake --version" - if that runs, then it's definitely a PATH problem - if it doesn't work...

It doesn't.
Do the same - but adding a dot prefix - e.g. "./opt/bin/automake --version" - if that runs, that means that you have a permissions issue with the account running the command.... This normally would be around the user/group membership - is the user a member of the group that can run things?

It doesn't as well.
As a side note - interesting, but perhaps a folly trying to run a complicated package like asterix on such a limited platform (RAM/Storage wise) running what is essentially an embedded linux - have you considered something a bit more recent with more memory and storage available?

Asterisk per se was installed like a charm, the problem now is in compiling additional dongle package for it. Also, lack of automake is a fundamental problem which will prevent compiling any package (not only asterisk) so it should be solved anyway.
A agree that running as asterisk on such limited platforms can cause glitches, however my intention to get rid of additional hardware boxes (like Raspberry which runs asterisk now) is too strong :)
 
Asterisk per se was installed like a charm, the problem now is in compiling additional dongle package for it. Also, lack of automake is a fundamental problem which will prevent compiling any package (not only asterisk) so it should be solved anyway.

You have updated ipkg and have optware-devel and automake installed - I'm assuming yes, but it's worth asking...

Also - a tip from the unslung crowd - use the versioned command for automake - e.g. automake-1.12

Check the environment variables for both AUTOMAKE and ACLOCAL - ensure they're correct.

Shaking cobwebs from the memory, what you're really trying to do is build a package that you can then install thru ipkg - which is a better approach rather than trying to do a ./configure && make && make install kind of operation...

And this makes sense, as the drop you're playing with is essentially a driver, so you want to capture the dependencies...

Anyways - I do encourage you to look into optware and how to build and manage packages directly by researching the friendly manuals (in other words, RTFM) - once you understand that - then you can build your toolchain and buildroot pretty much either locally hosted, or on a linux box to cross compile and you'll be in better shape - not just for this little package, but for other packages you might want to include later on.

I'm not trying to be rude, and I certainly hope it's not taken that way, but you're better off creating the package within the optware/optware-ng development platform with more insight into how things are done there.

Cool?
 
You was right. I had no optware-devel installed.
Ok, I gave up and decided to use Entware. Because Optware started to throw some repo error:

Code:
#:/tmp/home/root# ipkg update
Collected errors:
ipkg_download: ERROR: Command failed with return value 16: `wget    -q -P /opt/ipkg-kehRsg http://ipkg.nslu2-linux.org/feeds/optware/mbwe-bluering/cross/stabl
e/Packages.gz'
ipkg_download: ERROR: Command failed with return value 16: `wget    -q -P /opt/ipkg-kehRsg http://nw-dlcdnet.asus.com/asusware/arm/stable/Packages.gz'
 
... I gave up and decided to use ...
I think @sfx2000 was suggesting to add a new Optware/Optware-ng package and then cross-compile the new package in a VM; do not try to compile natively on the router itself.

Install Ubuntu 14.04 (64-bits) in a VM, then follow the instructions to setup a development environment for building the Optware/Optware-ng repo.
https://github.com/Optware/Optware-ng/wiki/Contributing-to-Optware-ng

Once you're able to build existing packages, then add your new package for "asterisk-chan-dongle".
https://github.com/Optware/Optware-ng/wiki/Adding-a-package-to-Optware-ng
 
I think @sfx2000 was suggesting to add a new Optware/Optware-ng package and then cross-compile the new package in a VM; do not try to compile natively on the router itself.

so building from sources on the router is NOT recommended?
Shaking cobwebs from the memory, what you're really trying to do is build a package that you can then install thru ipkg - which is a better approach rather than trying to do a ./configure && make && make install kind of operation...

why this approach is better? adding the package to ipkg repo seems an extra step to me, and all dependencies can be installed manually on the router
 
so building from sources on the router is NOT recommended?
I think you may be having toolchain issues with trying to compile natively on the router. Therefore, you just need to do exactly what's recommended in the Wiki, here:
https://github.com/Optware/Optware-ng/wiki/Contributing-to-Optware-ng

https://github.com/Optware/Optware-ng/wiki/Adding-a-package-to-Optware-ng



why this approach is better? adding the package to ipkg repo seems an extra step to me, and all dependencies can be installed manually on the router
You're just creating a makefile for the Optware/Optware-ng development environment, like this:
~/Optware-ng/make/asterisk-chan-dongle.mk

Then build the package, like this:
make asterisk-chan-dongle
OR
make asterisk-chan-dongle-ipk
 
Thanks for guidance.
Will try this step next time, 'cause this time chan_dongle fortunately already exists in Entware. And your strong advice to switch to Entware took its effect: I've already there :)
 
why this approach is better? adding the package to ipkg repo seems an extra step to me, and all dependencies can be installed manually on the router

Just a word to the wise - always best to work with the distribution's package manager - it's a little bit more work, but it saves much time down the road as other packages get updated - code evolves over time...
 
I think @sfx2000 was suggesting to add a new Optware/Optware-ng package and then cross-compile the new package in a VM; do not try to compile natively on the router itself.

Exactly - the clue for me was the directory listing - thinking to myself, wow, he's trying to build on the target directly -- here's the tell... see it?

Code:
-rwxrwxrwx    1 Zapatist root        247188 May  9 05:25 asus_lighttpd

This can be done, but in a resource limited environment, it should not be done - on an embedded device, with perhaps 128MB of flash, and 256MB of RAM, all those extra packages needed for a working toolchain aren't desired for a device in production. They just take up a lot of space that could be put to better use. Esp. when the package environment readily supports a cross-compilation toolchain in the first place.

Even in big servers - our production servers were pretty minimal - only the code that was needed to run - the engineering and developer workstations had rich development environments, but the actual servers were as barebones as we could make them and still keep code running...
 
Similar threads
Thread starter Title Forum Replies Date
C Does updating merlin remove installed packages? Asuswrt-Merlin 1

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top