myddrn | 5 May 2012 08:34
Picon

glibc error trying to compile OpenWRT for WR1043ND

I'm following the build notes here http://lab.dyne.org/Netsukuku_Dev/vala/flashing_notes to try and get Netsukuku running on a WR1043ND


I've gotten up to this step
time ionice -c 3 nice -n 20 make -j 2 (it takes about 32 min)
without error.  

When I run the command above it runs for about three minutes and then bails out with the following error:
make[1]: *** [/home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/target-mips_r2_glibc-2.14/stamp/.package_compile] Error 2

I double checked the modification to package/base-files/files/lib/upbgrade/common.sh, and read through the notes here https://dev.openwrt.org/ticket/9483#comment:16.

I'm not entirely sure if there are additional step I need to take beyond modifying common.sh to get glibc happy.

Anyone have a pointers on where to look next?

Thanks.

_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku
Luca Dionisi | 5 May 2012 12:02
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

On Sat, May 5, 2012 at 8:34 AM, myddrn <myddrn@...> wrote:
> I'm following the build notes
> here http://lab.dyne.org/Netsukuku_Dev/vala/flashing_notes to try and get
> Netsukuku running on a WR1043ND
>
> I've gotten up to this step
>
> time ionice -c 3 nice -n 20 make -j 2
>        (it takes about 32 min)
>
> without error.
>
> When I run the command above it runs for about three minutes and then bails
> out with the following error:
> make[1]: ***
> [/home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/target-mips_r2_glibc-2.14/stamp/.package_compile]
> Error 2
>
> I double checked the modification
> to package/base-files/files/lib/upbgrade/common.sh, and read through the
> notes here https://dev.openwrt.org/ticket/9483#comment:16.
>
> I'm not entirely sure if there are additional step I need to take beyond
> modifying common.sh to get glibc happy.
>
> Anyone have a pointers on where to look next?
>
> Thanks.
>
>
> _______________________________________________
> Netsukuku mailing list
> Netsukuku@...
> http://lists.dyne.org/mailman/listinfo/netsukuku
>

You have to remove "-j 2" option, probably.
The first build, the one taking about 3 hours, did it complete without errors?

--Luca
_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku

myddrn | 6 May 2012 21:50
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

The first build did compile without errors.


Removing the -j2 option on the 
> time ionice -c 3 nice -n 20 make -j 2
>        (it takes about 32 min)
make fixed me.

Then I ran into errors trying to cross-compile pth-2.0.7 on a linux 3.x system (ubuntu 11.10).  I'm setting up a linux 2.x system in a VM right now to try and do the entire process again.

On Sat, May 5, 2012 at 6:02 AM, Luca Dionisi <luca.dionisi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Sat, May 5, 2012 at 8:34 AM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> I'm following the build notes
> here http://lab.dyne.org/Netsukuku_Dev/vala/flashing_notes to try and get
> Netsukuku running on a WR1043ND
>
> I've gotten up to this step
>
> time ionice -c 3 nice -n 20 make -j 2
>        (it takes about 32 min)
>
> without error.
>
> When I run the command above it runs for about three minutes and then bails
> out with the following error:
> make[1]: ***
> [/home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/target-mips_r2_glibc-2.14/stamp/.package_compile]
> Error 2
>
> I double checked the modification
> to package/base-files/files/lib/upbgrade/common.sh, and read through the
> notes here https://dev.openwrt.org/ticket/9483#comment:16.
>
> I'm not entirely sure if there are additional step I need to take beyond
> modifying common.sh to get glibc happy.
>
> Anyone have a pointers on where to look next?
>
> Thanks.
>
>
> _______________________________________________
> Netsukuku mailing list
> Netsukuku-pma9X3FYtpzZ+VzJOa5vwg@public.gmane.org
> http://lists.dyne.org/mailman/listinfo/netsukuku
>

You have to remove "-j 2" option, probably.
The first build, the one taking about 3 hours, did it complete without errors?

--Luca
_______________________________________________
Netsukuku mailing list
Netsukuku-pma9X3FYtpzZ+VzJOa5vwg@public.gmane.org
http://lists.dyne.org/mailman/listinfo/netsukuku

_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku
Luca Dionisi | 6 May 2012 21:54
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

On Sun, May 6, 2012 at 9:50 PM, myddrn <myddrn@...> wrote:
> The first build did compile without errors.
>
> Removing the -j2 option on the
>> time ionice -c 3 nice -n 20 make -j 2
>>        (it takes about 32 min)
> make fixed me.
>
> Then I ran into errors trying to cross-compile pth-2.0.7 on a linux 3.x
> system (ubuntu 11.10).  I'm setting up a linux 2.x system in a VM right now
> to try and do the entire process again.

Please send me the errors you get with pth.
_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku

myddrn | 6 May 2012 22:04
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

When running the make commands:

make &&
> make install DESTDIR=~/pre-pkg/mips-glibc
./libtool --mode=compile --quiet mips-openwrt-linux-gnu-gcc -c -I. -O2 -pipe pth_debug.c
./libtool --mode=compile --quiet mips-openwrt-linux-gnu-gcc -c -I. -O2 -pipe pth_ring.c
./libtool --mode=compile --quiet mips-openwrt-linux-gnu-gcc -c -I. -O2 -pipe pth_pqueue.c
./libtool --mode=compile --quiet mips-openwrt-linux-gnu-gcc -c -I. -O2 -pipe pth_time.c
./libtool --mode=compile --quiet mips-openwrt-linux-gnu-gcc -c -I. -O2 -pipe pth_errno.c
./libtool --mode=compile --quiet mips-openwrt-linux-gnu-gcc -c -I. -O2 -pipe pth_mctx.c
pth_mctx.c: In function '__pth_mctx_set':
pth_mctx.c:480:2: error: #error "Unsupported Linux (g)libc version and/or platform"


However, that patch is for openwrt's pth package as it gets applied to acinclude.m4 when acinclude.m4 is generated in the build process.  The issue now is that I'm not smart enough to figure out how to make that work with a standalone download of pth-2.0.7.

On Sun, May 6, 2012 at 3:54 PM, Luca Dionisi <luca.dionisi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Sun, May 6, 2012 at 9:50 PM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> The first build did compile without errors.
>
> Removing the -j2 option on the
>> time ionice -c 3 nice -n 20 make -j 2
>>        (it takes about 32 min)
> make fixed me.
>
> Then I ran into errors trying to cross-compile pth-2.0.7 on a linux 3.x
> system (ubuntu 11.10).  I'm setting up a linux 2.x system in a VM right now
> to try and do the entire process again.

Please send me the errors you get with pth.
_______________________________________________
Netsukuku mailing list
Netsukuku-pma9X3FYtpzZ+VzJOa5vwg@public.gmane.org
http://lists.dyne.org/mailman/listinfo/netsukuku

_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku
Luca Dionisi | 6 May 2012 22:31
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

On Sun, May 6, 2012 at 10:04 PM, myddrn <myddrn@...> wrote:
> Which I traced to this
> fix:https://lists.openwrt.org/pipermail/openwrt-devel/2011-October/012567.html
>
> However, that patch is for openwrt's pth package as it gets applied to
> acinclude.m4 when acinclude.m4 is generated in the build process.  The issue
> now is that I'm not smart enough to figure out how to make that work with a
> standalone download of pth-2.0.7.

Try and modify aclocal.m4 just after extraction of pth tar.
_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku

myddrn | 6 May 2012 22:47
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

I deleted the entire pth-2.0.7 directory, re-extracted it from the tarball, modified aclocal.m4 aroun line 1078 so that it matched the patch:

case $PLATFORM in
    *-*-linux* )
        braindead=no
        case "x`uname -r`" in
changequote(, )dnl
            x2.[23456789]* ) ;;
changequote(, )dnl
            x3.* ) ;;
changequote([, ])
            * ) braindead=yes ;;
        esac

IN ADDITION I had to patch the configure file at line 22516 so that it read
case $PLATFORM in
    *-*-linux* )
        braindead=no
        case "x`uname -r`" in
            x2.[23456789]* ) ;;
            x3.* ) ;;
            * ) braindead=yes ;;

After that I ran 
./configure \ --host=mips-openwrt-linux-gnu \ --prefix=/opt/pth-2.0.7 make && make install DESTDIR=~/pre-pkg/mips-glibc
again and it seems to have finished the make process and put the binaries in the right place without error. (~/pre-pkg/mips-glibc/opt/pth-2.0.7)

I'll keep rolling through the process and report back if anything else goes crazy.



On Sun, May 6, 2012 at 4:31 PM, Luca Dionisi <luca.dionisi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Sun, May 6, 2012 at 10:04 PM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Which I traced to this
> fix:https://lists.openwrt.org/pipermail/openwrt-devel/2011-October/012567.html
>
> However, that patch is for openwrt's pth package as it gets applied to
> acinclude.m4 when acinclude.m4 is generated in the build process.  The issue
> now is that I'm not smart enough to figure out how to make that work with a
> standalone download of pth-2.0.7.

Try and modify aclocal.m4 just after extraction of pth tar.
_______________________________________________
Netsukuku mailing list
Netsukuku-pma9X3FYtpzZ+VzJOa5vwg@public.gmane.org
http://lists.dyne.org/mailman/listinfo/netsukuku

_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku
myddrn | 7 May 2012 00:05
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

Ran into trouble trying to 

make && make install DESTDIR=~/pre-pkg/mips-glibc
libgee-0.6.1.  It gives the following errors:
/home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld: cannot find -lgobject-2.0
/home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld: cannot find -lgthread-2.0
/home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld: cannot find -lglib-2.0

and then make bails out.

Still hunting around google for clues.

On Sun, May 6, 2012 at 4:47 PM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I deleted the entire pth-2.0.7 directory, re-extracted it from the tarball, modified aclocal.m4 aroun line 1078 so that it matched the patch:
case $PLATFORM in
    *-*-linux* )
        braindead=no
        case "x`uname -r`" in
changequote(, )dnl
            x2.[23456789]* ) ;;
changequote(, )dnl
            x3.* ) ;;
changequote([, ])
            * ) braindead=yes ;;
        esac

IN ADDITION I had to patch the configure file at line 22516 so that it read
case $PLATFORM in
    *-*-linux* )
        braindead=no
        case "x`uname -r`" in
            x2.[23456789]* ) ;;
            x3.* ) ;;
            * ) braindead=yes ;;

After that I ran 
./configure \ --host=mips-openwrt-linux-gnu \ --prefix=/opt/pth-2.0.7
make && make install DESTDIR=~/pre-pkg/mips-glibc
again and it seems to have finished the make process and put the binaries in the right place without error. (~/pre-pkg/mips-glibc/opt/pth-2.0.7)

I'll keep rolling through the process and report back if anything else goes crazy.



On Sun, May 6, 2012 at 4:31 PM, Luca Dionisi <luca.dionisi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Sun, May 6, 2012 at 10:04 PM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Which I traced to this
> fix:https://lists.openwrt.org/pipermail/openwrt-devel/2011-October/012567.html
>
> However, that patch is for openwrt's pth package as it gets applied to
> acinclude.m4 when acinclude.m4 is generated in the build process.  The issue
> now is that I'm not smart enough to figure out how to make that work with a
> standalone download of pth-2.0.7.

Try and modify aclocal.m4 just after extraction of pth tar.
_______________________________________________
Netsukuku mailing list
Netsukuku <at> lists.dyne.org
http://lists.dyne.org/mailman/listinfo/netsukuku


_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku
Luca Dionisi | 7 May 2012 00:16
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

On Mon, May 7, 2012 at 12:05 AM, myddrn <myddrn@...> wrote:
> Ran into trouble trying to
>
> make &&
> make install DESTDIR=~/pre-pkg/mips-glibc
>
> libgee-0.6.1.  It gives the following errors:
> /home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld:
> cannot find -lgobject-2.0
> /home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld:
> cannot find -lgthread-2.0
> /home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld:
> cannot find -lglib-2.0
>
> and then make bails out.
>
> Still hunting around google for clues.
>
> On Sun, May 6, 2012 at 4:47 PM, myddrn <myddrn@...> wrote:
>>
>> I deleted the entire pth-2.0.7 directory, re-extracted it from the
>> tarball, modified aclocal.m4 aroun line 1078 so that it matched the patch:
>> case $PLATFORM in
>>     *-*-linux* )
>>         braindead=no
>>         case "x`uname -r`" in
>> changequote(, )dnl
>>             x2.[23456789]* ) ;;
>> changequote(, )dnl
>>             x3.* ) ;;
>> changequote([, ])
>>             * ) braindead=yes ;;
>>         esac
>>
>> IN ADDITION I had to patch the configure file at line 22516 so that it
>> read
>> case $PLATFORM in
>>     *-*-linux* )
>>         braindead=no
>>         case "x`uname -r`" in
>>             x2.[23456789]* ) ;;
>>             x3.* ) ;;
>>             * ) braindead=yes ;;
>>
>> After that I ran
>>
>> ./configure \
>>      --host=mips-openwrt-linux-gnu \
>>      --prefix=/opt/pth-2.0.7
>>
>> make &&
>> make install DESTDIR=~/pre-pkg/mips-glibc
>>
>> again and it seems to have finished the make process and put the binaries
>> in the right place without error. (~/pre-pkg/mips-glibc/opt/pth-2.0.7)
>>
>> I'll keep rolling through the process and report back if anything else
>> goes crazy.
>>
>>
>>
>> On Sun, May 6, 2012 at 4:31 PM, Luca Dionisi <luca.dionisi@...>
>> wrote:
>>>
>>> On Sun, May 6, 2012 at 10:04 PM, myddrn <myddrn@...> wrote:
>>> > Which I traced to this
>>> >
>>> > fix:https://lists.openwrt.org/pipermail/openwrt-devel/2011-October/012567.html
>>> >
>>> > However, that patch is for openwrt's pth package as it gets applied to
>>> > acinclude.m4 when acinclude.m4 is generated in the build process.  The
>>> > issue
>>> > now is that I'm not smart enough to figure out how to make that work
>>> > with a
>>> > standalone download of pth-2.0.7.
>>>
>>> Try and modify aclocal.m4 just after extraction of pth tar.
>>> _______________________________________________
>>> Netsukuku mailing list
>>> Netsukuku@...
>>> http://lists.dyne.org/mailman/listinfo/netsukuku
>>
>>
>
>
> _______________________________________________
> Netsukuku mailing list
> Netsukuku@...
> http://lists.dyne.org/mailman/listinfo/netsukuku
>

Make sure you did correctly the previous configure step.
Did you change the path (home/luca) in all the points?
Did you make the link into /opt ?
_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku

myddrn | 7 May 2012 00:45
Picon

Re: glibc error trying to compile OpenWRT for WR1043ND

Gah, I missed changing all the /home/luca/ to /home/beeper/.


With that fixed and rerun I was able to make libgee-0.6.1 just fine.

Now I'm getting an error when I try to rebuild the openwrt stuff after the cross compiling library steps.

install -m0755 /home/beeper/pre-pkg/mips-glibc/opt/libgee-0.6.1/usr/sbin/iwconfig /home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/target-mips_r2_glibc-2.14/root-ar71xx/tmp-wireless-tools/usr/sbin/
install: cannot stat `/home/beeper/pre-pkg/mips-glibc/opt/libgee-0.6.1/usr/sbin/iwconfig': No such file or directory

I'm re-doing the entire process in a VM now with an older version of ubuntu running on the 2.6 kernel to rule out something being fouled up by all the nonsense I did trying to get pth-2.0.7 to cross compile on the linux 3.x kernel.

On Sun, May 6, 2012 at 6:16 PM, Luca Dionisi <luca.dionisi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Mon, May 7, 2012 at 12:05 AM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Ran into trouble trying to
>
> make &&
> make install DESTDIR=~/pre-pkg/mips-glibc
>
> libgee-0.6.1.  It gives the following errors:
> /home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld:
> cannot find -lgobject-2.0
> /home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld:
> cannot find -lgthread-2.0
> /home/beeper/projects/netsukuku/openwrt/r30610/staging_dir/toolchain-mips_r2_gcc-4.6-linaro_glibc-2.14/lib/gcc/mips-openwrt-linux-gnu/4.6.3/../../../../mips-openwrt-linux-gnu/bin/ld:
> cannot find -lglib-2.0
>
> and then make bails out.
>
> Still hunting around google for clues.
>
> On Sun, May 6, 2012 at 4:47 PM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>> I deleted the entire pth-2.0.7 directory, re-extracted it from the
>> tarball, modified aclocal.m4 aroun line 1078 so that it matched the patch:
>> case $PLATFORM in
>>     *-*-linux* )
>>         braindead=no
>>         case "x`uname -r`" in
>> changequote(, )dnl
>>             x2.[23456789]* ) ;;
>> changequote(, )dnl
>>             x3.* ) ;;
>> changequote([, ])
>>             * ) braindead=yes ;;
>>         esac
>>
>> IN ADDITION I had to patch the configure file at line 22516 so that it
>> read
>> case $PLATFORM in
>>     *-*-linux* )
>>         braindead=no
>>         case "x`uname -r`" in
>>             x2.[23456789]* ) ;;
>>             x3.* ) ;;
>>             * ) braindead=yes ;;
>>
>> After that I ran
>>
>> ./configure \
>>      --host=mips-openwrt-linux-gnu \
>>      --prefix=/opt/pth-2.0.7
>>
>> make &&
>> make install DESTDIR=~/pre-pkg/mips-glibc
>>
>> again and it seems to have finished the make process and put the binaries
>> in the right place without error. (~/pre-pkg/mips-glibc/opt/pth-2.0.7)
>>
>> I'll keep rolling through the process and report back if anything else
>> goes crazy.
>>
>>
>>
>> On Sun, May 6, 2012 at 4:31 PM, Luca Dionisi <luca.dionisi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> wrote:
>>>
>>> On Sun, May 6, 2012 at 10:04 PM, myddrn <myddrn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>> > Which I traced to this
>>> >
>>> > fix:https://lists.openwrt.org/pipermail/openwrt-devel/2011-October/012567.html
>>> >
>>> > However, that patch is for openwrt's pth package as it gets applied to
>>> > acinclude.m4 when acinclude.m4 is generated in the build process.  The
>>> > issue
>>> > now is that I'm not smart enough to figure out how to make that work
>>> > with a
>>> > standalone download of pth-2.0.7.
>>>
>>> Try and modify aclocal.m4 just after extraction of pth tar.
>>> _______________________________________________
>>> Netsukuku mailing list
>>> Netsukuku-pma9X3FYtpw@public.gmane.orgne.org
>>> http://lists.dyne.org/mailman/listinfo/netsukuku
>>
>>
>
>
> _______________________________________________
> Netsukuku mailing list
> Netsukuku-pma9X3FYtpzZ+VzJOa5vwg@public.gmane.org
> http://lists.dyne.org/mailman/listinfo/netsukuku
>

Make sure you did correctly the previous configure step.
Did you change the path (home/luca) in all the points?
Did you make the link into /opt ?
_______________________________________________
Netsukuku mailing list
Netsukuku-pma9X3FYtpzZ+VzJOa5vwg@public.gmane.org
http://lists.dyne.org/mailman/listinfo/netsukuku

_______________________________________________
Netsukuku mailing list
Netsukuku@...
http://lists.dyne.org/mailman/listinfo/netsukuku

Gmane