Topic: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hello everybody !

I'm a new OpenWRT user, specially for rb532 boards.

Now, thanks to the nice Kamikaze svn depot, I've been able to build an image with all drivers and packages needed (chilispot, freeradius, ...) exept for mysql-server (seem to be not avaible) and a full perl interpreter.

In fact, I need a perl interpreter which supports the md5 and filereader functions.

So I've decided to build the myself. Obviously, as I'm a newbie, it's more easy to say than to do smile Now I've got trouble :<

Here what I've done : (as said here : http://wiki.openwrt.org/BuildingPackagesHowTo)

--> I've decompressed the generated SDK.
--> Into the OpenWRT-SDK directory I've created under the "package" directory, two sub-directories :

BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686$ ll -R package/
package/:
total 16
drwxr-xr-x 4 toboz toboz 4096 2007-03-29 16:14 100-perl-5.8.8
drwxr-xr-x 4 toboz toboz 4096 2007-03-29 16:15 200-mysql-5.0.37
-rw-r--r-- 1 toboz toboz 2068 2007-03-27 09:23 Makefile
-rw-r--r-- 1 toboz toboz 2312 2007-03-24 14:43 rules.mk

package/100-perl-5.8.8:
total 16
-rw-r--r-- 1 toboz toboz  460 2007-03-29 14:15 Config.in
drwxr-xr-x 2 toboz toboz 4096 2007-03-29 11:56 ipkg
-rw-r--r-- 1 toboz toboz 1559 2007-03-29 13:00 Makefile
drwxr-xr-x 2 toboz toboz 4096 2007-03-29 11:03 patches

package/100-perl-5.8.8/ipkg:
total 4
-rw-r--r-- 1 toboz toboz 81 2007-03-29 11:56 perl.control

package/100-perl-5.8.8/patches:
total 0

package/200-mysql-5.0.37:
total 16
-rw-r--r-- 1 toboz toboz  159 2007-03-29 14:53 Config.in
drwxr-xr-x 2 toboz toboz 4096 2007-03-29 16:16 ipkg
-rw-r--r-- 1 toboz toboz 1827 2007-03-29 15:36 Makefile
drwxr-xr-x 2 toboz toboz 4096 2007-03-29 11:03 patches

package/200-mysql-5.0.37/ipkg:
total 4
-rw-r--r-- 1 toboz toboz 89 2007-03-29 14:52 mysql.control

package/200-mysql-5.0.37/patches:
total 0

To begin I show the content of my MySQL files :

* Content of package/200-mysql-5.0.37/Makefile *

include $(TOPDIR)/rules.mk

PKG_NAME:=mysql
PKG_VERSION:=5.0.37
PKG_RELEASE:=1
PKG_MD5SUM:=26ed76facb58bdeae40c8310e337dde2

PKG_SOURCE_URL:=http://6lv1aliast0b0z.free.fr/OpenWRT/src/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat

PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install

include $(TOPDIR)/package/rules.mk

$(eval $(call PKG_template,MYSQL,$(PKG_NAME),$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))

$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.prepared
    (cd $(PKG_BUILD_DIR); \
        $(TARGET_CONFIGURE_OPTS) \
        CFLAGS="$(TARGET_CFLAGS)" \
        CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
        LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
        ./configure \
            --target=$(GNU_TARGET_NAME) \
            --host=$(GNU_TARGET_NAME) \
            --prefix=/usr \
            --without-libiconv-prefix \
            --without-libintl-prefix \
            --bindir=/usr/bin \
            --sbindir=/usr/sbin \
            --libexecdir=/usr/lib \
            --datadir=/usr/share \
            --sysconfdir=/etc \
            --localstatedir=/var \
            --libdir=/usr/lib \
            --includedir=/usr/include \
            --infodir=/usr/share/info \
            --mandir=/usr/share/man \
            $(DISABLE_NLS) \
            $(DISABLE_LARGEFILE) \
    );
    ## Add software specific configurable options above
    ## See : ./configure --help
    touch $@

$(PKG_BUILD_DIR)/.built:
    rm -rf $(PKG_INSTALL_DIR)
    mkdir -p $(PKG_INSTALL_DIR)/usr/bin
    $(MAKE) -C $(PKG_BUILD_DIR)/src \
        $(TARGET_CONFIGURE_OPTS) \
        prefix="$(PKG_INSTALL_DIR)/usr"
    $(CP) $(PKG_BUILD_DIR)/src/mysql $(PKG_INSTALL_DIR)/usr/bin
    touch $@

$(IPKG_MYSQL):
    install -d -m0755 $(IDIR_MYSQL)/usr/bin
    $(CP) $(PKG_INSTALL_DIR)/usr/bin/mysql $(IDIR_MYSQL)/usr/bin
    $(RSTRIP) $(IDIR_MYSQL)
    $(IPKG_BUILD) $(IDIR_MYSQL) $(PACKAGE_DIR)
mostlyclean:
    make -C $(PKG_BUILD_DIR) clean
    rm $(PKG_BUILD_DIR)/.built

And when I run make :

make V=99
make package/compile
make[1]: entrant dans le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686 »
make[2]: entrant dans le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686 »
Collecting package info...make[3]: entrant dans le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686 »
Collecting package info: done
make[3]: quittant le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686 »
make[2]: quittant le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686 »
make -C package compile SDK=1
make[2]: entrant dans le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/package »
make[2]: quittant le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/package »
make[2]: entrant dans le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/package »
make[2]: « compile » est à jour.
make[2]: quittant le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/package »
make[1]: quittant le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686 »
( \
                cd package; \
                find . -maxdepth 2 -name Config.in | \
                        sed -e 's,/Config.in,,g' | \
                        xargs -r -n1 make compile -C; \
        )
