[Split] Compiling DD-WRT

Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions
Goto page Previous  1, 2, 3 ... 21, 22, 23, 24, 25  Next
Author Message
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Wed Jul 31, 2013 20:40    Post subject: Re: libppl.so.9 error Reply with quote
logistiker wrote:
<Kong> wrote:

Since the new toolchain was build on a fairly new distro it requires a newer distro to run properly.

If your distro is using ppl in version 0.11.2 or 0.12, then it is too old and you will have trouble. Actually you should have seen error messages from glibc that tells you that the installed glibc is too old.

E.g. you need at least Opensuse 12.1, Ubuntu 12.04 or a distro that was released in 2012 or later.

The reason why old toolchains are still in the package is, so you can reproduce a compile e.g. r15000 with the same toolchain as used at that time. In addition to that K26 still uses old gcc to build the kernel because there a problems at runtime if K26 kernel is compiled with a new toolchain. You will see that if you look at the linux-2.6.23/Makefile

If it comes to building dd-wrt the documentation is a mess. I did not bother to change that fact because it keeps of the flies. Anyone that is capable to create a running build proved he can do more than reading and following documentation:-)


My distro doesn't do "releases", so there's nothing old about it. In fact, I can probably install versions of software your release-based distro doesn't even have yet. Apparently ppl hasn't been bumped to 1.0 due to concern as to whether it works with cloog-0.15.10. Other than that, I wouldn't consider 0.12.1 which I can install and 1.0 a huge difference considering 1.0 was released 2 months after 0.12.1.

Anyway, I thought I was clear in my last post as to the reason why 0.11.2 needs to be installed. I'll make it more clear. This gets executed when running configure:

/opt/toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.7.3/cc1

If you have 0.12.1 (and likely 1.0) installed and you run this command directly:

/opt/toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.7.3/cc1

You get this:

/opt/toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33.2/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.7.3/cc1: error while loading shared libraries: libppl.so.9: cannot open shared object file: No such file or directory

It cannot locate libppl.so.9 because 0.12.1 installs libppl.so.11.0.0. So you must use ppl < 0.12. I hope your distro didn't just symlink libppl.so.11.0.0 to libppl.so.9 because that's just completely wrong.

I'm not compiling the K26 kernel either but rather the K3x kernel and it's being a real pain in the ass when I enable usb gadgets.

As to why the documentation isn't up-to-date, a little bit of decent documentation goes a long way obviously. It doesn't have to be much:

1. What is the current recommended toolchain
2. Which dependencies do you need to have installed to run it (e.g. ppl-0.11.2)
3. A short example of how to compile a specific version (mega, mini, etc)


Sorry when looking at the my version numbers I swapped cloog and ppl so I told you crap:

Code:

ldd ./lib/gcc/mipsel-openwrt-linux-uclibc/4.7.3/cc1
        linux-vdso.so.1 (0x00007fff709ff000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f526e988000)
        libcloog.so.0 => /usr/lib64/libcloog.so.0 (0x00007f526e765000)
        libppl_c.so.4 => /usr/lib64/libppl_c.so.4 (0x00007f526e143000)
        libppl.so.9 => /usr/lib64/libppl.so.9 (0x00007f526de48000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f526dc44000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f526da2d000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f526d680000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f526d382000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f526ec8e000)
        libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f526d106000)
        libgmpxx.so.4 => /usr/lib64/libgmpxx.so.4 (0x00007f526cf01000)


rpm -qf /usr/lib64/libcloog.so.0
libcloog0-0.15.10+ppl-13.1.1.x86_64
rpm -qf /usr/lib64/libppl.so.9
libppl9-0.11.2-13.1.1.x86_64

If we are talking about gentoo. I used it for a couple of years and then got really tired of the continous bugfixing I had to do. I have 20y linux experience and about 2y gentoo and that was way too much:-)

At work I maintain CentOS and FreeBSD Servers and they are completely painless. Suse does a pretty good job nowadays we use it for virtual reality workstations and with opensuses buildservice you have more and never packages as gentoo can ever provide. Gentoo is playground for bored kids, but it is not to bad learning linux basics.

Anyways new bird is up.

_________________
KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
Sponsor
logistiker
DD-WRT User


Joined: 25 Oct 2009
Posts: 55

PostPosted: Sun Aug 04, 2013 5:41    Post subject: Enabling broadcom wl driver causes kernel compile error Reply with quote
<Kong> wrote:

Sorry when looking at the my version numbers I swapped cloog and ppl so I told you crap:

Code:

ldd ./lib/gcc/mipsel-openwrt-linux-uclibc/4.7.3/cc1
        linux-vdso.so.1 (0x00007fff709ff000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f526e988000)
        libcloog.so.0 => /usr/lib64/libcloog.so.0 (0x00007f526e765000)
        libppl_c.so.4 => /usr/lib64/libppl_c.so.4 (0x00007f526e143000)
        libppl.so.9 => /usr/lib64/libppl.so.9 (0x00007f526de48000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f526dc44000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f526da2d000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f526d680000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f526d382000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f526ec8e000)
        libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f526d106000)
        libgmpxx.so.4 => /usr/lib64/libgmpxx.so.4 (0x00007f526cf01000)


rpm -qf /usr/lib64/libcloog.so.0
libcloog0-0.15.10+ppl-13.1.1.x86_64
rpm -qf /usr/lib64/libppl.so.9
libppl9-0.11.2-13.1.1.x86_64

If we are talking about gentoo. I used it for a couple of years and then got really tired of the continous bugfixing I had to do. I have 20y linux experience and about 2y gentoo and that was way too much:-)

At work I maintain CentOS and FreeBSD Servers and they are completely painless. Suse does a pretty good job nowadays we use it for virtual reality workstations and with opensuses buildservice you have more and never packages as gentoo can ever provide. Gentoo is playground for bored kids, but it is not to bad learning linux basics.

Anyways new bird is up.


Sticks and stones. Honestly I don't really care what distro people prefer. To each his own but yes, I'm a Gentoo user (likely soon to be developer) for 7 years and hardly a bored kid. I could also talk about rpm hell and my hatred for other distros but that's rather childlike. The linux community all uses the same general software (minus distro specific stuff), so it's unfortunate that many don't want to work together to improve all distros by helping each other.

Anyway, back to compiling the dd-wrt. The broadcom wl driver is being a real arse and my kernel compilation stops because of it. If I disable it, the kernel compiles but if I enable it, it stops and keeps giving me this error:

http://dpaste.com/1330179/

How do you handle this problem?
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Wed Aug 07, 2013 15:21    Post subject: Reply with quote
I am going to start working on this, this week, I have used ubuntu 11, 12 and now use debian, I think they all work I assume we need to be running a distro with native 3.x kernel to get the headers correctly to compile that module.

-Fractal
coachrob
DD-WRT Novice


Joined: 08 Aug 2013
Posts: 1

PostPosted: Thu Aug 08, 2013 5:19    Post subject: VM Hosted on a torrent? Reply with quote
I saw in the first 3 pages a reference to a VM hosted on torrent, did that ever happen? I need to try and use a router running ddwrt and add a caller id decoder for VoIP caller ID, and a VM would jumpstart me.

Thanks a bunch!
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Fri Aug 09, 2013 7:26    Post subject: Re: VM Hosted on a torrent? Reply with quote
coachrob wrote:
I saw in the first 3 pages a reference to a VM hosted on torrent, did that ever happen? I need to try and use a router running ddwrt and add a caller id decoder for VoIP caller ID, and a VM would jumpstart me.

Thanks a bunch!

I think someone had one up but that was forever ago and wouldn't be much use now. As you can see from the last few pages, toolchains and dependencies keep changing.

@Kong - I guess I'm a fly. I had a working build at one point but it's like a full time job trying to keep up with every little thing that breaks the build process.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
logistiker
DD-WRT User


Joined: 25 Oct 2009
Posts: 55

PostPosted: Sat Aug 10, 2013 6:45    Post subject: Reply with quote
Fractal wrote:
I am going to start working on this, this week, I have used ubuntu 11, 12 and now use debian, I think they all work I assume we need to be running a distro with native 3.x kernel to get the headers correctly to compile that module.

-Fractal


I'm running Gentoo with kernel 3.10.5 and I've tried with linux-headers 3.7 and now 3.9. I still get the same error so I don't think that makes a difference unless I need even later headers? I'm not sure why this would be because every time I compile a kernel for my machine, the linux headers don't have to be the same version as the kernel. Which linux headers are you using to get wl to compile?
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Sat Aug 10, 2013 22:09    Post subject: Reply with quote
You can't build non AC with kernel 3.x right now cause the modules that are in public repo are compiled for AC. You will notice once you look for the symbols that are reported as unresolved.

