cross-building ARM world on amd64

Tim Kientzle kientzle at freebsd.org
Mon Jan 13 02:09:23 UTC 2014


According to lib/ncurses/Makefile, make_keys is a requirement
for build-tools.  build-tools builds things for the host machine.

> build-tools: make_hash make_keys
> 
> make_keys: make_keys.c names.c ncurses_def.h ${HEADERS}
>         ${CC} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c

Looking through your full log, it looks like it is getting built
during the build-tools phase:

> ===> lib/ncurses/ncurses (obj,build-tools)
...
> cc -o make_keys -O2 -pipe -I. -I/usr/cross/obj/arm.armv6/usr/src/lib/ncurses/ncurses/../ncurses -I/usr/src/lib/ncurses/ncurses/../ncurses -I/usr/src/lib/ncurses/ncurses/../ncurses -I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include -I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99   -I/usr/cross/obj/arm.armv6/usr/src/tmp/legacy/usr/include /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/make_keys.c

And is then getting built again for some reason:

> ===> lib/ncurses/ncurses (obj,depend,all,install)

....

> cc  -o make_keys -O -pipe  -I. -I/usr/cross/obj/usr/src/lib/ncurses/ncurses/../ncurses -I/usr/src/lib/ncurses/ncurses/../ncurses -I/usr/src/lib/ncurses/ncurses/../ncurses -I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include -I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/make_keys.c
> ./make_keys keys.list > init_keytry.h
> ./make_keys: Exec format error

I can't find anything in this part of the tree that's been touched
more recently than last June.  I know I've done many cross-builds
since then, so there must be something peculiar in your
environment.  If we can figure out what that is, maybe we
can adjust things so other people don't stumble on this.

Can you search your /usr/obj to see if you have multiple
copies of make_keys somewhere?

It might also be worth scrutinizing your environment;
you may have some environment variables that are
surprising the build process.

Of course, getting a new /usr/src tree is always a
worthwhile thing to try.

Tim



More information about the freebsd-questions mailing list