|
From: <pl...@pi...> - 2009-05-08 18:01:36
|
HI, I'm trying to cross-compile gnuplot for arm. I set CC= and CXX= but it got thrown out with a message saying I should use --host to cross-compile. The supposed "complete" list of options in ./configure --help and in INSTALL does not mention it or cross-compiling at all where's the doc ? TIA. |
|
From: Ethan M. <merritt@u.washington.edu> - 2009-05-08 21:43:04
|
On Friday 08 May 2009 10:34:51 pl...@pi... wrote: > HI, > > I'm trying to cross-compile gnuplot for arm. > > I set CC= and CXX= but it got thrown out with a message saying I should > use --host to cross-compile. > > The supposed "complete" list of options in ./configure --help and in > INSTALL does not mention it or cross-compiling at all The --host=arm-linux option is not something that is part of gnuplot, or gnuplot's autoconfigure scripts. It is an option for the gcc compiler. So you would need to look in the gcc docs. I would guess the best source of help would be an arm-linux forum. > where's the doc ? > > > TIA. -- Ethan A Merritt |
|
From: Allin C. <cot...@wf...> - 2009-05-08 22:00:24
|
On Fri, 8 May 2009, Ethan Merritt wrote: > On Friday 08 May 2009 10:34:51 pl...@pi... wrote: > > HI, > > > > I'm trying to cross-compile gnuplot for arm. > > > > I set CC= and CXX= but it got thrown out with a message saying I should > > use --host to cross-compile. > > > > The supposed "complete" list of options in ./configure --help and in > > INSTALL does not mention it or cross-compiling at all > > The --host=arm-linux option is not something that is part of > gnuplot, or gnuplot's autoconfigure scripts. It is an option > for the gcc compiler. So you would need to look in the gcc docs. > I would guess the best source of help would be an arm-linux > forum. plotter does have a point. I just checked the configure script for my program, gretl, and part of the boiler-plate output from ./configure --help is: System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] I certainly didn't add that explicitly; it's the output from some standard autoconf macro (not sure which; maybe AC_PROG_CC?). It's a bit surprising that it's not present in gnuplot's "configure --help" output. Allin Cottrell |
|
From: <pl...@pi...> - 2009-05-08 22:54:26
|
Allin Cottrell wrote: > On Fri, 8 May 2009, Ethan Merritt wrote: > >> On Friday 08 May 2009 10:34:51 pl...@pi... wrote: >>> HI, >>> >>> I'm trying to cross-compile gnuplot for arm. >>> >>> I set CC= and CXX= but it got thrown out with a message saying I should >>> use --host to cross-compile. >>> >>> The supposed "complete" list of options in ./configure --help and in >>> INSTALL does not mention it or cross-compiling at all >> The --host=arm-linux option is not something that is part of >> gnuplot, or gnuplot's autoconfigure scripts. It is an option >> for the gcc compiler. So you would need to look in the gcc docs. >> I would guess the best source of help would be an arm-linux >> forum. > > plotter does have a point. I just checked the configure script > for my program, gretl, and part of the boiler-plate output from > ./configure --help is: > > System types: > --build=BUILD configure for building on BUILD [guessed] > --host=HOST cross-compile to build programs to run on HOST [BUILD] > > I certainly didn't add that explicitly; it's the output from some > standard autoconf macro (not sure which; maybe AC_PROG_CC?). > It's a bit surprising that it's not present in gnuplot's > "configure --help" output. > > Allin Cottrell > yes, that's the sort of thing I was expecting to find. I spent ages pouring over the output thinking I must have missed it. I was not expecting any ARM specific help just that one line explaining the usage. regards, Peter. |
|
From: Ethan M. <merritt@u.washington.edu> - 2009-05-08 23:16:49
|
On Friday 08 May 2009 15:00:15 Allin Cottrell wrote: > On Fri, 8 May 2009, Ethan Merritt wrote: > > > On Friday 08 May 2009 10:34:51 pl...@pi... wrote: > > > HI, > > > > > > I'm trying to cross-compile gnuplot for arm. > > > > > > I set CC= and CXX= but it got thrown out with a message saying I should > > > use --host to cross-compile. > > > > > > The supposed "complete" list of options in ./configure --help and in > > > INSTALL does not mention it or cross-compiling at all > > > > The --host=arm-linux option is not something that is part of > > gnuplot, or gnuplot's autoconfigure scripts. It is an option > > for the gcc compiler. So you would need to look in the gcc docs. > > I would guess the best source of help would be an arm-linux > > forum. > > plotter does have a point. I just checked the configure script > for my program, gretl, and part of the boiler-plate output from > ./configure --help is: > > System types: > --build=BUILD configure for building on BUILD [guessed] > --host=HOST cross-compile to build programs to run on HOST [BUILD] > > I certainly didn't add that explicitly; it's the output from some > standard autoconf macro (not sure which; maybe AC_PROG_CC?). > It's a bit surprising that it's not present in gnuplot's > "configure --help" output. I have not done cross-compilation, so take this with a grain of salt, but as I read the autoconf man pages, the idea is that if you use one of the cross-compilation macros like AC_PROG_CC in the ./configure script two things happen. First, it tests for successful use of the CC=foo compiler flags. Second, if the test succeeds it allows you to define conditional code options based on the knowledge that this is a cross-compiled build. So far as I know, the gnuplot source has no conditional code that would be triggered by AC_PROG_CC. So I would have expected that setting CC to "--host=arm-linux" explicitly was sufficient; i.e. you wouldn't have to do it via the AC_PROG_CC macro. But I haven't tried it. If someone confirms a benefit of having the AC_PROG_CC in the configure script, that's certainly fine with me. I have separately acknowledged that there should probably be a top level build target that builds only the gnuplot executable. Is there a standard name for such a target? |
|
From: <pl...@pi...> - 2009-05-09 00:50:39
|
Ethan Merritt wrote: > On Friday 08 May 2009 15:00:15 Allin Cottrell wrote: >> On Fri, 8 May 2009, Ethan Merritt wrote: >> >>> On Friday 08 May 2009 10:34:51 pl...@pi... wrote: >>>> HI, >>>> >>>> I'm trying to cross-compile gnuplot for arm. >>>> >>>> I set CC= and CXX= but it got thrown out with a message saying I should >>>> use --host to cross-compile. >>>> >>>> The supposed "complete" list of options in ./configure --help and in >>>> INSTALL does not mention it or cross-compiling at all >>> The --host=arm-linux option is not something that is part of >>> gnuplot, or gnuplot's autoconfigure scripts. It is an option >>> for the gcc compiler. So you would need to look in the gcc docs. >>> I would guess the best source of help would be an arm-linux >>> forum. >> plotter does have a point. I just checked the configure script >> for my program, gretl, and part of the boiler-plate output from >> ./configure --help is: >> >> System types: >> --build=BUILD configure for building on BUILD [guessed] >> --host=HOST cross-compile to build programs to run on HOST [BUILD] >> >> I certainly didn't add that explicitly; it's the output from some >> standard autoconf macro (not sure which; maybe AC_PROG_CC?). >> It's a bit surprising that it's not present in gnuplot's >> "configure --help" output. > > I have not done cross-compilation, so take this with a grain of salt, > but as I read the autoconf man pages, the idea is that if you use one of > the cross-compilation macros like AC_PROG_CC in the ./configure script > two things happen. First, it tests for successful use of the CC=foo > compiler flags. Second, if the test succeeds it allows you to define > conditional code options based on the knowledge that this is a > cross-compiled build. > > So far as I know, the gnuplot source has no conditional code that would > be triggered by AC_PROG_CC. So I would have expected that setting > CC to "--host=arm-linux" explicitly was sufficient; i.e. you wouldn't > have to do it via the AC_PROG_CC macro. > > But I haven't tried it. If someone confirms a benefit of having the > AC_PROG_CC in the configure script, that's certainly fine with me. > > I have separately acknowledged that there should probably be a top > level build target that builds only the gnuplot executable. > Is there a standard name for such a target? > > I would have thought that your suggested : make gnuplot , was best. as for the cross-compilation the correct setting for my toolchain was --host=arm-unknown-linux-gnueabi I posted it earlier but not from the right account for this list. Duh. I now have a result from the cross-compiler: $ file gnuplot gnuplot: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.29, not stripped regards, Peter. |
|
From: Allin C. <cot...@wf...> - 2009-05-09 01:10:27
|
On Fri, 8 May 2009, Ethan Merritt wrote: > On Friday 08 May 2009 15:00:15 Allin Cottrell wrote: > > plotter does have a point. I just checked the configure script > > for my program, gretl, and part of the boiler-plate output from > > ./configure --help is: > > > > System types: > > --build=BUILD configure for building on BUILD [guessed] > > --host=HOST cross-compile to build programs to run on HOST [BUILD] > > > > I certainly didn't add that explicitly; it's the output from some > > standard autoconf macro (not sure which; maybe AC_PROG_CC?). > > It's a bit surprising that it's not present in gnuplot's > > "configure --help" output. > > I have not done cross-compilation, so take this with a grain of salt, > but as I read the autoconf man pages, the idea is that if you use one of > the cross-compilation macros like AC_PROG_CC in the ./configure script > two things happen. First, it tests for successful use of the CC=foo > compiler flags. Second, if the test succeeds it allows you to define > conditional code options based on the knowledge that this is a > cross-compiled build. > > So far as I know, the gnuplot source has no conditional code that would > be triggered by AC_PROG_CC. So I would have expected that setting > CC to "--host=arm-linux" explicitly was sufficient; i.e. you wouldn't > have to do it via the AC_PROG_CC macro. I think one benefit of using AC_PROG_CC is simply that it displays help for such compiler-related options in response to configure --help. Also -- though I'm on less firm ground here -- it's possible that autoconf is in some ways cleverer than we think (although sometimes it can seem inordinately stupid). That is, using AC_PROG_CC _may_ cause some things to work out correctly for cross-compilation without requiring any intervention by the writer of configure.in or Makefile.* But, as with your comment, apply a grain of salt. Allin Cottrell |
|
From: Allin C. <cot...@wf...> - 2009-05-10 00:23:29
|
On Sat, 9 May 2009, Ethan Merritt (sfream) wrote: > On Friday 08 May 2009, Allin Cottrell wrote: > > I think one benefit of using AC_PROG_CC is simply that it displays > > help for such compiler-related options in response to configure > > --help. > > It turns out we already have AC_PROG_CC in the gnuplot > configure.in, yet it doesn't display any information about > cross-compiling in the help message. So scratch that theory. OK, it was a guess, and a wrong one. My second attempt is that the provision of the the "host and build" configuration info is a libtool thing. I tried the experiment of adding AC_PROG_LIBTOOL to gnuplot's configure.in and re-running ./prepare. This gave the error "required file `./ltmain.sh' not found". So I copied ltmain.sh into place and re-ran ./prepare. I then got a configure script that gave the help output, inter alia: System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] FWIW. Allin Cottrell |
|
From: Allin C. <cot...@wf...> - 2009-05-10 02:12:21
|
On Sat, 9 May 2009, Ethan Merritt (sfream) wrote: > On Saturday 09 May 2009, Allin Cottrell wrote: > > On Sat, 9 May 2009, Ethan Merritt (sfream) wrote: > > > > > On Friday 08 May 2009, Allin Cottrell wrote: > > > > I think one benefit of using AC_PROG_CC is simply that it displays > > > > help for such compiler-related options in response to configure > > > > --help. > > > > > > It turns out we already have AC_PROG_CC in the gnuplot > > > configure.in, yet it doesn't display any information about > > > cross-compiling in the help message. So scratch that theory. > > > > OK, it was a guess, and a wrong one. My second attempt is that > > the provision of the the "host and build" configuration info is a > > libtool thing. I tried the experiment of adding > > > > AC_PROG_LIBTOOL > > > > to gnuplot's configure.in and re-running ./prepare. This gave the > > error "required file `./ltmain.sh' not found". So I copied > > ltmain.sh into place and re-ran ./prepare. I then got a > > configure script that gave the help output, inter alia: > > > > System types: > > --build=BUILD configure for building on BUILD [guessed] > > --host=HOST cross-compile to build programs to run on HOST [BUILD] > > Huh. > But I don't think we really want to require libtool, do we? > We are not building any libraries. Agreed. It seems like overkill if no libraries are being built. But it would be nice if one could build a libgnuplot one day ;-) Allin Cottrell |