Quote:
@Kong - I guess I'm a fly. I had a working build at one point but it's like a full time job trying to keep up with every little thing that breaks the build process.


Well working on dd-wrt requires a lot of skill and believe me this is the case for a lot of embedded projects. I'm also working with other embedded platforms that require even more knowledge due to the bad documentation. There are also only a few devs that work on tomato although tomato is much easier to work with as it only supports a few models. Openwrt has one of the best developer docs, still you will face compile issues now and then which can only be solved by a few. But trying to solve these kind of issues will greatly improve your skill.

_________________
KONG PB's: http://www.desipro.de/ddwrt/
KONG Info: http://tips.desipro.de/
logistiker
DD-WRT User


Joined: 25 Oct 2009
Posts: 55

PostPosted: Sun Aug 11, 2013 14:49    Post subject: Reply with quote
<Kong> wrote:
You can't build non AC with kernel 3.x right now cause the modules that are in public repo are compiled for AC. You will notice once you look for the symbols that are reported as unresolved.


Does the wireless AC driver supersede the WL driver meaning if my device doesn't support AC (Asus RT-N66U), the previous wireless protocols will still work with it? It seems like that might be the case.
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Sat Oct 12, 2013 16:38    Post subject: Reply with quote
logistiker wrote:
<Kong> wrote:
You can't build non AC with kernel 3.x right now cause the modules that are in public repo are compiled for AC. You will notice once you look for the symbols that are reported as unresolved.


Does the wireless AC driver supersede the WL driver meaning if my device doesn't support AC (Asus RT-N66U), the previous wireless protocols will still work with it? It seems like that might be the case.


Edit: Ubuntu 13.04 - Complete Waste of time, overriding dependency issues among others... OpenSUSE 12.3 being installed now.

I now have more time to devote to this thread... How far has everyone gotten.

-Fractal
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Sun Oct 13, 2013 19:23    Post subject: Reply with quote
I have been able to compile K26, now working on K3x... Has anyone run into KAID not working in 22524, I have disabled it in my builds, looks like its missing some modules not committed to the public repo.

EDIT:

going to start posting here whats missing or needs fixed as of 22524

router/configs/broadcom_K26/.config_std_usb_nas-

mising

CONFIG_LIBRT=y

-Fractal
Mazout360
DD-WRT Novice


Joined: 21 Apr 2013
Posts: 21

PostPosted: Tue Oct 15, 2013 13:48    Post subject: Reply with quote
Tried compiling unmodified DD-WRT sources on my Ubuntu 13.10 using toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33 and Makefile.brcm26 with the BroadcomK26 .config and got the same errors as reported by logistiker (libcloog and libppl not found). Temporarily bypassed them by symlinking to the newer library version filenames (yeah, not the best solution I know). Then I got several issues, noticeably:
- query_modules undefined in insmod.c, fixed by removing the conditional right before the definition.
- Kaid won't compile because it cannot find some USB related definitions within the pcap libraries (defined in pcap-usb-linux from the libpcap_noring package).
Used make -f Makefile.brcm26 configure and make -f Makefile.brcm26 clean all install to start the compiling process, with the toolchain properly set up in PATH.

Are these errors normal ? Should the original source code be compilable directly after sync ?
Thanks
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Tue Oct 15, 2013 15:27    Post subject: Reply with quote
Mazout360 wrote:
Tried compiling unmodified DD-WRT sources on my Ubuntu 13.10 using toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33 and Makefile.brcm26 with the BroadcomK26 .config and got the same errors as reported by logistiker (libcloog and libppl not found). Temporarily bypassed them by symlinking to the newer library version filenames (yeah, not the best solution I know). Then I got several issues, noticeably:
- query_modules undefined in insmod.c, fixed by removing the conditional right before the definition.
- Kaid won't compile because it cannot find some USB related definitions within the pcap libraries (defined in pcap-usb-linux from the libpcap_noring package).
Used make -f Makefile.brcm26 configure and make -f Makefile.brcm26 clean all install to start the compiling process, with the toolchain properly set up in PATH.

