hi,

i'm working on a port & cross-compiled build (for openwrt backfire
10.03/atheros AR71xx, on openSUSE 11.3/x86_64) of perl 5.12.2, digging
through issues/bugs one at a time.

i've started with the existing package for perl 5.10.x from the repo.

i'm stuck at a fail of "build target miniperl binary" in
'config_h_.SH'-generated 'xconfig.h'.

some, not all, of the generated #defines seem wrong; not yet clear why.

all i can say, atm, is that the following just gets me as far as I get
-- i can't yet say, whether i've an OK build process; here's what i've
done so far:


svn co svn://svn.openwrt.org/openwrt/branches/backfire openwrt_backfire
cd openwrt_backfire
make menuconfig

        Target System (Atheros AR71xx/AR7240/AR913x)  --->
        Target Profile (Buffalo WZR-HP-G300NH)  --->
        ...
        [*] Build the OpenWrt SDK
        ...
make -j8 V=99

./scripts/feeds update
cp -a feeds/packages/lang/perl package/perl512
./scripts/feeds install -p packages libdb47 libxml2 libgdbm


### MAKE PATCH FAILURE: " ... read-only; refusing to patch"
# https://forum.openwrt.org/viewtopic.php?pid=115258

vi scripts/patch-kernel.sh
        ...
        -    ${uncomp} ${i} | patch -p1 -E -d ${targetdir}
        +    ${uncomp} ${i} | patch -f -p1 -E -d ${targetdir}
        ...

make menuconfig
make -j8 package/libxml2/{clean,compile,install}   V=99
make -j8 package/db47/{clean,compile,install}      V=99
make -j8 package/gdbm/{clean,compile,install}      V=99


# [FIXED] BUG: https://bugzilla.novell.com/show_bug.cgi?id=640700
vi /usr/include/dbm.h
        ...
        -extern int     dbmclose __P((DBM *));
        +extern int     dbmclose __P((void));


