LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   configure script sends bad switches to daughter configure scripts (https://www.linuxquestions.org/questions/linux-software-2/configure-script-sends-bad-switches-to-daughter-configure-scripts-674889/)

Wells 10-07-2008 03:08 PM

configure script sends bad switches to daughter configure scripts
 
I am working on creating a gentoo ebuild for a software package, and a problem that I am running into is that the main configure script is sending some bad switches to one of the daughter configure scripts. The problem is that this is only happening when the ebuild is being emerged. If I do the configure manually, there are no problems.

So the initial configure command looks like the following:

Quote:

./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-gmp --build=i686-pc-linux-gnu
This appears to work fine, at least until the script spawns a configure script in a daughter directory:

Quote:

=== configuring in res-rsa (/var/tmp/portage/games-simulation/netrek-server-vanilla-2.15.0/work/netrek-server-vanilla-2.15.0/res-rsa)
configure: running /bin/sh ./configure '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-gmp' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-O2 -march=i686 -pipe' 'LDFLAGS=-Wl,-O1' 'CXXFLAGS=-O2 -march=i686 -pipe' --cache-file=/dev/null --srcdir=.
configure: warning: build_alias=i686-pc-linux-gnu: invalid host type
configure: warning: host_alias=i686-pc-linux-gnu: invalid host type
configure: error: can only configure for one host and one target at a time
configure: error: ./configure failed for res-rsa
As can be seen in the above configure command, a couple of switches are mangled. I have not been able to find where the heck these are even coming from in the first place, but I am suspecting that there is something broken with the main configure script.

Anyone have any idea what might be wrong?

weibullguy 10-07-2008 03:25 PM

Why are you passing the --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu? Those are used when cross-compiling, which it doesn't look like you're doing. If you're trying to override config.guess, only --build is needed.

Wells 10-07-2008 03:52 PM

Quote:

Originally Posted by weibullguy (Post 3303269)
Why are you passing the --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu? Those are used when cross-compiling, which it doesn't look like you're doing. If you're trying to override config.guess, only --build is needed.

Good call! Of course, I am not that sure how to turn that off in the first place. I am not trying to cross compile at this time. So now the question is how are those items getting set in the first place? I am not familiar with this portion of the gentoo build system, unfortunately.

weibullguy 10-07-2008 04:51 PM

Quote:

Originally Posted by Wells (Post 3303300)
So now the question is how are those items getting set in the first place? I am not familiar with this portion of the gentoo build system, unfortunately.

It looks like you're passing them to the configure script in the initial configure command.

Wells 10-07-2008 05:53 PM

Quote:

Originally Posted by weibullguy (Post 3303387)
It looks like you're passing them to the configure script in the initial configure command.

Nope. This is all being done in an ebuild script that I have in my personal overlay, which is then executed by the emerge command. The src_compile() section of the ebuild script looks like this:

Quote:

src_compile() {
export > /tmp/export.txt
econf --with-gmp || die
emake || die "emake failed"
}

weibullguy 10-10-2008 02:47 PM

Have you tried executing the configure script directly instead of using econf?

Wells 10-10-2008 02:48 PM

Quote:

Originally Posted by weibullguy (Post 3306351)
Have you tried executing the configure script directly instead of using econf?

Yep, and it works just fine. I stated that in the last sentence of the first paragraph of my original question. :)

weibullguy 10-10-2008 03:38 PM

I didn't know if that meant you built the package manually and it worked or whether you used configure directly in the ebuild. Why can't you just use configure in the ebuild instead of the econf function?


All times are GMT -5. The time now is 12:32 AM.