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 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 sorry I'm a big newbie with ipkg build !! It's more easy to do ipkg install ...
So if someone has any idea ... thanks in advance for your precious help. See U
toboz.