Are these errors normal ? Should the original source code be compilable directly after sync ?
Thanks


I have the same problem with KAID, however I had to change OS to opensuse 12.3 to get things to compile and work correctly... Ubuntu 13.04 had to many problems right from the start.

I have a fresh checkout, and will post any errors I get, as I am trying to compile 3.x as well.

-Fractal
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Tue Oct 15, 2013 16:07    Post subject: Reply with quote
I started with mini and got everything to compile including the kernel

looks like in the makefile.brcm3x the -a parameter for AC66U is invalid.. See below.

gzip -c9 mipsel-uclibc/lzma_vmlinus > mipsel-uclibc/lzma_vmlinuz
../../opt/tools/trx -m 32000000 -o mipsel-uclibc/dd-wrt.v24-K3-nandboot.trx mipsel-uclibc/lzma_vmlinuz -a 1024 mipsel-uclibc/rootfs.squashfs
mjn3's trx replacement - v0.81.1
WARNING: maxlen exceeds default maximum! Beware of overwriting nvram!
../../opt/asus/asustrx-rt66u -p RT-AC66U -v 3.0.0.1 -m 32000000 -o mipsel-uclibc/dd-wrt.v24-K26_RT-AC66U.trx mipsel-uclibc/lzma_vmlinuz -a 1024 mipsel-uclibc/rootfs.squashfs
mjn3's trx replacement - v0.81, modified to pack ASUS compatible trx
../../opt/asus/asustrx-rt66u: invalid option -- 'a'
Usage: trx [-p product_id] [-v version] [-o outfile] [-m maxlen] file [file [file]]
make: *** [install] Error 1
cp: cannot stat âdd-wrt.v24-K3.trxâ: No such file or directory
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Tue Oct 15, 2013 17:33    Post subject: Reply with quote
I was able to get mini compiled for bcmmips... however testing on E2500 caused kernel panic at 080000 immediately... so further testing is needed.
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Wed Oct 16, 2013 1:42    Post subject: Reply with quote
kaid definatly broken:

<code>


mipsel-linux-g++ -D_REENTRANT -DPLATFORM_linux -DVERSION=\"7.0.0.7\" -DOPENWRT -DOPENWRT -g -Wall -Ipthreadcc/src -Isocketcc/src -I../../libpcap_noring -DCONFIG_FILE="\"/etc/kaid.conf\"" -Os -pipe -mips32r2 -mtune=74kc -mdspr2 -fno-caller-saves -msoft-float -mno-branch-likely -DNEED_PRINTF -c -o KaiDaemon.o KaiDaemon.cc
mipsel-linux-g++ -D_REENTRANT -DPLATFORM_linux -DVERSION=\"7.0.0.7\" -DOPENWRT -DOPENWRT -g -Wall -Ipthreadcc/src -Isocketcc/src -I../../libpcap_noring -DCONFIG_FILE="\"/etc/kaid.conf\"" -Os -pipe -mips32r2 -mtune=74kc -mdspr2 -fno-caller-saves -msoft-float -mno-branch-likely -DNEED_PRINTF -c -o Kaid.o Kaid.cc
Kaid.cc: In function 'char* tstamp()':
Kaid.cc:175:9: warning: variable 'len' set but not used [-Wunused-but-set-variable]
Kaid.cc: In function 'int main(int, char**)':
Kaid.cc:249:14: error: 'geteuid' was not declared in this scope
Kaid.cc:259:21: error: 'fork' was not declared in this scope
Kaid.cc:270:23: error: 'setsid' was not declared in this scope
Kaid.cc:275:16: error: 'STDIN_FILENO' was not declared in this scope
Kaid.cc:275:28: error: 'close' was not declared in this scope
Kaid.cc:276:16: error: 'STDOUT_FILENO' was not declared in this scope
Kaid.cc:277:16: error: 'STDERR_FILENO' was not declared in this scope
make[2]: *** [Kaid.o] Error 1
make[2]: Leaving directory `/home/compiler/DEV/DD-WRT/src/router/kaid/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/compiler/DEV/DD-WRT/src/router/kaid'
make: *** [kaid] Error 2
</code>

-Fractal
Goto page Previous  1, 2, 3 ... 21, 22, 23, 24, 25  Next Display posts from previous:    Page 22 of 25
Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum