[OpenWrt-Devel] OpenWRT built on OpenSuSE (x86_64) fails
Luiz Angelo Daros de Luca
luizluca at gmail.com
Thu Aug 28 19:19:08 EDT 2014
Hello,
I'm trying to compile OpenWRT on an OpenSuSE 13.1 x86_64 targeting x86
generic (default config). However, I'm getting a strange behavior. In thunk
and BB, some packages that compiles for host machine are having problems
with pointer size:
openwrt/trunk/build_dir/host/grub-2.02~beta2 $ arch
x86_64
openwrt/trunk/build_dir/host/grub-2.02~beta2 $ grep SIZEOF_VOID_P config*h
config.h:#define BUILD_SIZEOF_VOID_P 8
*config-util.h:#define SIZEOF_VOID_P 4*
SIZEOF_VOID_P in host should be 8 if compiled for x86_64. And I get x86_64
binaries:
$ file build_dir/host/grub-2.02~beta2/grub-install
build_dir/host/grub-2.02~beta2/grub-install: *ELF 64-bit* LSB executable,
x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for
GNU/Linux 2.6.32, BuildID[sha1]=5082730f329f77b19783a7d9f6128bc6f3a45b10,
not stripped
I also get related warnings:
./include/grub/crypto.h:286:9: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
|| ((grub_addr_t) outptr & (sizeof (grub_uint64_t) - 1))))
As it compiles x86_64 program considering a pointer size from 32-bit,
programs did not work.
If I run the configure manually (with same args and PATH), the problem is
not present:
trunk/build_dir/host/grub-2.02~beta2.new $ grep SIZEOF_VOID_P config*h
config.h:#define BUILD_SIZEOF_VOID_P 8
*config-util.h:#define SIZEOF_VOID_P 8*
I isolated the problem to be the usage of
CONFIG_SITE=/home/REDETRESC/luizluca/prog-local/openwrt/trunk/include/site/i486-openwrt-linux-uclibc
Is the usage of i486-openwrt-linux-uclibc expected? Should it be
x86_64-openwrt-linux-uclibc for host compile?
In Ubuntu, I get no problem.
In AA, I had no problem. The configure args from grub in AA and grub2 from
BB/trunk have some differences. In AA, I have a single
--target=x86_64-suse-linux but grub binaries are 32bit (but other
host/compile packages are 64-bit).
In BB/trunk I have duplicated --target= arg in configure. The first is
--target=x86_64-suse-linux but the second one is
--target=i486-openwrt-linux-uclibc. This might trigger cross compiling.
This is host configure in BB/trunk:
(cd
/home/REDETRESC/luizluca/prog-local/openwrt/trunk/build_dir/host/grub-2.02~beta2/;
if [ -x configure ]; then cp -fpR
/home/REDETRESC/luizluca/prog-local/openwrt/trunk/scripts/config.{guess,sub}
/home/REDETRESC/luizluca/prog-local/openwrt/trunk/build_dir/host/grub-2.02~beta2//
&& /bin/bash ./configure CC="gcc" CFLAGS="-O2
-I/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host/include
-g"
CPPFLAGS="-I/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host/include"
LDFLAGS="-L/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host/lib"
SHELL="/bin/bash" *--target=x86_64-suse-linux *--host=x86_64-suse-linux
--build=x86_64-suse-linux --program-prefix="" --program-suffix=""
--prefix=/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host
--exec-prefix=/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host
--sysconfdir=/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host/etc
--localstatedir=/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host/var
--sbindir=/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host/bin*
--target=i486-openwrt-linux-*uclibc
--sbindir="/home/REDETRESC/luizluca/prog-local/openwrt/trunk/staging_dir/host/bin"
--disable-werror --disable-libzfs --disable-nls ; fi )
configure: loading site script
/home/REDETRESC/luizluca/prog-local/openwrt/trunk/include/site/i486-openwrt-linux-uclibc
configure: loading site script
/home/REDETRESC/luizluca/prog-local/openwrt/trunk/include/site/i486-openwrt-linux-uclibc
checking build system type... *x86_64-suse-linux-gnu*
checking host system type...* x86_64-suse-linux-gnu*
checking target system type...* i486-openwrt-linux-uclibc*
In Makefile, I have:
package/boot/grub2/Makefile:
54 HOST_CONFIGURE_ARGS += \
55 --target=$(REAL_GNU_TARGET_NAME) \
If I remove target, it does not change.
Do you guys have any clue?
Regards,
---
Luiz Angelo Daros de Luca, Me.
luizluca at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20140828/261ef6dc/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list