rm package/perl512/patches/*
make -j8 package/perl512/{clean,compile} V=99

## FAIL

...
===> Stage 3: Configure target perl

...
Fetching answers from config.sh...

Doing variable substitutions on .SH files...
Extracting config.h (with variable substitutions)
Extracting cflags (with variable substitutions)
Not re-extracting config.h
Extracting makeaperl (with variable substitutions)
Extracting makedepend (with variable substitutions)
Extracting Makefile (with variable substitutions)
Extracting myconfig (with variable substitutions)
Extracting pod/Makefile (with variable substitutions)
Extracting Policy.sh (with variable substitutions)
Extracting runtests (with variable substitutions)
Extracting utils/Makefile (with variable substitutions)
Extracting writemain (with variable substitutions)
Extracting x2p/cflags (with variable substitutions)
Extracting x2p/Makefile (with variable substitutions)
Extraction done.
touch
/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2/.configured_-perl

===> Stage 4: Build target miniperl binary

install -m 0644
/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2/config.h
/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2/xconfig.h
rm -f
/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2/miniperl
make -C
/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2
miniperl
make[3]: Entering directory
`/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2'
`sh  cflags "optimize='-O2'" miniperlmain.o`  miniperlmain.c
          CCCMD =  mips-openwrt-linux-uclibc-gcc -DPERL_CORE -c -Os
          -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time
          -fhonour-copts -msoft-float -DUSE_CROSS_COMPILE
          
-I/build/openwrt_backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
          
-I/build/openwrt_backfire/staging_dir/target-mips_r2_uClibc-0.9.30.1/include
          
-I/build/openwrt_backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
          
-I/build/openwrt_backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include
           -O2 -Wall
In file included from perl.h:40,
                 from miniperlmain.c:40:
xconfig.h:774:3: error: invalid preprocessing directive #I_SYS_POLL
xconfig.h:879:3: error: invalid preprocessing directive #CAN_VAPROTO
xconfig.h:1084:3: error: invalid preprocessing directive
#HASATTRIBUTE_DEPRECATED
xconfig.h:2415:3: error: invalid preprocessing directive #I_GDBMNDBM
xconfig.h:2416:3: error: invalid preprocessing directive #I_GDBM_NDBM
xconfig.h:2417:3: error: invalid preprocessing directive
#NDBM_H_USES_PROTOTYPES
xconfig.h:2418:3: error: invalid preprocessing directive
#GDBMNDBM_H_USES_PROTOTYPES
xconfig.h:2419:3: error: invalid preprocessing directive
#GDBM_NDBM_H_USES_PROTOTYPES
xconfig.h:3304:3: error: invalid preprocessing directive #PERL_USE_DEVEL
xconfig.h:3576:3: error: invalid preprocessing directive
#HAS_GETADDRINFO
xconfig.h:3618:3: error: invalid preprocessing directive
#HAS_GETNAMEINFO
xconfig.h:3648:3: error: invalid preprocessing directive #HAS_INETNTOP
xconfig.h:3654:3: error: invalid preprocessing directive #HAS_INETPTON
xconfig.h:4048:3: error: invalid preprocessing directive #HAS_CTIME64
xconfig.h:4049:3: error: invalid preprocessing directive
#HAS_LOCALTIME64
xconfig.h:4050:3: error: invalid preprocessing directive #HAS_GMTIME64
xconfig.h:4051:3: error: invalid preprocessing directive #HAS_MKTIME64
xconfig.h:4052:3: error: invalid preprocessing directive #HAS_DIFFTIME64
xconfig.h:4053:3: error: invalid preprocessing directive #HAS_ASCTIME64
xconfig.h:4059:3: error: invalid preprocessing directive #HAS_TIMEGM
xconfig.h:4132:3: error: invalid preprocessing directive #I_ASSERT
xconfig.h:4210:3: error: invalid preprocessing directive #I_MALLOCMALLOC
xconfig.h:4587:3: error: invalid preprocessing directive #USE_DTRACE
make[3]: *** [miniperlmain.o] Error 1
make[3]: Leaving directory
`/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2'
make[2]: ***
[/build/openwrt_backfire/build_dir/target-mips_r2_uClibc-0.9.30.1/perl/perl-5.12.2/.built-perl]
Error 2
make[2]: Leaving directory `/build/openwrt_backfire/package/perl512'
make[1]: *** [package/perl512/compile] Error 2
make[1]: Leaving directory `/build/openwrt_backfire'
make: *** [package/perl512/compile] Error 2


i've posted the generated 'xconfig.h' @  http://pastebin.com/8iv6Sbtz

note that @ each of the id'd error line_nos, the #define looks wrong.
e.g., @ 774,

        ...
        #
        #define I_SYS_PARAM             /**/
        #

        #
        /* I_SYS_POLL:
        #
        *      This symbol, if defined, indicates that the program may
        include
        #
        *      <sys/poll.h>.  When I_POLL is also defined, it's probably
        safest
        #
        *      to only include <poll.h>.
        #
        */
        #
774     # I_SYS_POLL    /**/
        #

        #
        /* I_SYS_RESOURCE:
        #
        *      This symbol, if defined, indicates to the C program that
        it should
        #
        *      include <sys/resource.h>.
        #
        */
        #
        #define I_SYS_RESOURCE          /**/
        ...


looking at other instances in the file, I suspect (?) it should be
either,

        774     #define I_SYS_POLL    /**/

or

        774     /*#define I_SYS_POLL    / **/

not

        774     # I_SYS_POLL    /**/



fwiw, the install of exiting 5.10.x packages from the repo ends up with
a broken install.

otoh, a cross-compile build of perl 5.10.x from the repos works well. 
.../ipkgs-install/ dirs & files scp'd from the build host to the openwrt
target work fine.

5.12.2 clearly has some differences ...

any help is appreciated.
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to