1

While trying to cross-compile nginx for raspberry pi, I am getting error during configure step itself. My config options for cross-compile are,

*./configure --build=x86_64-linux --host=arm-poky-linux-gnueabi --target=arm-poky-linux-gnueabi --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/ws --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=~/Documents/raspberrypi/poky/raspberryPiBuild/tmp/sysroots/raspberrypi --enable-nls*

The following error is printed upon issuing this command,./configure: error: invalid option "--build=x86_64-linux"

Whats the mistake am doing during this step?

sheeru
  • 482
  • 4
  • 13
  • You don't need to specify `--build`. – yegorich Mar 08 '14 at 20:07
  • Since --host is specified, it says --build is mandatory if i remove – sheeru Mar 09 '14 at 05:58
  • Specify only `--host`, i.e. without `--build` and `--target`. See this [answer](http://stackoverflow.com/questions/15234959/cross-compiling-for-arm-with-autoconf). – yegorich Mar 09 '14 at 06:49
  • What embedded distro are you using? Yocto? I see **poko** in your toolchain. – yegorich Mar 09 '14 at 06:56
  • i am using yocto.. For BSP i am using from https://github.com/djwillis/meta-raspberrypi. – sheeru Mar 09 '14 at 07:29
  • I have added a new meta-layer for adding my packages and nginx is in that layer. When it does do_configure() task, its showing that error – sheeru Mar 09 '14 at 07:42
  • Are you trying to add nginx recipe yourself or are you using the existing [one](https://bugzilla.yoctoproject.org/show_bug.cgi?id=5032)? Does removing both build and target options help? – yegorich Mar 09 '14 at 08:18
  • My yocto recipe for configuring and making nginx is very simple as below.. I haven't tried the official recipe yet...I will try and check... DESCRIPTION = "Web-server" SECTION = "package" LICENSE = "CLOSED" PR = "r0" SRC_URI = "file://nginx/" inherit autotools gettext – sheeru Mar 09 '14 at 09:47
  • Thanks yegorich :) I am able to cross compile nginx with that recipe!!Thanks a lot again!! – sheeru Mar 09 '14 at 11:10
  • I've posted an official answer, so that others can find it. I'll have to add nginx to Buildroot someday. – yegorich Mar 09 '14 at 12:30

1 Answers1

2

Yocto project already provides a recipe for nginx, so you don't need to create your own recipe. See this issue for more information.

yegorich
  • 4,653
  • 3
  • 31
  • 37