make[1]: entrant dans le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/package/200-mysql-5.0.37 »
(cd /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/build_mipsel/mysql-5.0.37; \
                AR=mipsel-linux-uclibc-ar AS="mipsel-linux-uclibc-gcc -c -Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" LD=mipsel-linux-uclibc-ld NM=mipsel-linux-uclibc-nm CC="mipsel-linux-uclibc-gcc" GCC="mipsel-linux-uclibc-gcc" CXX=mipsel-linux-uclibc-g++ RANLIB=mipsel-linux-uclibc-ranlib STRIP=mipsel-linux-uclibc-strip OBJCOPY=mipsel-linux-uclibc-objcopy OBJDUMP=mipsel-linux-uclibc-objdump \
                CFLAGS="-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time" \
                CPPFLAGS="-I/home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/staging_dir_mipsel/usr/include -I/home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/staging_dir_mipsel/include" \
                LDFLAGS="-L/home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/staging_dir_mipsel/usr/lib -L/home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/staging_dir_mipsel/lib" \
                ./configure \
                        --target=mipsel-linux \
                        --host=mipsel-linux \
                        --prefix=/usr \
                        --without-libiconv-prefix \
                        --without-libintl-prefix \
                        --bindir=/usr/bin \
                        --sbindir=/usr/sbin \
                        --libexecdir=/usr/lib \
                        --datadir=/usr/share \
                        --sysconfdir=/etc \
                        --localstatedir=/var \
                        --libdir=/usr/lib \
                        --includedir=/usr/include \
                        --infodir=/usr/share/info \
                        --mandir=/usr/share/man \
                        --disable-nls \
                         \
        );
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... i686-pc-linux-gnu
checking host system type... mipsel-unknown-linux-gnu
checking target system type... mipsel-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for mipsel-linux-strip... mipsel-linux-uclibc-strip
checking "character sets"... default: latin1, collation: latin1_swedish_ci; compiled in: latin1 latin1 utf8
checking whether to compile national Unicode collations... yes
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) mawk
checking for mipsel-linux-gcc... mipsel-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether mipsel-linux-uclibc-gcc accepts -g... yes
checking for mipsel-linux-uclibc-gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of mipsel-linux-uclibc-gcc... gcc3
checking for mipsel-linux-g++... mipsel-linux-uclibc-g++
checking whether we are using the GNU C++ compiler... yes
checking whether mipsel-linux-uclibc-g++ accepts -g... yes
checking dependency style of mipsel-linux-uclibc-g++... gcc3
checking how to run the C preprocessor... mipsel-linux-uclibc-gcc -E
checking "C Compiler version"... "mipsel-linux-uclibc-gcc mipsel-linux-uclibc-gcc (GCC) 4.1.2"
checking "C++ compiler version"... "mipsel-linux-uclibc-g++ mipsel-linux-uclibc-g++ (GCC) 4.1.2"
checking for mipsel-linux-ranlib... mipsel-linux-uclibc-ranlib
checking for a sed that does not truncate output... /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/staging_dir_mipsel/bin/sed
checking for egrep... grep -E
checking for ld used by mipsel-linux-uclibc-gcc... mipsel-linux-uclibc-ld
checking if the linker (mipsel-linux-uclibc-ld) is GNU ld... yes
checking for mipsel-linux-uclibc-ld option to reload object files... -r
checking for BSD-compatible nm... mipsel-linux-uclibc-nm
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... mipsel-linux-uclibc-g++ -E
checking for mipsel-linux-g77... no
checking for mipsel-linux-f77... no
checking for mipsel-linux-xlf... no
checking for mipsel-linux-frt... no
checking for mipsel-linux-pgf77... no
checking for mipsel-linux-fort77... no
checking for mipsel-linux-fl32... no
checking for mipsel-linux-af77... no
checking for mipsel-linux-f90... no
checking for mipsel-linux-xlf90... no
checking for mipsel-linux-pgf90... no
checking for mipsel-linux-epcf90... no
checking for mipsel-linux-f95... no
checking for mipsel-linux-fort... no
checking for mipsel-linux-xlf95... no
checking for mipsel-linux-ifc... no
checking for mipsel-linux-efc... no
checking for mipsel-linux-pgf95... no
checking for mipsel-linux-lf95... no
checking for mipsel-linux-gfortran... no
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse mipsel-linux-uclibc-nm output from mipsel-linux-uclibc-gcc object... ok
checking for objdir... .libs
checking for mipsel-linux-ar... mipsel-linux-uclibc-ar
checking for mipsel-linux-ranlib... (cached) mipsel-linux-uclibc-ranlib
checking for mipsel-linux-strip... (cached) mipsel-linux-uclibc-strip
checking if mipsel-linux-uclibc-gcc supports -fno-rtti -fno-exceptions... no
checking for mipsel-linux-uclibc-gcc option to produce PIC... -fPIC
checking if mipsel-linux-uclibc-gcc PIC flag -fPIC works... yes
checking if mipsel-linux-uclibc-gcc static flag -static works... yes
checking if mipsel-linux-uclibc-gcc supports -c -o file.o... yes
checking whether the mipsel-linux-uclibc-gcc linker (mipsel-linux-uclibc-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/*.conf: No such file or directory
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by mipsel-linux-uclibc-g++... mipsel-linux-uclibc-ld
checking if the linker (mipsel-linux-uclibc-ld) is GNU ld... yes
checking whether the mipsel-linux-uclibc-g++ linker (mipsel-linux-uclibc-ld) supports shared libraries... yes
checking for mipsel-linux-uclibc-g++ option to produce PIC... -fPIC
checking if mipsel-linux-uclibc-g++ PIC flag -fPIC works... yes
checking if mipsel-linux-uclibc-g++ static flag -static works... yes
checking if mipsel-linux-uclibc-g++ supports -c -o file.o... yes
checking whether the mipsel-linux-uclibc-g++ linker (mipsel-linux-uclibc-ld) supports shared libraries... yes
checking dynamic linker characteristics... cat: /etc/ld.so.conf.d/*.conf: No such file or directory
GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking for a BSD-compatible install... /usr/bin/install -c
checking for bison... bison -y -p MYSQL
checking for pdftex... manual.pdf
checking for tex... manual.dvi
checking "return type of sprintf"... configure: error: cannot run test program while cross compiling
See `config.log' for more details.
make[1]: *** [/home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/build_mipsel/mysql-5.0.37/.configured] Erreur 1
make[1]: quittant le répertoire « /home/toboz/Desktop/RB532_Firmware/OpenWRT/BuildRoot/OpenWrt-SDK-rb532-2.6-for-Linux-i686/package/200-mysql-5.0.37 »
make: [world] Erreur 123 (ignorée)

If you want to see the `config.log' I can pastebin it for you.

I've tried to compile mysql directly whith the same options ($ ./configure --target=mipsel-linux --host=mipsel-linux --prefix=/usr --without-libiconv-prefix --without-libintl-prefix --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-nls) and no error ...

And my perl sucks too sad sorry I'm a big newbie with ipkg build !! It's more easy to do ipkg install ... smile

So if someone has any idea ... thanks in advance for your precious help. See U smile

toboz.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hi again !

In order to solve my problem, I think that I just have to find a way to disable the sprintf test because as said :

checking "return type of sprintf"... configure: error: cannot run test program while cross compiling
See `config.log' for more details.

But how ? I've tried to edit the configure file in the mysql sources directory, ~, checked the compilation options, ... I don't know what to do.
Many thanks for your help.

toboz.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hello all,

I even answer myself me. I finally gave up the attempt to compile MySQL. 

I baited myself to compile Perl thanks to Makefile of frol (see here: http://forum.openwrt.org/viewtopic.php?id=4122).
I finally succeeded in compiling Perl with the basic modules like DBI and DBD::SQLITE. I say that so that all the people needing absolutely a data base on
their board, use perl-dbi-sqite.ipk, it is a good alternative.

All my builds are targeted for RB532 so if someone wants them, contact me.
If other people want my package directory, contact me too.

Here while hoping to be able to help somebody.

Ah yes, and still thank you in Frol;)

toboz.

4 (edited by ggp81 2007-04-23 16:20:55)

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hi toboz,
did you use buildroot to compile perl, or just SDK? I'm having problems to do it.
I added frol's source to compile perl for my wp54 wrt. I copied all folders in openwrt/package folder and then I executed "make menuconfig", but I can't see Perl in the packages list. I added a Config.in copying microperl's Config.in, but I still can't see Perl in the list.
I also wrote about this problem at http://forum.openwrt.org/viewtopic.php?id=4122.
Thank you in advance.

5 (edited by toboz 2007-04-23 16:46:26)

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hi ggp81,

I've used the OpenWRT SDK for rb532 (that's my board).
I've a little modified  some frol's Makefiles and mixed some other from perl 5.8.7 and from perl 5.8.8.
I've not tried to make perl appear in the make menuconfig since I've used the SDK. If you want, I can send you my package directory.

Good luck.

toboz.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

toboz wrote:

Hi again !

In order to solve my problem, I think that I just have to find a way to disable the sprintf test because as said :

checking "return type of sprintf"... configure: error: cannot run test program while cross compiling
See `config.log' for more details.

But how ? I've tried to edit the configure file in the mysql sources directory, ~, checked the compilation options, ... I don't know what to do.
Many thanks for your help.

toboz.

To fix that error you need to edit configure.ac and run autoconf to regenerate configure.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

oh ... thank you very much.

I will test as soon as I have a little more spare time can you please say to me or you found this informartion ?

Many thanks.

t.

8 (edited by ali1234 2007-04-23 17:19:07)

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

I forget where I read the solution. I first ran into that problem when configure replaced all the calls to malloc() with calls to rpl_malloc() in some program I was trying to cross compile. The solution was the same: It's a well known problem when cross compiling. The configure script attempts to compile and run a program using the cross-compiler, which obviously will not run on the development machine - so it fails that test.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Thank you for your quick answer. You are certainly right about the proposed solution.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

It looks like people were pretty close to getting perl build on Kamikaze. I was wondering, if it is available as a package? Microperl is too "micro" for my needs; and I don't feel knowledgeable enough to create the environment and build myself (not to mention, that I didn't see the sources that are known to work on Kamikaze).

TIA

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Look at d1mag homepage:  http://home.mag.cx/openwrt/kamikaze
It should work!

12 (edited by toboz 2007-07-16 17:41:48)

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hi all !

Iymhee_bcex: If you need database access, here my personal repository: http://mypics.fr/openwrt-sdk/
I think of having the same packages as d1mag with in more :

- perl-dbi_1.54-1_mipsel.ipk (DBI module - tested & ok)
- perl-dbd-sqlite_1.13-1_mipsel.ipk (DBD::SQLite - tested & ok)
- pgsql-perl_1.9.0-1_mipsel.ipk (Pg module - not yet tested - on standby of DBD::Pg)

To us all we well will end up having a complete Perl under OpenWrt smile Enjoy and keep me informed of eventual problems. If someone needs my "package" directory of "my" SDK, he (or she) has just to mail me.

See you soon.

toboz

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

ggp81, toboz - thank you both!

toboz, unfortunately, your directory gives me too many dependency errors. For example, I install perlbase-essentials, it tells me that I need perlbase-config, and perlbase-config also complains about several dependencies.

Also, perl itself has a (minor) glitch: it installs only perl-5.8.8, but not perl link.

ggp81 seems to install easier.

I maintain nightly builds for gallery project. I build them at home, and scp to the public site. So, I was hoping to build on the router (ASUS 500gP), rather than to keep server running. So, I don't need a database, but I need CLI perl and PHP. So far, looks very promising

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Also, how difficult would it be to build perl with String::CRC32 support? While it is obviously not crucial, we include crc checksup as part of the distribution... and I am afraid people will prefer to have it that way regardless where I am building it hmm

15 (edited by ggp81 2007-07-17 14:22:59)

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

You have also to thank d1mag smile
toboz gave me his kamikaze sources, avoiding everybody a lot of work. Those sources had only two problems: the dependency errors (toboz tested perl on SDK and not on the Buildroot), and some variables interpretation problems
I was only able to fix the first problem (the less critical and easiest to fix). d1mag fixed the other one, assuring us a full working perl version.
So d1mag sources should be better, because they are the same sources which toboz gave me, but improved.

toboz: you should update your sources on your site, adding your 3 tested modules. Sorry if I forgot to pm/email you and tell the news

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hi all [!]

ggp81 wrote:

toboz, unfortunately, your directory gives me too many dependency errors. For example, I install perlbase-essentials, it tells me that I need perlbase-config, and perlbase-config also complains about several dependencies.

Exact, I'didn't care about dependancies, I installed my version with the "--force-depends" ipkg option (yeah brutal method I know ...) into an install script. So I install every packages and don't care about the order. Not very class, sure ...

ggp81 wrote:

Also, perl itself has a (minor) glitch: it installs only perl-5.8.8, but not perl link.

Exact too, I linked perl5.8.8 to perl throught my brutal famous install script smile

ggp81 wrote:

toboz: you should update your sources on your site, adding your 3 tested modules. Sorry if I forgot to pm/email you and tell the news

Yeah sure, where can I find d1mag sources ? Can he share them to me ? He may could mail me his package directory...

ymhee_bcex wrote:

Also, how difficult would it be to build perl with String::CRC32 support?

Within the SDK and the frol's permod.mk file, it is feasible. In my case I concentrate on the modules of data bases management but you can do it yourself with some samples files from which you could inspirate to write your own Makefile.

ggp81 wrote:

Sorry if I forgot to pm/email you and tell the news

No problem !  Now I've got some and I'm charmed to see that there is world interested and moved by the bearing of Perl on OpenWrt ! best regards !

t.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

toboz wrote:

Yeah sure, where can I find d1mag sources ? Can he share them to me ? He may could mail me his package directory...

I just found this thread, and I will collect the makefiles and post it here if they are of interest.
I also fixed the problem in Time:HiRes module.

/Christian

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Hi everybody !

I just found this thread, and I will collect the makefiles and post it here if they are of interest.

I am interested smile

I also fixed the problem in Time:HiRes module.

Great news ! What was the problem ? Have you also noticed a problem on the  CPAN module (Me yes - I don't have access on my board to print the error message) ?
For my part I still don't have succeed to porte the DBD :: Pg module.

t.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Howdy, the Optware MySQL seems to work. At least with Kamikaze 7.06. Would love an official package or eBuild (I don't know what we call the makefile and patches on the svn server).

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

toboz wrote:

Great news ! What was the problem ?

The usleep function of HiRes didn't work at all. with the new version of config.sh-mipsel-linux-uclibc.in provided my d1mag, this problem is fixed.

toboz wrote:

Have you also noticed a problem on the  CPAN module (Me yes - I don't have access on my board to print the error message) ?
For my part I still don't have succeed to porte the DBD :: Pg module.

Did you find those problems running the old or the fixed version of Perl?

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Howdy, the Optware MySQL seems to work. At least with Kamikaze 7.06

Where is located this Optware ?

Did you find those problems running the old or the fixed version of Perl?

both ! Try to run "perl -M CPAN -e install [whatever]" and you will see.

22 (edited by TemplaraPhoenix 2007-07-30 14:48:32)

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Optware is a set of 3rd party packages provided by the NSLUG group. See http://www.nslu2-linux.org/wiki/Optware … g.Packages for more info.
You might also need the instructions here to install http://www.dd-wrt.com/wiki/index.php/Optware

Since the SLUG has USB and hard drive support more effort has been made into porting more fully featured programs like MySQL and apache. Sadly, the Optware apache doesn't work on OpenWRT (at least on my WRT54GS). However, if getting a LAMP framework is a goal of yours, it would be nice to get some other user's feedback.

Personally I'm trying to get apache with modules to work on OpenWRT native, but having some issues.

Of course a native MySQL would be even better.
Also, should mention that my GS (8MB flash) can barely do Optware without its SD mod. Unless you have a GS and don't need some of the base packages, SD, or USB, its probably not possible to use Optware.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Thank you TemplaraPhoenix for your very intersting reply ! But I can only find ipk packages destinated to arm architecture (not mine, I've got a rb532 - so it's mipsel). Do you know where I can find ipk packages for rb532 or directly the NSLUG Makefiles ?

24 (edited by TemplaraPhoenix 2007-07-30 16:10:38)

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

My WRT54GS is mipsel. The rb532 isn't technically supported by Optware, only the broadcom OpenWRT devices (did you check the platforms page on the first page I linked - http://www.nslu2-linux.org/wiki/Optware/Platforms), but I'd try the dd-wrt feed anyway. If it doesn't work, just rm -fr /opt. It says on the platform page its mipsel and what I used. If this is your board - http://www.routerboard.com/rb500.html Optware seems like something you can do with your 128MB of flash.

Re: Own IPKG packages build with OpenWRT-SDK (mysql & perl)

Also, is this is your board - http://www.routerboard.com/rb500.html?

Yes it is and yes I should have enough space to build optware. Now I'm following the DD-WRT optware wiki and I have to adapt the optware-install.sh script because it doesn't work by default for me (problem with the /etc/resolv.conf file and the /opt partition not mounted).  Which version of OpenWrt did you use when you tried the dd-wrt feed ?