What's new

Bulding Merlin 378.50 alpha from source issue.

  • 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!

charlie2alpha

Senior Member
Hi,

I tried building from the current master branch (don't intent on using it yet!) and I encountered one single problem: For some reason OpenPAM, on the install stage, tries to link with my system /usr/lib/libdl.so instead of the one provided on the dev enviroment of asuswrt. Of course the link fails since my distro's lib is not an arm binary and the build stops.

A temporary solution I found is to change the libdir in the makefiles not to point to /usr/lib but a more permanent solution is needed! After I did those changes, the rest of the build proceeded normally and I got a complete firmware image for my RT-AC56U which has a normal size (which I still won't flash, doubt it works properly yet).

I am not really familiar with the whole build system, but it does seem that some parameter passed (or not passed properly maybe) to the configure script of OpenPAM ends up setting the libdir in the Makefiles to "/usr/lib" and creates the breakage when the libtool is run in the install phase of the openpam.

Of course, I understand this is work in progress, but I thought to mention it since the rest of the sources at least compile without linking errors.
 
Last edited:
Delete your openpam directory, and checkout a clean copy of it. I re-merged the GPL directory last weekend to resolve various issues.
 
Done, got a fresh copy of it. Having it build now, I'll know soon the results.
 
Unfortunately a fresh copy broke again with the same linking problem; you can see the exact error message and the command that failed here: http://pastebin.com/XQ6kPV8Z.

As you'll notice, the path "/usr/lib" is being passed again and the linker complaints "/usr/lib/libdl.so: file not recognized: File format not recognized" which is expected since that is the distro's lib is compliled for amd64 arch while the asuswrt is being compiled for arm.

On another note, I do not have such a problem when using the 376.49_5 branch, everything builds corrently without the slightest intervention from me, that is why I reported this problem with the newer code.

EDIT: from the config.log in the openpam dir, seems that the configure script was called like this:
Code:
/configure --host=arm-linux --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/sbin --libdir=/usr/lib --without-doc --with-pam-unix
 
Last edited:
Unfortunately a fresh copy broke again with the same linking problem; you can see the exact error message and the command that failed here: http://pastebin.com/XQ6kPV8Z.

As you'll notice, the path "/usr/lib" is being passed again and the linker complaints "/usr/lib/libdl.so: file not recognized: File format not recognized" which is expected since that is the distro's lib is compliled for amd64 arch while the asuswrt is being compiled for arm.

On another note, I do not have such a problem when using the 376.49_5 branch, everything builds corrently without the slightest intervention from me, that is why I reported this problem with the newer code.

EDIT: from the config.log in the openpam dir, seems that the configure script was called like this:
Code:
/configure --host=arm-linux --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/sbin --libdir=/usr/lib --without-doc --with-pam-unix

I can have another look, but so far it builds correctly for myself as well as someone else who runs a buildbot.
 
Thanks, if you find anything or if I can do something to debug it please inform me.
 
FYI.....when I did a merge upstream/master, the openpam commits broke the compile for my fork, without bringing over those commits (first time I've had this problem).

I solved it temporarily by cherry-picking over your 2 openpam commits.
 
I'm looking at the openpam directory of 376.49_5 and the master branch, on difference I can immediately spot is that "configure" doesn not exist in the 376.49_5 but it is auto-generated by autoconf. On the other hand, "configure" already exists on the master version. Could be nothing of course.
 
So, more differences between 376.49_5 and master: The release/src-rt-6.x.4708/router/Makefile portion that refers to openpam:

376.49_5
Code:
openpam/stamp-h1:
        cd openpam && ./autogen.sh && \
        $(CONFIGURE) --without-doc --with-pam-unix
        #touch $@ # will be generated by configure.

openpam: openpam/stamp-h1
        $(MAKE) -C openpam $(PARALLEL_BUILD)

openpam-install: openpam
        install -D openpam/lib/libpam/.libs/libpam.so.2.0.0 $(INSTALLDIR)/openpam/usr/lib/libpam.so.2
        $(STRIP) -s $(INSTALLDIR)/openpam/usr/lib/libpam.so.2
        install -D openpam/modules/pam_unix/.libs/pam_unix.so.2.0.0 $(INSTALLDIR)/openpam/usr/lib/pam_unix.so
        $(STRIP) -s $(INSTALLDIR)/openpam/usr/lib/pam_unix.so

openpam-clean:
        @[ ! -f openpam/Makefile ] || $(MAKE) -C openpam clean
        @rm -f openpam/stamp-h1

Master
Code:
openpam: openpam/Makefile
        $(MAKE) -C $@ $(PARALLEL_BUILD) && $(MAKE) $@-stage

openpam/Makefile:
        $(MAKE) openpam-configure

openpam-configure:
        ( cd openpam ; \
                LDFLAGS=-ldl \
                $(CONFIGURE) \
                --prefix=/usr \
                --bindir=/usr/sbin \
                --libdir=/usr/lib \
                --without-doc --with-pam-unix \
        )

openpam-install: openpam
        install -D openpam/lib/libpam/.libs/libpam.so.2.0.0 $(INSTALLDIR)/openpam/usr/lib/libpam.so.2
        $(STRIP) -s $(INSTALLDIR)/openpam/usr/lib/libpam.so.2
        install -D openpam/modules/pam_unix/.libs/pam_unix.so.2.0.0 $(INSTALLDIR)/openpam/usr/lib/pam_unix.so
        $(STRIP) -s $(INSTALLDIR)/openpam/usr/lib/pam_unix.so

openpam-clean:
        @[ ! -f openpam/Makefile ] || $(MAKE) -C openpam clean
        @rm -f openpam/stamp-h1

I'll try to tinker with the makefile a bit and see if it'll build.
 
And done! Found a way to build successfully:

Just a change in the release/src-rt-6.x.4708/router/Makefile:

Code:
--- Makefile.old        2015-01-17 21:06:59.000000000 +0200
+++ Makefile    2015-01-17 20:55:06.775105689 +0200
@@ -2936,9 +2936,6 @@
        ( cd openpam ; \
                LDFLAGS=-ldl \
                $(CONFIGURE) \
-               --prefix=/usr \
-               --bindir=/usr/sbin \
-               --libdir=/usr/lib \
                --without-doc --with-pam-unix \
        )

And compiles fine !
 
Hello, Merlin!
I compiled and flash alpha_4_FW, last commit cd366fe. This software is not mounted NTFS and FAT32 drives. With EXT, I can not check.
Error messge:
Code:
Jan 21 20:39:09 kernel: usb 1-1: new SuperSpeed USB device using xhci_hcd and address 2
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: WARN: short transfer on control ep
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: WARN: short transfer on control ep
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: WARN: short transfer on control ep
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: WARN: short transfer on control ep
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: disable burst on ep 2
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: WARN no SS endpoint bMaxBurst
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: disable burst on ep 1
Jan 21 20:39:09 kernel: xhci_hcd 0000:00:0b.0: WARN no SS endpoint bMaxBurst
Jan 21 20:39:09 kernel: scsi1 : usb-storage 1-1:1.0
Jan 21 20:39:10 kernel: scsi 1:0:0:0: Direct-Access     JetFlash Transcend 16GB   1.00 PQ: 0 ANSI: 5
Jan 21 20:39:10 kernel: sd 1:0:0:0: Attached scsi generic sg0 type 0
Jan 21 20:39:10 kernel: sd 1:0:0:0: [sda] 30871552 512-byte logical blocks: (15.8 GB/14.7 GiB)
Jan 21 20:39:10 kernel: sd 1:0:0:0: [sda] Write Protect is off
Jan 21 20:39:10 kernel: sd 1:0:0:0: [sda] Assuming drive cache: write through
Jan 21 20:39:10 kernel: sd 1:0:0:0: [sda] Assuming drive cache: write through
Jan 21 20:39:10 kernel:  sda: sda1
Jan 21 20:39:10 kernel: sd 1:0:0:0: [sda] Assuming drive cache: write through
Jan 21 20:39:10 kernel: sd 1:0:0:0: [sda] Attached SCSI removable disk
Jan 21 20:39:10 hotplug[1434]: USB /dev/sda1(ntfs) failed to mount at the first try!
Jan 21 20:39:11 kernel: tntfs: disagrees about version of symbol unregister_sysctl_table
Jan 21 20:39:11 kernel: tntfs: Unknown symbol unregister_sysctl_table (err -22)
Jan 21 20:39:11 kernel: tntfs: disagrees about version of symbol register_sysctl_table
Jan 21 20:39:11 kernel: tntfs: Unknown symbol register_sysctl_table (err -22)
Jan 21 20:39:11 hotplug[1434]: USB /dev/sda1(ntfs) failed to mount at the first try!
Jan 21 20:39:11 kernel: tntfs: disagrees about version of symbol unregister_sysctl_table
Jan 21 20:39:11 kernel: tntfs: Unknown symbol unregister_sysctl_table (err -22)
Jan 21 20:39:11 kernel: tntfs: disagrees about version of symbol register_sysctl_table
Jan 21 20:39:11 kernel: tntfs: Unknown symbol register_sysctl_table (err -22)

Thank you for your work.
 
Last edited:
This is work-in-progress. I have done zero test on the different models except on my specific development platform - I'm not at that development stage at this point.

Expect the development code to NOT be working.
 
I have been getting this on mips for the last 3 days was building fine before the 18th

This was my last successful build

Firmware Build Sun Jan 18 11:02:19 UTC 2015 shonk@aurora

ofc just letting you know

make -C openpam -j`grep -c '^processor' /proc/cpuinfo` && make openpam-stage
make[4]: Entering directory `/root/asuswrt-merlin/release/src/router/openpam'
cd . && /bin/bash /root/asuswrt-merlin/release/src/router/openpam/missing automake-1.14 --foreign Makefile
/root/asuswrt-merlin/release/src/router/openpam/missing: line 81: automake-1.14: command not found
WARNING: 'automake-1.14' is missing on your system.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make[4]: *** [Makefile.in] Error 127
make[4]: Leaving directory `/root/asuswrt-merlin/release/src/router/openpam'
make[3]: *** [openpam] Error 2
make[3]: Leaving directory `/root/asuswrt-merlin/release/src/router'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/asuswrt-merlin/release/src-rt-6.x'
make[1]: *** [bin] Error 2
make[1]: Leaving directory `/root/asuswrt-merlin/release/src-rt-6.x'
make: *** [rt-ac66u] Error 2

real 12m28.067s
 
Last edited:
I im on ubuntu 12.04 with automake 1.11.3

When i first started around a year ago i tried with ubuntu 14.04 with automake 1.14 and it would fail due to missing automake 1.11 so settled on 12.04

all has been fine up until 3 days ago..
 
My build host runs Gentoo Linux, has multiple automake versions installed, must be possible for Ubuntu too but I have no experience with Ubuntu and their package manager.
 
i have made a copy of the vm and im updating it to 14.04 now
will most prob moan about missing 1.11 when its done..
 
14.04..

make[4]: Entering directory `/root/asuswrt-merlin/release/src/router/openpam'
cd . && /bin/bash /root/asuswrt-merlin/release/src/router/openpam/missing automake-1.14 --foreign Makefile
configure.ac:8: error: version mismatch. This is Automake 1.14.1,
configure.ac:8: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:8: comes from Automake 1.11.3. You should recreate
configure.ac:8: aclocal.m4 with aclocal and run automake again.
configure.ac:8: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
configure.ac:8: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
configure.ac:8: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
WARNING: 'automake-1.14' is probably too old.
You should only need it if you modified 'Makefile.am' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'automake' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make[4]: *** [Makefile.in] Error 63
make[4]: Leaving directory `/root/asuswrt-merlin/release/src/router/openpam'
make[3]: *** [openpam] Error 2
make[3]: Leaving directory `/root/asuswrt-merlin/release/src/router'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/asuswrt-merlin/release/src-rt-6.x'
make[1]: *** [bin] Error 2
make[1]: Leaving directory `/root/asuswrt-merlin/release/src-rt-6.x'
make: *** [rt-ac66u] Error 2

real 12m35.196s
user 26m44.385s
sys 5m29.690s
 
Really weird, seems like the autoconf files are made for automake-1.11 but it tries to use 1.14 and fails. I'm out of ideas really, try with a clean tree and see if anything changes. Openpam presented several problems to myself and others but I can build it succefully currently.
 
Not sure whats going on with ubuntu was working fine

just setup a mint 13 vm and that worked fine

ctools/trx -o image/linux-lzma.trx ctools/vmlinuz-lzma ctools/target.squashfs
ctools/trx_asus -i image/linux-lzma.trx -r RT-AC66U,3.0.0.4,image/RT-AC66U_3.0.0.4_378.50_alpha4.trx

Creating ASUS RT-AC66U firmware to image/RT-AC66U_3.0.0.4_378.50_alpha4.trx

TRX Image:
Total Size .... : 29511680 (28820.0 KB) (28.1 MB)
CRC-32 ........ : D75AA5FA


make[3]: Leaving directory `/root/asuswrt-merlin/release/src-rt-6.x'
make[2]: Leaving directory `/root/asuswrt-merlin/release/src-rt-6.x'
make[1]: Leaving directory `/root/asuswrt-merlin/release/src-rt-6.x'

real 6m15.696s
user 3m57.835s
sys 0m58.700s
aurora src-rt-6.x #
 

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