Find the answer to your Linux question:
Results 1 to 10 of 10
I am attempting to cross compile ppp-2.4.3 for arm-linux and am attempting the following procedure for configuration and x-compilation: Code: ./configure --target=arm-linux --enable-arm --prefix=/usr/local/arm/3.3.2/arm-linux/ make CC=/usr/local/arm/3.3.2/bin/arm-linux-gcc make DESTDIR=`pwd`/../ppp_struct install However, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    May 2005
    Posts
    127

    Errors While Cross Compiling ppp/pppd for arm-linux


    I am attempting to cross compile ppp-2.4.3 for arm-linux and am attempting the following procedure for configuration and x-compilation:
    Code:
    ./configure --target=arm-linux --enable-arm
    --prefix=/usr/local/arm/3.3.2/arm-linux/
    make CC=/usr/local/arm/3.3.2/bin/arm-linux-gcc
    make DESTDIR=`pwd`/../ppp_struct install
    However, after running the second line:
    Code:
    make CC=/usr/local/arm/3.3.2/bin/arm-linux-gcc
    I get a large number of parse errors. There are literally a hundred or so of these, so i've included the first few lines of the errors (please let me know if the rest are needed and I can e-mail or post them):
    Code:
    In file included from
    /usr/local/arm/3.3.2/arm-linux/sys-include/net/route.h:28,
       from sys-linux.c:109:
    /usr/local/arm/3.3.2/arm-linux/sys-include/net/dst.h:30: error: parse
    error before "atomic_t"
    /usr/local/arm/3.3.2/arm-linux/sys-include/net/dst.h:67: error: parse
    error before '}' token
    /usr/local/arm/3.3.2/arm-linux/sys-include/net/dst.h:85: error: parse
    error before "atomic_t"
    /usr/local/arm/3.3.2/arm-linux/sys-include/net/dst.h:87: error: parse
    error before '}' token
    In file included from
    /usr/local/arm/3.3.2/arm-linux/sys-include/linux/sched.h:18,
                    from
    /usr/local/arm/3.3.2/arm-linux/sys-include/net/inetpeer.h:14,
                    from
    /usr/local/arm/3.3.2/arm-linux/sys-include/net/route.h:29,
       from sys-linux.c:109:
    /usr/local/arm/3.3.2/arm-linux/sys-include/asm/semaphore.h:18: error:
    parse error before "wait_queue_head_t"
    Any ideas on this one?

    For more information on some of the procedures attempted thus far, please refer to the prequel thread to this post which can be referenced at:
    http://www.linuxforums.org/forum/topic-46948.html

    Thanks.

  2. #2
    Linux Engineer
    Join Date
    Sep 2003
    Location
    Knoxhell, TN
    Posts
    1,078
    it looks like the compiler is having a hard time parsing C... might wanna check that the code it's not parsing isn't machine-specific stuff...
    Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr

  3. #3
    Linux Newbie
    Join Date
    May 2005
    Posts
    127
    The files giving the errors appear to be those in my arm-linux image .h include libraries not the code from ppp. The arm-linux image is a 2.6.7 kernel patched for compatibility with my arm system, which I reinstalled and both times I got the same errors, so I don't think there is a problem with that... hmmm

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    I had a look at the file /usr/local/arm/3.3.2/arm-linux/sys-include/net/dst.h
    in the other thread and it looks like a perfectly respectable little file.
    I cannot imagine why you're getting those parse errors.Especially since
    you're not getting them with the other compiler.

    I just noticed the line struct sk_buff; right after the #define's.
    I cannot imagine what it's there for.

  6. #5
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    Can you output what make gives before you start getting those parse errors ?
    Ideally from the beginning unless it's huge.

  7. #6
    Linux Newbie
    Join Date
    May 2005
    Posts
    127
    Here's the make output prior to the parse errors:
    Code:
    root@localhost ppp-2.4.3]# make CC=/usr/local/arm/3.3.2/bin/arm-linux-gcc
    cd chat; make  all
    make[1]: Entering directory `/home/username/to_xcompile/ppp-2.4.3/chat'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/username/to_xcompile/ppp-2.4.3/chat'
    cd pppd/plugins; make  all
    make[1]: Entering directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins'
    for d in rp-pppoe pppoatm radius; do make -w -C $d all; done
    make[2]: Entering directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins/rp-pppoe'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins/rp-pppoe'
    make[2]: Entering directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins/pppoatm'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins/pppoatm'
    make[2]: Entering directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins/radius'
    make[2]: Nothing to be done for `all'.
    make[2]: Leaving directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins/radius'
    make[1]: Leaving directory `/home/username/to_xcompile/ppp-2.4.3/pppd/plugins'
    cd pppd; make  all
    make[1]: Entering directory `/home/username/to_xcompile/ppp-2.4.3/pppd'
    /usr/local/arm/3.3.2/bin/arm-linux-gcc -O2 -pipe -Wall -g -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP -I../include -DCHAPMS=1 -DMPPE=1 -DHAS_SHADOW -DHAVE_CRYPT_H=1 -DUSE_CRYPT=1 -DHAVE_MULTILINK -DUSE_TDB=1 -DPLUGIN -DMAXOCTETS   -c -o sys-linux.o sys-linux.c

  8. #7
    Linux Newbie
    Join Date
    May 2005
    Posts
    127
    By the way I just attempted to make ppp 2.4.1 (as opposed to 2.4.3) and still got the same errors. I found a post on another forum where someone said they had successfully been able to x-compile ppp 2.4.1 for arm-linux, however I have been unable to contact them.

  9. #8
    Linux Newbie
    Join Date
    May 2005
    Posts
    127
    I was able to make some progress, I found an already compiled RPM for ppp 2.4.1 for arm-linux:
    http://rpmfind.net/linux/RPM/netwind...10.armv4l.html
    So I converted that into a directory structure, moved it to the target, wrote an install script (worked great) and tried to run it. It said it needed a library called pam, so I found an arm-linux copy of that as well from:
    http://rpmfind.net//linux/RPM/netwin...10.armv4l.html
    So I did the same process for that .rpm to satisfy that dependency and got an error that stated:
    Code:
    pppd: error while loading shared libraries: libpam.so.0: cannot load shared object file: No such file or directory
    So I checked and found a library called libpam.so.0.68 so I simply renamed it to libpam.so.0, which seemed to get things past that error.

    I then got a libc versioning error:
    Code:
    pppd: /lib/libc.so.6: version `GLIBC_2.3' not found (required by pppd)
    After checking it looks like I have GLIBC_2.2. I could spend a great deal of time replacing my GLIBC_2.2 with GLIBC_2.3, however I would expect that to ruin some of my other apps that are dependent on GLIBC_2.2.

    Any ideas?

  10. #9
    Just Joined!
    Join Date
    Feb 2011
    Posts
    1
    I face same problem while compiling ppp-2.4.5
    Solution is as below:

    - export PATH=/opt/rmi/db1200/bin:$PATH
    - cd .../ppp-2.4.5
    - ./configure --target=mipsel-linux --prefix=/opt/ppp
    - make CC=mipsel-linux-gcc STRIP=mipsel-linux-strip

    Once make is done if you tried to install using make install it will give you error

    strip: Unable to recognise the format of the input file `/... / sbin / chat '
    install: strip process terminated abnormally
    make [1]: *** [install] Error 1

    So before you do make install remove "-s" install option from all make file that are present under .../ppp-2.4.5

    - pwd
    ..../ppp-2.4.5
    - find ./ -name Makefile
    ./chat/Makefile
    ./pppstats/Makefile
    ./pppd/plugins/radius/Makefile
    ./pppd/plugins/pppol2tp/Makefile
    ./pppd/plugins/rp-pppoe/Makefile
    ./pppd/plugins/pppoatm/Makefile
    ./pppd/plugins/Makefile
    ./pppd/Makefile
    ./pppdump/Makefile
    ./Makefile

    - edit all make file and remove "-s" install option from them
    example:
    $(ETCDIR)/options:
    $(INSTALL) -s -c -m 644 etc.ppp/options $@
    Above line has -s so remove it. Similarly do it for all.

    - once all -s option removed do # make install
    - In my case it will get install in /opt/ppp/

    - cd /opt/ppp/sbin/
    - ls
    chat pppd pppdump pppoe-discovery pppstats

    - Now using my toolchain strip file i.e mipsel-linux-strip I will strip them
    - pwd
    /opt/ppp/sbin/
    - /opt/rmi/db1200/bin/mipsel-linux-strip chat
    - /opt/rmi/db1200/bin/mipsel-linux-strip pppd
    - /opt/rmi/db1200/bin/mipsel-linux-strip pppdump
    - /opt/rmi/db1200/bin/mipsel-linux-strip pppoe-discovery
    - /opt/rmi/db1200/bin/mipsel-linux-strip ppstats

    Thats it..... Done

  11. #10
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Guys, this thread is 7 years old so I'm going to close it, but do feel free to start fresh threads if any of you are still having any problems with Linux.

    Thank you.
    oz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •